Exported mesh properly but animation is very off

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
User avatar
SpagatoniJones
Gnoblar
Posts: 3
Joined: Sat Dec 04, 2004 3:07 pm
Location: Winter Park, FL

Exported mesh properly but animation is very off

Post by SpagatoniJones »

After running into problems using the 3ds max exporter for the mesh I grabbed the scripts off the server to fix the exporter and the mesh looks perfect but the animations are acting very very crazy.

Image
The way it looks in max

Image
The way it is rendered

So to say the least I have no idea what is going on. Is there a problem with animation in the exporter? Or is my modeller doing something wrong that maybe one of you know about?

Thanks for your time and any assistance.

Jon
User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France

Post by Banania »

What the hell is happening with animations these days ? You are the second one to report a problem like this and in all the tests I did, I never encountered something like this.

Can you give some details about your character ?
Banania
User avatar
SpagatoniJones
Gnoblar
Posts: 3
Joined: Sat Dec 04, 2004 3:07 pm
Location: Winter Park, FL

What kind of details?

Post by SpagatoniJones »

If you could clarify what you want detail wise that would be awesome. I may or may not be able to answer. If you want I could give you the max file and you could see for yourself.

Jon
User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France

Post by Banania »

By details, I mean ... details :oops: . In fact, I don't really know what I am looking for in a case like this so anything that might (or might not) seem relevant : Bones or Biped ? Usage of IK ? Scaling of Bones ? Mirroring of Bones in creation ? ....

Well, of course, the model itself is a very valuable 'detail'.

So, if you want, bananuphe(AT)hotmail.com
Banania
SiW
Gnoblar
Posts: 2
Joined: Thu Jan 13, 2005 7:42 am

Post by SiW »

I've just started with Ogre, and did a couple of test exports from max. What I found was that for a typical Biped animation, several bones would just be rotating in crazy ways in Ogre, unless I made the keyframe sampling quite fine.
User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France

Post by Banania »

I noticed that kind of behaviour before. You should be able to correct that by using spherical interpolation for rotations.
Banania
User avatar
SpagatoniJones
Gnoblar
Posts: 3
Joined: Sat Dec 04, 2004 3:07 pm
Location: Winter Park, FL

Seem to have fixed the animation

Post by SpagatoniJones »

I have no idea what spherical interpolation for rotations is exactly but I had my artist revert back to the models original scale and it works perfectly. I don't know if that is the perfect fix at the moment but it does work. If you could explain or point me in the direction to understand what you mean by spherical interpolation for rotations that would be awesome. Thanks for all the help I appreciate it a lot.

Jon
User avatar
Banania
Gremlin
Posts: 150
Joined: Wed Oct 20, 2004 2:35 pm
Location: Paris, France

Post by Banania »

I don't know if that is the perfect fix at the moment but it does work
If it works then it really is perfect. If you have some information on what causes this behavior (now or later), let me know. I need to reproduce it myslef to really understand what is going on.

About the spherical interpolation, I was answering to SiW but you might find that usefull anyway. There are two ways to interpolate rotation between keyframes : linearily or using the quaternions' interpolation technique called slerp. Whatever.... What you need to know is that spherical interpolation is more precise than linear but has a cost in performance terms. The default technique in Ogre is linear. In most cases, you won't see the difference. However, if some bones start to rotate strangeley, suddenly rotating in the wrong way for a short time then rotating in the good way again, then you might want to change.

This is done in the code using SetDefaultRotationInterpolationMode() or on a per animation basis using Animation::SetRotationInterpolationMode().

Well, the functions names might be a little off but you get the idea.
Banania
rmmt
Gnoblar
Posts: 23
Joined: Sun Apr 03, 2005 7:14 am
Location: Philippines

Post by rmmt »

Did you mirror copy you bones?
Ramon Miguel M. Tayag