Re: Animation loop

[ Follow Ups ] [ Post Followup ] [ Quake2 Modelling Studio WWWboard ]

Posted by Elmek on August 23, 1998 at 20:19:31:

In Reply to: Re: Animation loop posted by ShockMan on August 23, 1998 at 09:16:04:

(warning...long message. Didnt have a lot to do and i think i
got a bit carried away :)

Ofcours you can have a seamless loop in max using
characterstudio. The problem is most likely not that max jumps to
the first frame (doh...thats called a loop :), the first and last
frame should be the same, when exported skip either the last or
the first frame) but the beizer motion control.

Goes like this:

Quake2 has linear interpolation wich means that a object
moving from pos [0,0,0] to [1,0,0] will over the interpolated
frames move in a straith line between these points.

In max interpolation is not only betwen frames but also
interpolation is use between keys, wich means you need some kind
of motion control to calculate these keys. The interpolation in
max (you can use linear as well if you specifiy that as the
current controller of your object or selected key, but normally
you would see a beizer controller for possitions) would in the
same example also take the next occuring key into calculation.

Lets say that the [0,0,0]pos is at frame 0, [1,1,0]pos is at
frame 20, pos [2,-1,0] is at frame 40 and the [3,0,0]pos is at
frame 60. That would produce a beizer motion path like the image

You can see its a smooth path and you can also see that the
tangents of the curves max y possitions are not were you might the specified keys...they are befor and later after
the key. This is all good and would i loose the x possitions then
you would have a looping animation. But now imagine that i have a
key at frame 70 that is just way off far down at [3.5, -4, 0].
Even though the loop you want ends at frame 60 the beizer motion
controller still wants to make smooth curve between key3 and the
new key5 and you can see what happens in the image below. If i
were to loose the x possitions and play the loop 0-60 then you
would see a version of the behaviour you noticed in
characterstudio....a jump or glitch.

Now the reason it might look good in quake2 or a md2 editor
(if you say that these keys are actually frames, frame1,2,3,4
maks the loop) is because to quake2 this motion looks like below
because of the liniear interpolation.

(ignore the last key, rest are the same)

Now to get the loop without any unexpected behavoir like you
explain you want this curve to exit the last frame at the same
angle as it enters the first frame. This is often best achived
by, in the example of a walk animation to simply copy some poses,
lets say you have 4 keys (just to make it simple):

* key copy of key3

key1: plant foot1, back foot2

key2: lift foot2, back foot1

key3: plant foot2, lift foot1

key4: plant foot1, back foot2

* key copy of key2

Now you export the frames between key1 and key4, because of
the copied keys the bezier motion curve would be entering key1 at
the same angle as its entering key4 and leaving key4 at the same
angle as key1 because the both keys have the same keys befor and
after... This is not only good to view the motion in max but also
to eliminate subtile errors that might not stand out to obvious
but stll makes things look a little un-natrual, especially when
your working at low framecounts like the quake2 run animation.

If your asking yourself now what the heck you still would like
to use beizer motion control if its such a hazzle then i suggest
you compare the images sure youll figure it out :)

Hope i didnt bore you all to death ;)


Follow Ups:

Post a Followup




Optional Link URL:
Link Title:
Optional Image URL:

[ Follow Ups ] [ Post Followup ] [ Quake2 Modelling Studio WWWboard ]