Personal tools

Motion Blur

From Bunkerwiki

Jump to: navigation, search

What is Motion Blur

Motion blur is an effect you will see in photographs of scenes where objects are moving.
It is mostly noticeable when the exposure is long, or if objects in the scene are moving rapidly.


Why does it happen

A camera works by exposing a sheet of light sensitive film to a scene, for a short period of time. The light from the scene, hitting the film, causes the film to change chemically, and eventually results in a picture representation of the scene. This is known as an exposure. If the scene changes during that exposure, a blurred image will result.

Why should you bother

You will see motion blur to some extent in almost every film and TV program. It is likely, however, that you will not notice it.
Like many artifacts of photography, you only usually notice it's absence, and it's presence gives an air of realism.

For example, you may have seen that lens flare has become a popular effect recently.
Traditional photographers often try to reduce it's effect, but since we recognize it as an artifact of reality, computer graphicians make the effort to simulate it.
The same goes for the grain on film, the wobble of a camera being held in the hand or mounted on a helicopter, focus effects, and many others.

Take a look at some computer animations that do not contain rendered motion blur, and you will see that fast movement looks jerky and unrealistic.
You might also notice this effect in TV coverage of sporting events.
Whereas most TV programs are filmed with cameras that take about 25 frames per second, sporting cameras can take up to 1000 frames per second, giving excellent sharp slow motion replays.
However they broadcast only a small fraction of these frames, which reduces the amount of motion blur, and so fast moving objects seem to flicker.

We are all so used to seeing motion blur in TV programs and films, that to see motion without it looks a little unrealistic.
The lack of motion blur is one of the (many) reasons that computer generated animation can look unreal.
This lack of realism is caused by the sharpness of motion in computer animations is quite noticeable, and can really spoil the effect.

Additionally, an image with motion blur holds more information that one without. Compare these two images:

Blurfore‎ Blurside

These two frames show identical scenes, but one is taken from an animation where the camera is travelling forwards quickly, in the other, the camera is moving to the left. Is should be obvious which is which. During an animation, your brain will notice this extra information, the motion will appear smoother, and the final effect will be a more realistic animation.

In more detail ? We will consider how a movie camera takes pictures of a moving scene.

A movie camera consists of the following parts:

  • Lens
  • The lens focuses the light onto the film Shutter
  • The shutter opens for a fraction of a second to allow light onto the film
  • The film contains light sensitive chemicals. These chemicals record the pattern of light falling on the film.
  • This can then be used to create an image of the scene.

The image on the right shows a stationary red sphere being filmed by a movie camera. Just the three important parts of the camera, the Lens, Shutter and Film are shown.

You can see that the shutter is open, letting light onto the film.
If you look at the film, you will see the two previous frames that have been exposed, and the current frame being exposed. That frame is slightly darker than the other two, as the shutter has only been open for a short time (a small fraction of a second).
In another fraction of a second, the shutter will close again, leaving that frame fully exposed, and as bright as the other two. After the shutter closes, the film will move down a bit to ready the next frame for exposure.
The shutter will then open again, and the process repeats many times a second.

sphere being filmed

This image shown the same thing happening again. This time however, the sphere is moving quickly in the direction of the arrow.
The shutter opens, and the image begins to form on the film. However, while the shutter is open, the sphere is moving. This movement causes the image on the film to be blurred. This is known as motion blur. Now, I'd be willing to bet that if you looked at any one of those motion-blurred frames, you would be able to guess that the sphere was moving horizontally when it was filmed.
A frame with motion blur carries more information than a frame without.

sphere is moving in direction of arrow

Creating the effect of Motion Blur

Spatial anti-aliasing

You may well be familiar with one method of anti-aliasing, known as super sampling. This method involves rendering an image much larger than you want it, then reducing the size by averaging groups of pixels into one. I will take you through the method of creating anti-aliased images first, because creating motion blur is very similar.

For example, to render an anti-aliased image of a red circle, at a resolution of 50x50:

Render too many pixels

Render too many pixels

You would first draw an un-anti-aliased circle at a higher resolution. In this case, I have chosen a resolution of 200x200, which is four times too big in each dimension

Divide the image

Divide the image

Then, imagine dividing the image into little squares. Since this high resolution image is 4 times too big, we choose each little square to be 4x4 pixels in size.



Now, for each little square, take the average values of all the pixels inside it. Fill the little square with that average value.



Finally, resize the image down to 50x50. And there you have it. One anti-aliased red circle.

Now, a similar thing can be done to achieve motion blur. The method for creating smooth images is known as Spatial Anti-aliasing (means smoothing out space), and the method for creating smooth motion in animations is known as Temporal Anti-aliasing (means smoothing out time).

Temporal anti-aliasing

Now, a similar thing can be done to achieve motion blur. The method for creating smooth images is known as Spatial Anti-aliasing (means smoothing out space), and the method for creating smooth motion in animations is known as Temporal Anti-aliasing (means smoothing out time).

It is analogous to the method used to anti-alias images.

Render too many frames

Just as you rendered the images much larger to start with, so you should also render the animations much longer. For example, to create a 4 second animation with 100 motion-blurred frames, you might begin by rendering 400 frames. These 400 frames would cover the same 4 seconds, but would occur 4 times more frequently in time.

For example, on the left, you can see that frames have been rendered 1/100th of a second apart.

Divide the frames

Next, take groups of 4 frames


and mix them together evenly.


You now have a 25 frames per second animation. The motion-blurred frames on the right are 1/25th of a second apart.

Temporal anti-aliasingTemporal anti-aliasingTemporal anti-aliasing

What does this mean to the programmer

So, should you try to model motion blur in your programs? Well, that depends a great deal on what kind of program it is.

Motion blur can be very hard to model in real-time applications. It requires that you increase the frame-rate several times. And for real-time applications, the only way to do this is to render with much less detail. For most programmers, this is unacceptable.

Correct Motion BlurFalse Motion Blur

Some computer games try to simulate motion blur by blending the current frame with the previous frames, so that previous frames are still visible for a moment. This makes moving objects smear across the screen. This is not real motion blur; it does not look good and is a waste of processor power.

You could probably achieve reasonable motion blur in a game if you were willing to sacrifice a lot of detail. You can often, however, add a little motion blur. You might be able to blur just those things that are moving fast enough. For example, the sparks given off in an explosion could be rendered as little lines, rather than dots, giving the effect of blur.The same goes for water falls and the shots from weapons. Often, when I play a racing games, I am disappointed by the absence of motion blur on the wheels of the cars. Car wheels spin so fast that you should not be able to see any detail on them at all. One solution is this: Several textures are stored for the wheels, with varying amounts of blur. As the wheels spin faster and faster, more and more blurred textures are used. The same thing applies for the road texture. This would have an effect on the realism of the game.

If you are rendering a non-real-time animation, then it is well worth going to the extra trouble to add motion blur, especially if the motion is fast. It is not always desirable however. For example, if you want to be able to pause the animation, and see the images sharply, then you may want to reduce, or ignore, the blur altogether. If you have the film Out of Sight with George Clooney, watch the beginning, where George comes out of the bank, and chucks his tie on the floor. As the camera pans around, you might notice that it looks a little bit jerky or flickery. The film pauses occasionally to catch a car speeding past, and George in the act of throwing his tie down. Even though they were moving quite quickly, they still don't seem to have suffered a great deal from motion blur. This is because the film makers used a high speed film, and reduced the exposure time a great deal, so that the paused shots appeared sharp.

Motion Blur Demo

Correct Motion Blur

S:Toggle slow motion
M:Toggle between correct and false motion blur
3:Toggle Red/Blue 3D mode
up/down arrows:more/less motion blur accuracy
left/right arrows:adjust background brightness

Here's a real-time demo showing a cube rushing round the screen


Motion Blur Animation

Motion Blur Animation

The frames of this animation were rendered in Terragen2. Spatial and Temporal anti-aliasing were then applied with Bitty, and finally the animation was created with Bink. You will need the bink player

Format :Bink (.BIK)
Resolution :320x240
Frames :160
FPS :25
File Size :1379 Kb