Problem With Character Animation

Started by
4 comments, last by BlackBrain 9 years, 9 months ago

Hello .

Finally I have Skinned Animation in my engine but there is a weired problem that I am getting . I use Assimp.Net to load meshes and animations. The Problem is that the animation is played mirrored. I mean for example the animation of the left hand is playing on the right hand and vice versa . I used 3dsMax to create a simple test and exported it to COLLADA format. What do you think the problem is ?

Is it from my code ?

Advertisement

first (there is a lot to it, nothing easy), try to load the mesh that gets manipulated by bone matrcies without bone matricies- it will appear refering to spaces missconception of your aplication and of the exporter/producer defined space. You should see the same mesh- but the actual right is actual left (or top bottm...), thus not spottable.

I will omit a lot of stuff, but switching from a space where any of the "base vectors=axis" is replaced-refit, cannot be done by symetric transformation (rotaion and translation).

You will have to use an (inverse) scaling over the bone matrcies transformation..

Go to your modeling program and spectate/analyze base axises defintion, than compare them to your aplication's space axises. If they are not the same layed out, you must perform asymetric transformation over bone matricies.

very likely using an identity matrix of -1 instead of 1 on the conflicting axis after the bone transformation .

Or you can maintain the same synchronized axises of your aplication space towwards model space, but that is not just viable and prefered

maybe it could be left haned to right handed. 3ds max is right handed.

maybe it could be left haned to right handed. 3ds max is right handed.

you can transform this fact, toward of your need. You do not need to synchronize base axises as they are made of production. Just apply asunchronous inverting transformation after all of model space deeds. Like including post multyplying needed (asynchronus) transformation towards the very bone one.

(Oh, I must flip z axis to be x axis) = asyncrhnous standard post multiplication of all transformations.

.... in otehr words. if someone dances good, yet you want to dance with the inverse hand, what do you do? flip mirror tranformation afetr his deed... it is all there.

(imagine yoy can control your left hand and your girl is on your right hand, but, yet, you are able to issue stuff to your left hand only! and after it all has been issued to the left hand holding your girl, your right hand can perform will of your left hand if you refelct it, and that is the hand that pleases your girl)

You can import your data with a MakeLeftHanded flag in your ReadFile call (see Assimp info) and Assimp will convert most of the data for you. Depending on how you've implemented your hierarchy, you may have to change the winding order of triangles, transpose node offset matrices, etc.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

By Using MakeLeftHanded , It fixed the problem. I had already transposed all of matrices Because I am using row major matrices but Assimp uses Coloum major matrices.

Thank you everyone .

This topic is closed to new replies.

Advertisement