What is Motion Blur)

Source: Internet
Author: User

Motion Blur is the moving Effect in a scene image. It appears obviously in the case of prolonged exposure or rapid movement of objects in the scene.

Why is motion blur?

The principle of the camera is to expose the scene to the film in a short time. The light in the scene is projected onto the film, causing a chemical reaction and eventually generating an image. This is the exposure. If the scene changes during the exposure process, a blurred image is generated.

 

Why shoshould you bother?

It is not hard to find that motion blur often occurs in movies or television, and you may not even notice it. On the other hand, in computer graphics, you will find a lack of motion blur, which also leads to distortion.

For example, lensflare is a popular image effect recently, but traditional image makers often simplify this effect. Since we realized that it is a simulation tool, the computer starts to simulate this effect. In film production, there are also ways to reflect the reality.

If you do not use a computer animation with motion blur, you will find that when an object moves fast, there is a lack of coherence and realism. You can see similar effects in sports reports on TV. Because ordinary TV programs use 25 frames/second, while sports programs use 1000 frames/second to provide clear slow lens playback. However, in reality, only a small part of the frame is played back, and the motion blur is lost, so that the moving object looks like a jump.

We are used to blurred motion in television or movies, so we will feel unreal if we don't see it in motion images. Therefore, the lack of motion blur is one of the reasons why computer animation is not real, because the computer-generated images are "sharp and angular" and are very eye-catching, which weakens the motion effect.

In addition, images with motion blur contain more information. Compare the two images:

The scenes in the two images are exactly the same, but one of them is obtained from the camera that is moving forward rapidly, and the other is the camera moving left. This can be easily identified from the image. When watching an animation, the brain notices more information, which makes the motion smoother and the scenes more realistic.

More details

Let's take a look at how the movie camera shot mobile scenes.

A movie camera consists of the following parts:

  • Lens
    Focus light on film
  • Shutter
    Shutter control within a certain period of time, open to let the light.
  • Film
    The film includes photosensitive chemicals. These photosensitive materials are used to record scenes and generate images.

The picture on the left shows the situation when a still red sphere is taken by the camera. Here we only draw three important parts of the camera: Lens, shutter, and film.

It can be seen that the shutter is on to expose the film. However, two frames on the film have already been exposed, and one frame is being exposed. The difference is that the latter is a little darker, because the exposure time is not enough. Later, the shutter will be closed, and the three frames will be exactly the same.

After the shutter is closed, the film will move down to a proper distance, so that the next frame of film will reach the exposure position, and then the shutter will open again, this process will be repeated many times in one second.

The picture on the right is similar to the above, but now the sphere moves fast in the direction pointed by the arrow.

The shutter is opened as usual, and the film is also exposed. However, because the sphere is moving during the exposure time, the image on the film is blurred. This is what we call motion blur.

Now, I can bet that if you see any of the blurred images, you will be able to say that the ball is moving horizontally when shooting. Because an image with motion blur contains more information than the image with motion blur.

Create motion blur in Images

1. Space anti-Distortion

You may be familiar with an anti-distortion technique called "oversampling. This technology first renders a much larger image and then shrinks the image. I will first introduce the implementation of this anti-distortion technique, because the realization of motion blur is very similar to this.

For example, rendering a 50x50 red circle anti-distortion image:



1. Dye more pixels
Draw a "distorted" circle at a higher resolution. Here, I use the resolution of X, which is 4 times larger than the project map.


2. Image Segmentation
Then, imagine dividing the image into many squares. Because this image is 4 times larger than the target image, we make each small square 4x4.


3. Average Value
Then, for each small square, take the average value of all the pixels. Fill the small square with this average value.

4. Reduce the image size to 50x50. This is an anti-distortion red circle image.

2. Anti-distortion of time (motion blur)

The method for completing motion blur is similar. The method mentioned above is called "Space anti-distortion" (I .e. smooth space ). The method for creating an animation is time anti-distortion (that is, smoothing time ). This method is similar to creating an anti-distortion image.

1. Dye more frames
Just like in space anti-distortion, You need to render more frames as you render more pixels. For example, for an animation that shows 4 seconds (100 frames), you need to render 400 frames. These 400 frames also cover 4 seconds, but are further divided.

Here, each frame on the left is displayed for 1/100 seconds.

2. Divide all frames
Next, press every 4 frames as a group...

3. Average...
Accumulate and render all four frames in the group.

4. Complete
Now you get an animation of 25 frames per second. Each frame on the right shows an image with motion blur effect in 1/25 seconds.

What does it mean for programmers?

Do you want to add motion blur to your program? However, it is determined that your program is that type of program.

Motion Blur is hard to implement in real-time programs. It requires that the frame speed be increased several times. For real-time programs, the only possibility is to reduce the resolution. But this is unacceptable for most programmers.

Some games try to simulate motion blur by rendering the current frame together with the previous frame, and the result is that the previous frame turns to some stains on the screen. This is not true motion blur; poor performance and a waste of CPU.

In a game, if you want to use motion blur in large quantities, you must be prepared to sacrifice image quality. But at the same time, you can only add a small amount of motion blur, that is, only apply motion blur to extremely fast objects. For example, you can use line segments instead of vertices to blur the sparks during an explosion. This can also be done when waterfalls and weapons are fired. When I play a racing game, I often get disappointed because the wheel has no blur effect. Because the wheel rotates fast, you cannot see any details. One solution is to store several wheel texture maps, each of which contains different motion blur effects. As the speed increases, blurred texture textures become more and more obvious. Use the same method for pavement textures. This will increase the realism of the game.

If you want to make an animation that is not a real-time synthesis, it is worthwhile to make it more difficult because of dynamic blurring, especially when the motion is very fast. Of course, this is not always desirable. For example, if you want to see a clear image while pausing an animation, you may want to reduce or ignore dynamic blur.

Real-time motion blur effect DEMO
[Motion.zip download]

Here is a real-time demo that shows a cube flying on the screen. You can use the following keys:

S: Slow motion
M: Effect of correct/wrong switchover
3: Switch between red and blue 3D Modes
Outputs/outputs: Progress
→/Else: Adjust the Background Brightness
ESC: Exit

Motion Blur animation DEMO
[Fly2.zip (1.3 Mb) download]

Frames of this animation are rendered using Terragen. Use Bitty to add space and time anti-distortion, and finally use Bink as an animation. Binkplayer is required for playback (which can be downloaded from the home page for free ).

 

Refer:

Bitty
Http://parnham.future.easyspace.com/
Bitty is a small program that can perform space and time anti-distortion (motion blur ). Input the rendered frame to get the motion blur effect. It can also re-sample images. It cannot output animation files. It can only output frame image files for generating. MPG,. AVI, or. BIK (bink !) Video files.

Terragen Motion Blurred Animations
Http://parnham.future.easyspace.com/animations.htm
Dan uses Terragen to render frames. Bitty frames have already created many amazing animations.

Bink!
Http://www.smacker.com/(the predecessor of Starcraft)
Bink is a novel and outstanding video compression and decompression format. Easily outconfigurming MPEG-IIand AVI. It is a very new system that is not supported like. MPG or. AVI, but I do want it to be recognized as it should. From now on, I will use this format to create all my animations.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.