Manually rotate joints

Started by Neo, January 08, 2013, 01:00:56 PM

Previous topic - Next topic

Neo

What is the simplest way to rotate joints manually with the bones api?

Currently i'm using JointChannel/SkinClip/SkinClipSequence which works fine. But i'm reading the ogre bones.xml manually for this purpose, because i didnt managed to get the correct roations and translations from the binding matrices so far. Where is the joints binding matrix calculated?  While merging the two xml files or does this happens through the other used apis?

raft

have a look at ProceduralAnimationSample, it does manually rotate joints.

Quote from: Neo on January 08, 2013, 01:00:56 PM
Where is the joints binding matrix calculated?  While merging the two xml files or does this happens through the other used apis?
If you are asking bind pose matrices, they come from mesh.xml file and stored in Joint class. animation is applied to SkeletonPose class which in turn deform mesh

Neo

Thanks for your help and quick response. Now i do it like you did in the ProceduralAnimationSample.targetJoint(...) and calculate my quaternion out of euler angles (because i dont want to set the order of the rotations)  like this:
   http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
it seems that this is not as fast as before but it works and i dont have to load the skeleton.xml manually.

Yes, i ment the bind pose matrices. Are they generated while use the jmeOgre2Bones script or while loading the file?

Cheers and big up for Bones:)

raft

jmeOgre2Bones script is just a wrapper for JMEOgreImporter class. it does not do anythting itself.

bind pose matrices are loaded from file by JME loader and copied to Bones. but why are you asking this, does it make any difference who or what loads them?