Preview of the next Blender exporter

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 Jul 09, 2008 11:59 am

You're welcome :)

Thanks for the insight. In that case, b-bone should never be used. Ogre don't support this and will never do. It's not a very optimized technique for realtime usage. Looks to me many of the blender's animation features are geared towards movie renders instead of realtime.

Maybe it would be a good thing to have a wiki page describing features of what can be used and what cannot be used in blender for character animations. :)
0 x

eternalSage
Gnoblar
Posts: 24
Joined: Wed Oct 11, 2006 5:19 pm
Location: Johnson City, TN, USA

Post by eternalSage » Wed Jul 09, 2008 6:54 pm

hey guys! this updated script looks awesome. i was having a little trouble though. mainly, i am getting a error that is saying my bounds are not properly defined. i am using the convert-to-.mesh option. i don't get that issue if i just export to xml.

if you guys know anything that might help, it would be appreciated.

EDIT: this is the output of my log file:

14:01:48: Creating resource group General
14:01:48: Creating resource group Internal
14:01:48: Creating resource group Autodetect
14:01:48: Registering ResourceManager for type Mesh
14:01:48: Registering ResourceManager for type Material
14:01:48: Registering ResourceManager for type Skeleton
14:01:48: XMLMeshSerializer reading mesh data from /home/jason/Digital Art/3d files/Blender/brianObjects/OGRE/coin_mesh.mesh.xml...
14:01:48: XMLMeshSerializer import successful.
14:01:48: Reorganising vertex buffers to automatic layout..
14:01:48: MeshSerializer writing mesh data to /home/jason/Digital Art/3d files/Blender/brianObjects/OGRE/coin_mesh.mesh...
14:01:48: OGRE EXCEPTION(2:InvalidParametersException): The Mesh you have supplied does not have its bounds completely defined. Define them first before exporting. in MeshSerializerImpl::exportMesh at OgreMeshSerializerImpl.cpp (line 82)
14:01:48: Unregistering ResourceManager for type Skeleton
14:01:48: Unregistering ResourceManager for type Material
14:01:48: Unregistering ResourceManager for type Mesh
0 x
Player: I Summon a Celestial Dolphin, then cast Shatter to destroy the statue!
Me: Um, why?
Player: So the guard will think it did it, and while he attacks it, we'll get away.
Me: Um...Okay...

lile
Gnoblar
Posts: 4
Joined: Sun Jul 06, 2008 11:13 pm

Post by lile » Sat Jul 12, 2008 6:59 am

great ! I managed to succesfully export the bone driven shape keys into pose animations. It needed to bake the driving bones rotations into real ipos.

There is something that would be really cool. If I knew how to write python I'd do it myself...so that'll be a feature request ^^;

Would it be possible to tell the exporter not to append the name of the armature in the skeleton.xml file name and inside the mesh.xml file ? like a 'append armature name' toggle button, or even a way to specify the file names entirely. That would be real cool and avoid fastiduous post editing ;)
0 x

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

Post by lf3thn4d » Mon Jul 14, 2008 8:18 am

eternalSage: I don't quite understand your problem. It's rather odd to hit that issue. Maybe you need to get a newer xml converter. Some more detail about your mesh would help. :)
lile wrote:great ! I managed to succesfully export the bone driven shape keys into pose animations. It needed to bake the driving bones rotations into real ipos.
Cool :)
lile wrote: Would it be possible to tell the exporter not to append the name of the armature in the skeleton.xml file name and inside the mesh.xml file ? like a 'append armature name' toggle button, or even a way to specify the file names entirely. That would be real cool and avoid fastiduous post editing ;)
Hmm.. you mean to force mesh to not auto target skeleton?
0 x

lile
Gnoblar
Posts: 4
Joined: Sun Jul 06, 2008 11:13 pm

Post by lile » Mon Jul 14, 2008 6:26 pm

I mean, when using the exporter as it is now, with an object named myobject and the armature named Armature in blender, the files are named :

myobject.mesh.XML and myobject-Armature.skeleton.xml

It would be cool if they could be called simply

myobject.mesh.xml and myobject.skeleton.xml
0 x

eternalSage
Gnoblar
Posts: 24
Joined: Wed Oct 11, 2006 5:19 pm
Location: Johnson City, TN, USA

Post by eternalSage » Mon Jul 14, 2008 8:10 pm

actually, i fixed it. it seems the "Game Texture" export option was causing the problems. turned it off (didn't really require it) and it worked. thanks for the answer though. :)
0 x
Player: I Summon a Celestial Dolphin, then cast Shatter to destroy the statue!
Me: Um, why?
Player: So the guard will think it did it, and while he attacks it, we'll get away.
Me: Um...Okay...

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

Post by lf3thn4d » Tue Jul 15, 2008 5:48 pm

lile wrote:I mean, when using the exporter as it is now, with an object named myobject and the armature named Armature in blender, the files are named :

myobject.mesh.XML and myobject-Armature.skeleton.xml

It would be cool if they could be called simply

myobject.mesh.xml and myobject.skeleton.xml
Ah.. hmm yes, that make sense. Maybe I can add a toggle button that will force skeleton filename to follow the mesh name.
0 x

shega
Gnoblar
Posts: 22
Joined: Fri Dec 29, 2006 9:55 am

Post by shega » Wed Jul 23, 2008 11:16 am

hello..
i'm trying to export vertex colour on my model. but nothing exported...it's not showed on the ceguimeshviewer neither in my editor. but it is written on the .material

does it happen because i used the new version of OgreCommandlLineTools?
0 x

DigitalGhost
Halfling
Posts: 62
Joined: Mon Feb 07, 2005 9:47 pm
Contact:

Multiple meshes with the same skeleton

Post by DigitalGhost » Sat Jul 26, 2008 6:03 pm

I have many meshes with the same skeleton (different clothes, accessories, etc), and I want them all to have the same animations. The problem is that right now I have to go through all of them and set the animations for each one so they all match.

How hard would it be to add a button that says "All the selected meshes' animations should match this one"?
0 x

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

Post by lf3thn4d » Thu Aug 07, 2008 4:41 am

http://www.xullum.net/lefthand/download ... atched.zip

Update:
- made new option to make skeleton follow mesh name.
- added an option to disable mesh exporting for cases where one wants to only export materials.

Beside that, I've added an important feature for material exporting: Custom material. This method of exporting uses template files to do it's exporting. This allows project/game specific specialized material exports. Hope this comes in handy for you guys.

I've updated the documentation with all the new features.

shega: To get vertex colour exported, you need to enable "VCol Paint" option in the material.

DigitalGhost: It's not possible right now. I will need to give this some thought.
0 x

shega
Gnoblar
Posts: 22
Joined: Fri Dec 29, 2006 9:55 am

Post by shega » Thu Aug 14, 2008 6:26 am

@lf3thn4d
thanks a lot for the link man. i've succeeded exporting the vertex color, but with vCol light on and game engine material on. i've tried with the Vcol paint on and then export it but nothing happen. got the diffuse vertex colour on the material script, but nothing showed in the meshviewer
0 x

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

Post by lf3thn4d » Mon Aug 18, 2008 8:17 pm

umm.. i'm not exactly sure what you are trying to achieve. But the rendering material mode does not use vertex colour. So you should just use the game engine material instead.
0 x

User avatar
philojustin
Gnoblar
Posts: 4
Joined: Sun Jan 06, 2008 12:09 am

Post by philojustin » Tue Aug 19, 2008 7:06 pm

lf3thn4d, great work and I appreciate you working on this exporter.

I am having a problem with exporting armature animations with deform bones. There are no errors, but the skeleton.xml file does not contain any tracks, as the previous exporter provided. Poses work great, it just the armature deform bone animations which don't.

Here is the start of the animations section when exporting:
<animations>
<animation name="walk" length="0.800000">
</animation>
...

And here is how it used to look:

<animation name="Walkcycle" length="0.800000">
<tracks>
<track bone="Leg.Control_R">
<keyframes>
<keyframe time="0.000000">
<translate x="0.000000" y="-0.219092" z="0.015336"/>
<rotate angle="0.457977">
<axis x="1.000000" y="-0.000001" z="0.000000"/>
</rotate>
<scale x="1.000000" y="1.000000" z="1.000000"/>
</keyframe>
...
I know this is ambiguous (especially with no errors), but was hoping someone might of seen this before.


Thanks
0 x

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

Post by lf3thn4d » Wed Aug 20, 2008 9:35 am

Hi, thanks :)

Does your problem happen on all animated armatures? I can't see why it won't export armature animations. I haven't change anything to break that. If you can construct a simple case for me and send me the .blend file, it'll help a lot. :)
0 x

User avatar
philojustin
Gnoblar
Posts: 4
Joined: Sun Jan 06, 2008 12:09 am

Post by philojustin » Wed Aug 20, 2008 5:43 pm

Thanks for the pm, I figured out the problem when you said you didn't see any key frames (because I knew they were there). It looks like it was because rest position was selected. I selected rest position when doing poses for convenience sakes.

Thanks for all your work and your quick reply's.
0 x

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

Post by lf3thn4d » Wed Aug 20, 2008 6:22 pm

You're welcome. :) Glad to see quite some number of people using blender. :)
0 x

User avatar
pyrokar
Gnoblar
Posts: 6
Joined: Thu Apr 19, 2007 6:16 pm

Post by pyrokar » Thu Aug 21, 2008 11:06 pm

Thanks for the new version of the blender exporter.
I also very much appreciate your working, lf3thn4d.

Keep up the good work :)
0 x

Vylaroth
Gnoblar
Posts: 3
Joined: Sun Aug 24, 2008 8:03 pm

Post by Vylaroth » Sun Aug 24, 2008 8:07 pm

Edit: Solved, nevermind.
0 x

Vylaroth
Gnoblar
Posts: 3
Joined: Sun Aug 24, 2008 8:03 pm

Post by Vylaroth » Tue Aug 26, 2008 7:08 pm

Ach, new problem, I get this Python error when I try to export my mesh and skeleton:

Image

Any idea what's causing this? I modified my armature and mesh a bit but I can't define what caused the exporter to stop working.
0 x

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

Post by lf3thn4d » Wed Aug 27, 2008 6:04 am

Lol. For some reason it seemed that you have got the exporter's config file corrupted.

Try going to the "Text Editor" screen. Look for the OgrePackage.cfg file. Delete it using the x button.
0 x

Vylaroth
Gnoblar
Posts: 3
Joined: Sun Aug 24, 2008 8:03 pm

Post by Vylaroth » Wed Aug 27, 2008 12:43 pm

lf3thn4d wrote:Lol. For some reason it seemed that you have got the exporter's config file corrupted.

Try going to the "Text Editor" screen. Look for the OgrePackage.cfg file. Delete it using the x button.
There's no such file there. Oh well.

I'm having terrible problems with something between Blender -> Ogre Exporter -> Ogre XML converter -> Ogre engine. I've built a skeleton from scratch for a mesh three times now and every time I can export it just fine but when I add animations and try to run the XML converter, it crashes.

Now, my problem is that my model has been modeled into a T-pose but it should be in a sitting pose while there's no animation played. Would it be possible that the exporter assigned Blender's "relaxed pose" as the static mesh?

I've been applying my armature on the mesh and building new skeletons but for some reason the skeleton file ALWAYS crashes in XML converter even though there's not a single thing that links it to the older animation files which could cause problems. The T-posed character works but isn't worth anything since I HAVE TO to get it to the sitting pose as default. May be that I fuck up something in the process of creating a new skeleton but I can't determine what the hell that thing is since I'm doing everything the same way I rigged and animated the t-posed character.

Thanks for all the possible ideas beforehand.

Edit: It seems that my problem was that the XML converter couldn't handle skeletons that had animations which didn't alter the mesh at all (as in blank anims). Problem solved.
0 x

ppClarity
Gremlin
Posts: 194
Joined: Sat Sep 02, 2006 12:27 am

Post by ppClarity » Thu Aug 28, 2008 5:52 am

Ogre 1-6 as of 5 hours ago
Blender 2.4.7

I created a character in makehuman, imported it into Blender, created a lowpoly mesh and used the following technique to generate the normal map: (Object to Object baking)

I exported the mesh and created a new material based on Examples/Athene/NormalMapped replacing the normal map with mine and the texture with a skintone.

It looks great in Blender, but in Ogre the effect is backwards, the abs are sinking into the stomach, the spine is a dorsal ridge. Seams are super apparent in the Ogre rendered model but you need to know where to look for them in the Blender render.

So... what did I miss?
0 x

User avatar
Wasted
Gnoblar
Posts: 19
Joined: Thu Mar 20, 2008 11:50 pm
Location: Poland
Contact:

Post by Wasted » Thu Aug 28, 2008 11:26 am

Hi,
I have detected 2 small bugs(?) with
- Vertex Colours in Ogre does not appear as same as in blender (flipped colour values?).
- Problem with UV channels - No way to select first and export with materials of first UV (needed to apply lightmap). Always last UV was being exported.

Maybe someone else is experiencing same problems, so script after simple correction is here: http://www.sendspace.com/file/d7aqbv

UP: Have you exported Tangents??
0 x
www.wasted.pl << Our games, using OGRE :D

ppClarity
Gremlin
Posts: 194
Joined: Sat Sep 02, 2006 12:27 am

Post by ppClarity » Thu Aug 28, 2008 1:58 pm

Wasted wrote:UP: Have you exported Tangents??
Sure did.

I've tried just about every permutation of the tangent options including using the API function (Dot3Bump sample uses this, btw). Hard to tell, but it looks best with no tangents, but then the lighting gets all messed up.

<sheepish>I'll post the mesh, the material file and the textures when I get home.</sheepish>
0 x

ppClarity
Gremlin
Posts: 194
Joined: Sat Sep 02, 2006 12:27 am

Post by ppClarity » Fri Aug 29, 2008 1:05 am

0 x

Post Reply