Re: [Misfitmodel3d-help] Loading skeletal anim data
Brought to you by:
kworces
From: Filip J. <fi...@bl...> - 2006-03-25 19:35:19
|
On Tue, 21 Mar 2006, Kevin Worcester wrote: >> AFAICT, for a joint, each frame's rotation is not relative to the previous >> frame. But what is it relative to? > > I had to look it up to be sure (setCurrentAnimationTime)... Each > keyframe is relative to the original position of the joint. So if > frame 3 is 25 degrees and frame 5 is 35 degrees, the total rotation > relative to the original orientation at keyframe 5 is 35 degrees. Ok, it seems I've got this part working now. >> stance (unanimated model)? And if no data is given for a joint in a frame >> - does that mean I should keep rotation from the last time it was given? > > Keyframes should be interpolated between each explicitly set value (so > in the example above, the rotation in frame 4 would be 30 degrees). Right. > The end of the animation is a special case that you'll need to handle > in whatever way makes the most sense for your application. In MM3D, if > the animation is set to loop interpolation wraps back to the first > explicitly set keyframe for that joint in the animation. If the > animation is not looping, the last explicitly set keyframe is the > final translation or rotation for the joint. Well - the problem I have is with the first frame. If no rotation is given for a joint in the first frame, is it supposed to just inherit its parent, or should it interpolate between the last frame and the next frame (assuming looping)? And for joints who does not get any rotation value during the animation? Also, I have different problems depending on which version of mm3d originally created the animation. Animations originally created with mm3d-1.0 do the strangest things (I believe this depends partly on the fact that the joints are heavily rotated on load of the skeleton, but I'm not sure.) Some of the artifacts I get make it seem as if I have suffered from a gimbal lock induced error (legs that rotate around the y-axis instead of the x-axis). Oh well. Cheers! /Filip |