Game Development Community

Cyclic rotating animation. (?) Maya2DTS (maybe others)

by J. Alan Atherton · in Torque Game Engine · 10/05/2004 (9:21 pm) · 3 replies

I am trying to create a rotating gear. That's all. Just a DTS with a rotating gear. My first attempts were really bad, and after a few attempts I've got it to almost work. I am using Maya, though I think this applies to exporters generally.

The first problem is that the animation rotates the gear 360 degrees, then pauses for 1 second, then rotates 360 degrees, etc. This is very undesirable for what I am trying to achieve. The second problem is that the animation plays at lightning speed. I created the animation over 300 frames, so it should take 5 second per revolution, right?

I will describe how I created the animation. In the first frame, I set a key in the usual position. At frame 100, there is a key with the gear rotated 120 degrees. At frame 200, there is a key with the gear rotated 240 degrees. At frame 300, there is a key with the gear rotated 358 degrees (for cyclic motion). At frame 301, there is a duplicate of frame 300's key. I added the final keyframe because when "cyclic animation" was enabled, the last key was discarded, and only 2/3 of the animation was exported.

I followed Danny Ngan's tutorial on simple shape animation in Maya, and the bouncing ball works wonderfully. I mimicked the parameters for my gear, with the only difference being the actual shape, the keyframes, and the sequence time range (0-301 instead of 0-30).

What am I doing wrong?
Many thanks!

#1
10/05/2004 (10:47 pm)
You shouldn't need to create so many keyframes. First, at frame 0, set a rotation key for 0 degrees. Then, at frame 300 (or whatever frame you want), set a rotation key for 360 degrees. Create a sequence node, set your start and end frames, rename the sequence node to make it easier to find later (Sequence_gearRotate, for example). Leave everything else at the defaults. Export the shape with animation. It'll loop fine in the show tool.

If this doesn't work for you, email me and I'll send you a sample file.
#2
10/06/2004 (10:22 pm)
We figured out the problem. It turns out the pausing problem was related to the framerate. Make sure it's 30fps in Maya!
The lightning-speed problem was a parameter called "override duration". That was set to 1 by default, but when set to -1, it shows up as I animated it. That's all there was to it. Thanks, Danny!
#3
10/07/2004 (7:05 am)
The current version of the dtsUtility properly sets the override duration default to -1, which is off.