Re: Smooth animation
- From: "Peter Oliphant" <poliphant@xxxxxxxxxxxxxxxx>
- Date: Mon, 28 Nov 2005 11:54:30 -0800
Just a guess, but there are two ways of writing an animation engine. One is
called 'frame based' and the other 'time based'. The difference between the
two only occurs when a frame can't be drawn fast enough to be done before
the next frame is to be drawn. When this happens the two methods deal with
the problem in different ways.
'Frame based' methods will drop frames or show every frame. In the first
case the animation can look jerky due to missing frames. In the latter case
the animation is smooth, but the animation will be slower than realtime
(e.g., a system intending to be 15 frames-a-second will take longer than a
second to show the 15 frames).
'Time based' methods figure out how long it has been since the last frame
was drawn and then figures out what the graphics should look like after this
amount of delta time has occurred. For example, if 1/10 of a second has gone
by since last frame was drawn then objects being animated are computed as to
there position 1/10 second after they were drawn last and then rendered in
that position. This method tends to provide far smoother visualizaton of the
animation since the animated objects are always drawn where they should be
for the time (i.e., it preserves realtime). This method can be roughly
thought of as dropping 'partial-frames', since the time between frame
updates need not be constant, and so if 1.5 frames of time has transpired
then it drops 'half a frame' and shows the object in its correct location
for the time. Frame based would either have to drop this frame (and
therefore look late) or show the next frame (and therefore look early).
Thus, its possible your animation method is frame based. This would cause
jerkiness due to the object not being rendered in its 'realtime' position,
but rather in what is thought of as its 'next' position. If the 'next
position' is shown late or early, this causes jerkiness due to the
observer's experiencing the object visibly as not being where it mentally
And if that didn't confuse you, nothing will...lol : )
"Matt Jack" <mathieu_gdal@xxxxxxxx> wrote in message
> Dear all,
> I have a problem my my 3D app, I have tried to simplify the problem, and
> felt into working back on the tutorials. Here is the problem :
> I am working with the DirectX SDSK tutorial No6.
> Instead of making the tiger rotate, I make it translate horizontrally on
> the screen.
> The problem : this animation is not smooth.
> In spite of it is fast (more than 100 Fps), it looks like the tigers stops
> very shorty twice or more per second. It is not easy to see it, but it
> really gives the feeling that the app is not "smooth".
> - I have try to display the app fullscreen, same problem.
> - I have tried to set 2 to the Backbuffercount (Tom Millers says in his
> "Managed DirectX 9 Graphics &game programming", that wotking with
> backbuffer ocunt > 1 will improve "fluidity"), without result.
> - In fact, I have tried all the parameters without successs
> - I have also tried to turn off almost all the processes working on my
> machine... No result.
> - I have tried on another machine, with another graphics card (mine is
> NVidia 6x, the other is an ATI). Same result!
> Does anyone has encoutered the same problem?
> Is there a trick to avoid it?
> In advance, thank you!
- Smooth animation
- From: Matt Jack
- Smooth animation