Archived

This topic is now archived and is closed to further replies.

Cypher19

Tiny's got a case of the jitters

Recommended Posts

So I''ve got an animation setup, using Tiny_4anim.x and the MultiAnimation support, and the animation is working fine except for one thing, and that is that the animation is very jittery. It will advance the time the first frame, then the next frame it will advance the time again, but at the same time move back a short amount of time. Then the next frame will be normal, the next the frame will flip back again. The end result is that it will look like the animation is running twice, slightly out of sync, with each frame swapping between the two, causing a jittery look. Would anyone know what the problem might be? (note: I actually just did some more testing, and the animation actually runs in reverse before advancing forward again. I''m also using DXUtil_Timer for it. What''s most confusing is that the animation literally is running in reverse!!)

Share this post


Link to post
Share on other sites
Greetings!

Direct3D advances animation time local, which means:

if the animation time is set to 0.0 at beggining,
when you call advancetime( 0.1f ):
---> absolutetime += 0.1f -> absolutetime = 0.1f

when you then call advancetime ( 0.5f ):
---> absolutetime += 0.5f -> absolutetime = 0.6f

You could use for 20 frames advancetime(0.001f)
or detect a small factor and try it with an constat factor for the begging.

Dont use advancetime( timegettime() ) or gettickcount().

Share this post


Link to post
Share on other sites
For the advance time I''m saving the result of "DXUtil_Timer(TIMER_GETELAPSEDTIME)" into a float variable, and then using that float for the advancetime function. However, even when I send in a constant I define, it still has that jitteriness to it.

Share this post


Link to post
Share on other sites
Never mind, I fixed it. It turns out that in a simple update that I was doing, I was constantly resetting the keyframe so the animation was trying to reblend to the same animation all the time, resulting in such an odd result.

Share this post


Link to post
Share on other sites