next up previous contents
Next: 14.3 Depth of Field Up: 14. Special Effects Previous: 14.1 Dissolves with Stencil

14.2 Motion Blur

This is probably one of the easiest effects to implement. Simply re-render a scene multiple times, incrementing the position and/or orientation of an object in the scene. The object will appear blurred, suggesting motion. This effect can be incorporated in the frames of an animation sequence to improve its realism, especially when simulating high-speed motion.

The apparent speed of the object can be increased by dimming its blurred path. This can be done by accumulating the scene without the moving object, setting the value parameter to be larger than 1/n. Then re-render the scene with the moving object, setting the value parameter to something smaller than 1/n. For example, to make a blurred object appear 1/2 as bright, accumulated over 10 scenes, do the following:

1.
Render the scene without the moving object, using glAccumGL_LOAD,.5f(GL_LOAD,.5f).
2.
Accumulate the scene 10 more times, with the moving object, using glAccumGL_ACCUM,.05f(GL_ACCUM,.05f).

Choose the values to ensure that the non-moving parts of the scene retain the same overall brightness.

It's also possible to use different values for each accumulation step. This technique could be used to make an object appear to be accelerating or decelerating. As before, ensure that the overall scene brightness remains constant.

If you are using motion blur as part of a real-time animated sequence, and your value is constant, you can improve the latency of each frame after the first n dramatically. Instead of accumulating n scenes, then discarding the image and starting again, you can subtract out the first scene of the sequence, add in the new one, and display the result. In effect, you're keeping a ``running total'' of the accumulated images.

The first image of the sequence can be ``subtracted out'' by rendering that image, then accumulating it with glAccumGL_ACCUM, -1.f/n(GL_ACCUM, -1.f/n). As a result, each frame only incurs the latency of drawing two scenes; adding in the newest one, and subtracting out the oldest.


next up previous contents
Next: 14.3 Depth of Field Up: 14. Special Effects Previous: 14.1 Dissolves with Stencil
David Blythe
1999-08-06