max exporter doesn´t export bones scaling...

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
rode
Gnoblar
Posts: 6
Joined: Tue Jun 15, 2004 4:29 pm
Contact:

max exporter doesn´t export bones scaling...

Post by rode »

Hi!
I´m trying to export a character animation, a deformation using bone scaling, and I see the 3dsmax exporter can export the bone movement but not the scaling.
Can anybody help me?!
rode
Gnoblar
Posts: 6
Joined: Tue Jun 15, 2004 4:29 pm
Contact:

non-uniform scale

Post by rode »

I forgot to say I scaled the bones with non-uniform scale, meaning just in one axis. Does the exporter suppport this?
User avatar
TheGilb
Halfling
Posts: 71
Joined: Sun Oct 06, 2002 11:19 pm
Location: UK
Contact:

Post by TheGilb »

When you did a non-uniform scale, then you need to reset the bone Xform (transform). Then when you export, the transform will too. Gotta love Ogre ;-)
rode
Gnoblar
Posts: 6
Joined: Tue Jun 15, 2004 4:29 pm
Contact:

no scaling info..

Post by rode »

Hi!
I reset the Xform of the bone but nothing changes (I must say I had already reset the transformations of the bones before animating). I looked into the skeleton xml file and there´s no scaling info. There´s not even a tag for scaling..
??
Why is that?
thanks for your replies! I preciate the help a lot!
rode
Gnoblar
Posts: 6
Joined: Tue Jun 15, 2004 4:29 pm
Contact:

code...

Post by rode »

Here´s the code I got in the skeleton xml file, from a simple non-uniform scaling of a bone for deforming a sphere mesh:

<skeleton>
<bones>
<bone id="0" name="Bone01">
<position x="0.0" y="0.0" z="0.0" />
<rotation angle="-1.5708">
<axis x="0.0" y="0.0" z="-1.0" />
</rotation>
</bone>
<bone id="1" name="Bone02">
<position x="70.0" y="-1.14044e-005" z="3.0598e-006" />
<rotation angle="0.0">
<axis x="0.0" y="0.0" z="1.0" />
</rotation>
</bone>
</bones>
<bonehierarchy>
<boneparent bone="Bone02" parent="Bone01" />
</bonehierarchy>
<animations>
<animation name="test" length="1.0">
<tracks>
<track bone = "Bone01">
<keyframes>
<keyframe time="0.0">
<translate x="0.0" y="0.0" z="0.0" />
<rotate angle="0.0">
<axis x="0.0" y="-1.0" z="0.0" />
</rotate>
</keyframe>
<keyframe time="1.0">
<translate x="0.0" y="0.0" z="0.0" />
<rotate angle="0.0">
<axis x="0.0" y="-9.67292e-007" z="-1.0" />
</rotate>
</keyframe>
</keyframes>
</track>
<track bone = "Bone02">
<keyframes>
<keyframe time="0.0">
<translate x="0.0" y="0.0" z="0.0" />
<rotate angle="0.0">
<axis x="-4.76837e-007" y="1.0" z="0.0" />
</rotate>
</keyframe>
<keyframe time="1.0">
<translate x="0.0" y="0.0" z="0.0" />
<rotate angle="0.0">
<axis x="0.0" y="0.0" z="1.0" />
</rotate>
</keyframe>
</keyframes>
</track>
</tracks>
</animation>
</animations>
</skeleton>

I hope you can help me to find the problem.. :D
User avatar
TheGilb
Halfling
Posts: 71
Joined: Sun Oct 06, 2002 11:19 pm
Location: UK
Contact:

Post by TheGilb »

It's coz bone animation basically equates to a bunch of matrices. The matrix represents the bone position and rotation in a single 3x3 structure, no scaling information is included because of tight memory budgets. Animation can quickly fill memory up if not stored in efficient structures.

Anyway, I'm sorry I dont have the right answer for you! It is now that I reffer you to the 3dsmax video tutorials in the sticky thread of this forum. They're very concisive and I'm sure he used non-uniform scaling on the bones...
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Ogre uses a 3x4 structure for bones, which can contain both translation, rotation and scaling information.
(it's basically a 4x4 matrix with the last row which is always "0 0 0 1" removed)

I have no idea how the bone scaling is represented in the xml file though.
rode
Gnoblar
Posts: 6
Joined: Tue Jun 15, 2004 4:29 pm
Contact:

anybody can help me please?!..

Post by rode »

I don´t really know about programming and honestly I don´t care about how the info is coded since I´m an animator!! :D . I was just curious about where is the scale info in the xml file because I can´t export the scale animation with the max exporter.
I donwloaded the tutorilas you said from http://www.arica3d.com/AnimateTutorial1/ but it seems there´s no scaling example there.
I´m just wondering why I can´t export a simple scale animation, althought the traslation and rotation info are well exported.
I want to animate a "ball-shape" character bouncing, so I need to make the ball deformation. That´s what I need the scaling for.

I´m sure I saw in the past some info about a patch for using non-uniform scale in max exporter in these forums.. but I can´t find anything about that now..
Thanks a lot for your replies guys!.. but I need more help :(
rode
Gnoblar
Posts: 6
Joined: Tue Jun 15, 2004 4:29 pm
Contact:

Simbad

Post by rode »

Can anybody contact Simbad? I´m sure he´ll know about this...
User avatar
eugen
OGRE Expert User
OGRE Expert User
Posts: 1422
Joined: Sat May 22, 2004 5:28 am
Location: Bucharest
x 8
Contact:

Post by eugen »

can we get the exporter's code from somewhere?! just to check what is going on in there...
Matsyv9
Gnoblar
Posts: 17
Joined: Tue Jun 21, 2005 9:51 pm
x 1

Post by Matsyv9 »

I thought the exporter was in max script... Or is this a different exporter?
Post Reply