wes_h
Knuckleheaded Knob
Posts: 530
Lady on Rancho Como
|
Not being the math major sort of guy, I sometimes take a while to puzzle some of the problems involved in writing programs out. My latest problem involves joint rotation values. That is, when you look in the CRES, some of the body (at least) joints come with a non-zero rotation value. Since the joints are linked in a heirarchy, the rotation value from one joint affects the ultimate rotation value of all joints lower down the chain.
These rotations are apllied to the joints by the game prior to any rotation values contained in an animation. Exporting an animation into the game without having the joint movements modified by these values results in things moving, but in the wrong places (the legs go up in the air and the arms come out the front and back).
My latest challenge is how to combine two (or more) Euler rotation values (Roll, Pitch, Yaw) into one. At a minimum I need to combine the joint static rotation with the animation timecode rotation. I am having some problem at the conceptual level on how to approach doing this. Even a pseudocode example may be enough to jumpstart my progress.
Oh, yes, the project I am trying to finish is an animation exporter plugin for MilkShape. Essentially, it is an attempt to allow you to take a mesh and make an animation or export an animation from SimPE (this works in MilkShape ASCII format, but IK animations aren't supported), modify it in MilkShape, and then have the appropriate ANIM file written to disk. I have this completed as far as handling the translations correctly, but the joint rotations are twisted, as described above.
While I will make the source available eventually, I don't hold out much hope that anyone else will actually do anything with it. I have learned enough in this process to do other things, but I am basically lazy, and if I can go from inside MilkShape to ANIM, for body or object meshes, then that is all I intend to produce. People that want support for other programs can learn to program the plugins themselves, I will be happy to show how.
<* Wes *>
|