Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Post by lf3thn4d » Wed Dec 10, 2008 4:20 pm

lol! Really sorry about that. was half asleep when I posted it. Fixed.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Wed Dec 10, 2008 5:14 pm

lf3thn4d wrote:Hey, yeah.. i never noticed it. Kept thinking i'm in trunk. lol. Got to switch my SVN target. So in the future changes will go to trunk. I'll fix the wiki when that happens. :) Thanks for noticing.
You don't have to use trunk.
In fact, it would be better to use v1-6, because that's what file releases are made from. :wink:
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Post by lf3thn4d » Wed Dec 10, 2008 5:21 pm

Hmmm.. yeah. Thing is I might be doing unstable code check in. So I think it's wise to do them in trunk first. Then when I feel it's stable enough, I move it into v1-6.

So I guess wiki should point to v1-6. :)
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Post by lf3thn4d » Sat Dec 20, 2008 8:43 am

New update. This is a bug fix release. The new Blender changed their API again and broke the skeleton export if your armature is attached to the mesh using a modifier. This update fixes it.

P.S. Can the mods make this thread sticky? And unsticky the other one that is causing a lot of confusion. Thanks :)
0 x

reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland

Post by reptor » Sat Dec 20, 2008 2:36 pm

I suggest that the "wrong" threads will get a final post pointing here and then *locked*.
0 x

reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland

Post by reptor » Sat Dec 20, 2008 2:43 pm

Then about the script.

On Debian GNU/Linux etch (stable) the Blender version is 2.42a. For the people who use the Blender versions from package repositories of Debian or others, it is a problem if the script doesn't work in the version of Blender that comes from the package repository. It's not really recommended to start installing some other Blender version than the one in the official repository, so the script will "give way" I guess.

Did you consider this?
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Post by lf3thn4d » Sat Dec 20, 2008 4:11 pm

reptor wrote:I suggest that the "wrong" threads will get a final post pointing here and then *locked*.
Yes, that'll be a good idea. :)
reptor wrote:On Debian GNU/Linux etch (stable) the Blender version is 2.42a. For the people who use the Blender versions from package repositories of Debian or others, it is a problem if the script doesn't work in the version of Blender that comes from the package repository. It's not really recommended to start installing some other Blender version than the one in the official repository, so the script will "give way" I guess.

Did you consider this?
For the most part, linux hasn't been in my consideration yet. Though my personal opinion on things are that the distros are responsible to get their packages up to date. But sadly, most of them are slow as the package maintainers don't do them full time.

I could probably come up with different download links for different blender versions? Though it's rather an annoyance to have to be packaging for different versions of Blender. I suppose that's the only sane way as it is.
0 x

User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: Princeton, New Jersey, USA
Contact:

Post by nikki » Sat Dec 20, 2008 4:24 pm

Its very easy to get the latest Blender version for a Linux system. Just get the tarball, and unzip. There are many new features in the latest version when compared to 2.42a, I guess people shouldn't rely on the repos version.
0 x

reptor
Ogre Magi
Posts: 1120
Joined: Wed Nov 15, 2006 7:41 pm
Location: Finland

Post by reptor » Sat Dec 20, 2008 5:49 pm

I do know that it is rather easy to install non-Debian version, but I think many people can be upset (I am not upset! Just noting here that there might be a problem) if they find out that the script doesn't work with the Blender that Debian and possibly other distros are distributing as the "stable" version of Blender.

Of course, if you know that the new version of Blender has some new features which you need, then you should use the newer version.

I was wondering how easy it is to write the script to detect which version of Blender is in use?

There are at least two solutions as I see it. One is to break compatibility and provide different versions of the script for download and tell people which version works with which Blender version. You don't have to keep improving the older version of the script which only works with the older Blender versions, you can leave it like it is now and just keep it available for download for people who need it and can live without improvements done to the script.

Or then if the script can detect the Blender version, then that would be the other way to solve this problem. Maybe it would be better way? I don't know. Of course it is top priority to minimize the work that is needed to maintain the script, the intention is not to increase your workload for every time you modify the script. I mean that if it means you would have to write big parts of the script differently for different Blender versions, maybe even every new feature, then it is maybe too much. But it is for you to decide if it is too much. I don't know what needs to be written differently so I can't really judge that.

Now, I have to say I am really not much concerned about this for my personal Blender + Ogre3D needs. I just felt pointing out that there are channels from which people get clearly older versions of Blender than what you promise that will work with this script. For Windows users not a problem at all but for Linux users it might be quite annoying if they can't use their distro's 'official' version of Blender and your script together.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Sat Dec 20, 2008 6:06 pm

Debian is notoriously slow in accepting packages into 'stable'. :)

However, it would be a good idea to test the script against Blender 2.42, and then make a tag/branch when it's no longer possible to maintain backwards compatibility.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
Rasengan
Halfling
Posts: 46
Joined: Sun Jul 13, 2008 12:21 pm
Location: Brussels

Post by Rasengan » Sat Dec 20, 2008 7:40 pm

Hey everybody, is there any way to set a name for a submesh in Blender and getting it in Ogre Engine?

It's not usefull at all to manually set it in the xml files. :wink:

Thanks for reply.
0 x

codemonkey47
Gnoblar
Posts: 16
Joined: Wed Dec 17, 2008 6:50 am

Post by codemonkey47 » Sat Dec 20, 2008 9:14 pm

(I've removed it. I don't want to take responsibility over that exporter anymore as I no longer use it.)
Wait, which exporter are you talking about? The Blender exporter is still being developed, isn't it? Or is this a different exporter you're talking about?
Last edited by codemonkey47 on Sat Dec 20, 2008 9:32 pm, edited 1 time in total.
0 x

User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: Princeton, New Jersey, USA
Contact:

Post by nikki » Sat Dec 20, 2008 9:26 pm

codemonkey47 wrote:
(I've removed it. I don't want to take responsibility over that exporter anymore as I no longer use it.)
Wait, which exporter are you talking about? The Blender exporter is still being developed, isn't it? Or is this a different exporter they're talking about?
I think he's talking about the old one in the other thread.
0 x

User avatar
Rasengan
Halfling
Posts: 46
Joined: Sun Jul 13, 2008 12:21 pm
Location: Brussels

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by Rasengan » Wed Dec 24, 2008 2:12 pm

It is possible to export multiple texture units (with sizeX,Y,Z and blending mode) when selecting Rendering materials?
There is only one textue unit defined in the output material file.
0 x

User avatar
Rasengan
Halfling
Posts: 46
Joined: Sun Jul 13, 2008 12:21 pm
Location: Brussels

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by Rasengan » Mon Dec 29, 2008 2:56 pm

Looking the python script, it seems that only the selected texture unit is exported in the material when choosing "Rendering materials".
I'l try to update the code to export all "defined and checked" textures. I'l post the result when it's done.
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by lf3thn4d » Wed Dec 31, 2008 6:22 am

nikki wrote:
codemonkey47 wrote:
(I've removed it. I don't want to take responsibility over that exporter anymore as I no longer use it.)
Wait, which exporter are you talking about? The Blender exporter is still being developed, isn't it? Or is this a different exporter they're talking about?
I think he's talking about the old one in the other thread.
Actually, I'm meaning the dot scene exporter. I used to package it together with the export script. However I've decided not to put it in anymore as I don't want to deal with maintaining that.
Rasengan wrote:Hey everybody, is there any way to set a name for a submesh in Blender and getting it in Ogre Engine?
It's not usefull at all to manually set it in the xml files. :wink:
Thanks for reply.
It might be possible. I'm not sure. Maybe use the vertex group name. I need to have a look into it.
Rasengan wrote:Looking the python script, it seems that only the selected texture unit is exported in the material when choosing "Rendering materials".
I'l try to update the code to export all "defined and checked" textures. I'l post the result when it's done.
Awesome :) Thanks for attempting :) Material export for that mode and the game engine mode is rather neglected as I'm not familiar with it's implementation. Personally I find it some what of a hack. I prefer the Custom Material method where one uses a defined material template.

P.S. About the blender version compatibility problem, I think I'll just leave it alone for now. I've already got my hands full as it is. Besides, the next major version of blender is going to have a whole new API which means more porting for me to do. :( However it's for the better. So I'll leave the versions stuff till later. :) Dabien guys, please don't sue me. :P
0 x

User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: Princeton, New Jersey, USA
Contact:

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by nikki » Wed Dec 31, 2008 8:15 am

lf3thn4d wrote:Actually, I'm meaning the dot scene exporter. I used to package it together with the export script. However I've decided not to put it in anymore as I don't want to deal with maintaining that.
Oh. I guess you should specify, or people will get confused. :wink:
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by lf3thn4d » Fri Jan 02, 2009 9:56 am

Yeah you're right. Sorry about that. I reordered the line to the end of the paragraph. Hopefully this will be better. :)
0 x

rafapack
Gnoblar
Posts: 2
Joined: Sun Jan 04, 2009 1:59 pm

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by rafapack » Sun Jan 04, 2009 2:08 pm

Hi, I'm using the blender exporter, but It seems that it doesnt handle object scaling. I mean, if I have a cube with scaling (1,1,1) and scale to (0.2,1,1) the .mesh.xml are the same (except by the object name)... Thanks.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by jacmoe » Sun Jan 04, 2009 2:21 pm

rafapack wrote:Hi, I'm using the blender exporter, but It seems that it doesnt handle object scaling. I mean, if I have a cube with scaling (1,1,1) and scale to (0.2,1,1) the .mesh.xml are the same (except by the object name)... Thanks.
Of course it is! :)
If you forgot to CTRL+A - apply size / rotation.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

rafapack
Gnoblar
Posts: 2
Joined: Sun Jan 04, 2009 1:59 pm

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by rafapack » Sun Jan 04, 2009 2:50 pm

Thanks jacmoe :D but now all objects seems to be centered at (0,0,0). I'm exporting more than one object, that are at differente locations. I'd like each object at respective blender position. I suppose that each vertex is exported as local coordinates, instead of global coordinates :roll:
0 x

User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: Princeton, New Jersey, USA
Contact:

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by nikki » Sun Jan 04, 2009 6:27 pm

Think of a Blender Object as an Ogre SceneNode. It holds the position and scale etc., but it holds a Mesh for what it looks like. The Blender Exporter exports this mesh. So, it looses the global coordinates/external scale etc. The correct way to scale would be to go to edit mode and and then scale the mesh with TAB.

Now, if you want the meshes to be permanently offsetted from their positions (the Mesh itself has vertices at the offsetted position), then just put all the stuff at (0,0,0) in Object mode. Then, in Edit mode, move 'em around.

The other way is to use a scene description format such as .scene or your own.

No, the exporter is not meant to export offsetted positions. I myself have one .blend file with all my meshes, and when I export this, I want vertices in model (Blender-Object) space because the model-position-specifiying is the job of a scene-exporter.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by jacmoe » Sun Jan 04, 2009 6:39 pm

What Nikki is spending so many words on is actually pretty simple:

Export your meshes using the meshes exporter, which is the one you've got now.

Export your scene using the scene exporter, which is one you can grab from the ogreaddons/SVN-repository:
http://ogreaddons.svn.sourceforge.net/v ... eexporter/

And happy blendering. :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: Princeton, New Jersey, USA
Contact:

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by nikki » Sun Jan 04, 2009 7:29 pm

jacmoe wrote:What Nikki is spending so many words on is actually pretty simple
Well, yeah, but I wanted to make sure he gets "why there are so many exporters". ;)
0 x

johnDonson
Gnoblar
Posts: 6
Joined: Wed Jul 02, 2008 12:46 pm

Re: Latest Blender Export Script [Sat Dec 20, 2008 - v1.1]

Post by johnDonson » Mon Jan 05, 2009 3:51 am

Hi, and many thanks for the work you've put into the exporter. The code looks pretty fancy. One question though, Is it possible that I'm getting skeletons of version 1.1.0 which Ogre 1.6 cannot read?
I've posted it already here http://www.ogre3d.org/forums/viewtopic. ... 74#p322274 but that one is marked as SOLVED and kinda dead, and this one is so alive... hope you don't mind the mess ;)

Thanks for your help.
0 x

Post Reply