PDA

View Full Version : How do you make a character rotate more than 360 degrees?


GeoffClark
07-29-2006, 01:56 AM
Okay,
Basic question here. I have a character that is performing a turn-around backswing move.
at the end of the move, his pelvis control has rotated to -456 degrees on the Y axis. If I were to use a script that pastes in his starting pose, it would set him back to about -24 degrees, which would spin his whole body around in a horrible way. BUt, I don't want that, I want him to go straight to his rest 'idle' pose, which is a closer position than that.

THe same problem would occur if you animated a rotated sphere around a full revolution, then pasted in the first key to the last frame.

So, I was able to get a better result by baking the curve to a key every frame, then switching to quaternian Interpolation. The rotation takes the closer path to the position.

Should I just make my rig use Quaternian by default or what?

How do others deal with this issue? Especially in game pipelines. Obviously, Characters perform spins all the time in games.... Please Share.

Thanks,
GEoff

GeoffClark
07-31-2006, 04:17 PM
Okay, with much more playing around, I derived a solution. I'll answer my own question in case someone else has run into this problem.
(1) In the first image you can see the original curve, which goes past the -360 degree mark. If I were to go back to the first frame's idle pose, the pelvis will go back around the full revolution that it had already travelled.
(2)I just Baked the channels of the object I wanted to fix, then switched them to sychronized quaternion Interpolation. That's the second image. You'll see all the weird jagged inter-frame values that this creates.
(3) Switch back to Synchronized Euler. This fixes all the weird jaggies. That's the 3rd image. You'll also see that part of my problem is that the values still went past the -90 degree cutoff zone that Quaternion interp creates. So all I had to do was delete this little hangover and the value is very close to my first frame's value.

feel free to chime in if you have any thoughts.

Geoff

thehive
08-02-2006, 07:39 PM
is there any poping in the rotation when you bake then do you conversion?

GeoffClark
08-03-2006, 01:50 AM
I didn't get any popping after I baked and went to Quaternion. But there were hella jagged values that were in-between frames. Going back to Synch. Euler got rid of all the jaggies(which would have caused the popping that you are talking about.) Make sure you bake every frame. Don't use the Sparse curve bake option either, it will definately give you pops.

If you don't like the every-frame baking, you can use Simplify curve to optimize it.

Did my solution help you?
Geoff

GeoffClark
08-15-2006, 12:32 AM
I wanted to add a bit more data to this fix. After you perform the switch to Quaternion and back, If you have any controllers, like knee controls that get a portion of the rotation of a 'flipped' object, They are going to be really flipped out as well. It is best to set a keyframe on them where they are in the correct position, then delete their animation from there on. Just start over on them after the switch.

Hope this helps somebody..

CGTalk Moderation
08-15-2006, 12:32 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.