Re: Smooth animation

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
'should' be...

And if that didn't confuse you, nothing : )


"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!
> -Mathieu


Relevant Pages

  • Re: Fade into a Picture Box or Image Control
    ... Joe users old P3 only manages to draw a couple of frames a second and the same animation takes forever. ... Dim StartTime As Long, EndTime As Long, TimeNow As Long ... Where DrawFrame() draw the frame at the given opacity, I prefer doing this rather than cluttering the animation loop ...
  • Re: Sagnac Threads United
    ... I've made minor internal changes to my animation. ... My animation is NOW for a large rotating ring. ... nature of those 'apparent' motions in YOUR ROTATING frame. ...
  • Re: How do I generate an animated pdf file from xfig/metapost
    ... I will post the source code below for an animation that ... I've done which illustrates how an ellipse is constructed. ... This PDF will have each frame of the ... Draw the ellipse dashed ...
  • Re: Flashing a sprite
    ... you've reached the end of the animation, in which case frameIndex would go ... I guess the 2 would be my amount of seconds....but after gametime ... frames display frame 0, x amount of frames display frame 1" etc... ... you could just make a 2-frame animation for your flashing sprite. ...
  • Re: Timing issue
    ... I was advised that the best animation method is to update the animation on a time basis rather than frame basis, which i agree with so that even on varying procesor speds the animation will remain consistent. ... The opinions expressed in this message are my own personal views and do not reflect the official views of the Microsoft Corporation. ...