Classic science popularization: Why does the movie need 24 frames, but the game needs 60 frames?
Classic science popularization: Why does the movie need 24 frames, but the game needs 60 frames?

We have played games for so many years, maybe there will be a few Clouds lead dreams Question: Why does the 2D pixelated antique super Mali not get stuck when playing, but it gets stuck when playing 3D games? Why is the movie 24 frames per second imperceptible? But the game is called Wang Xingren before 30 frames? Although there are various answers on the Internet, many of them are not scientific and comprehensive enough. The author tries to make a simple arrangement and explanation here.

physiological base

Frame by frame information recorded on film

All stories should start from the phenomenon of "visual persistence" and "brain compensation" of the human naked eye. The former refers to the phenomenon that the "residual image" of the human retina will remain for a certain time after the light signal disappears; The latter is the "brain compensation" function of the brain to complement the middle frame of the picture by itself. Their mixing makes us mistakenly think that the photos replayed at 24 frames per second are continuous.

As for Why should we set the number at 24? There are more conventions and metaphysics in it. The film specification itself has also undergone a transition from 16 to 24 frames It is estimated that this number will continue to grow in the future. The PAL/NTSC/SECAM three TV signal specifications, The reason for setting the frames at 25 and 30 frames per second is that the power supply frequency is different in different regions (50Hz and 60Hz) ... In order to facilitate the calculation, the United States and Japan, which adopt the NTSC format, naturally follow the habit of 30 frames per second in the game (the NTSC format is 29.97 frames).

But why does watching a 24 frame movie not offend you, but a 30 frame or even a 60 frame game will also have a card? Let's go straight to the conclusion, There are four factors that determine the smoothness of the game: dynamic blur effect, operation response, frame rate and frame rate uniformity, of which dynamic blur is the most important.

Dynamic fuzziness

Dynamic blur refers to the motion trail dragging caused by the camera shutter moving slower than the object. Important difference between 3D games and movies: movies are records of real light and shadow, while 3D games are real-time rendering of the shape/position of 3D models , the former will have dynamic blur, and the latter will not.

A movie is a film/digital photo taken at a constant frequency, which can completely record the light information for a period of time Generally, 24 frames per second of video will select a shutter more than twice as high as 1/50 second, and each frame can record the complete light information during the period. These "extra" image information, like ghosts, will overlap to create dynamic blur/drag. Its principle is the same as that of "photo painting", except that the shutter is not a few seconds, but 1/50 seconds. In human brain, dynamic blur is an important manifestation of visual information. Even if the number of frames actually seen is not enough, the interval pictures with dynamic blur are enough for brain compensation, so as to achieve "fluency".


Sample with high shutter speed


Low shutter speed proof sheet

In addition, even a movie cannot capture all the light information during the recording. Ignoring film movement, sensor shutter shutter and other complex factors, we can view the 24 frame, 1/50 second video, Every second, only 24/50=0.48 seconds of light can be recorded . If the same 24 frames per second. If the shutter speed is increased to 1/96 second, the light information recorded in the film is only 1/4 second (24 * 1/96) The missing light information will weaken the blurring effect, and such films will also have a sense of stuttering.



The left side shows the amount of light information recorded at different shutter speeds (the slower the shutter, the more light recorded), and the right side shows the actual picture

The game is the product of raising the "shutter speed" to the extreme. The 30 frames in the game are The game engine generates 30 infinitely short instant pictures, and no matter how fast these moments are, the objects themselves are extremely clear, and the cliffs will not have fuzzy effects. If it is still playing at 24 frames per second at this time, the brain will protest that the goods are moving so fast. Why do I still see it so clearly and completely unscientific? The process of "brain filling fluency picture" cannot be carried out, and we are really watching the slide show.

To solve this problem, either increase the sampling rate or artificially increase the blurring effect. The former is the high frame rate scheme mentioned below, while the latter is to increase the blurring effect to deceive the brain into thinking that it sees a picture with high information content (however, blurring effect also consumes resources).

Frame rate size

If the object in the game moves 1 pixel per second, we may still feel smooth, but if the object moves 10 pixels per second, it will have an obvious sense of paragraph. At this time, we need to increase the sampling rate to fill in the missing images. If the number of frames is increased to 10 frames per second, we can see the smoothness of one pixel per second.

adopt Increase the picture from 24 frames per second to 48 or even 60 frames per second. The amount of information received by both eyes is enough to "brain fill" the smooth effect Has. Although the most perfect game should have as many frames as possible, which is the real simulation of reality, for the game, the more frames to render, the higher the performance required, and the cost of this scheme is too high. Now it is generally accepted that 30 frames can complete the brain tonic process.

Frame rate uniformity

However, in the actual game, 30 frames will still get stuck occasionally, even if it is upgraded to 60 frames. When we evaluate mobile phones, two mobile phones with different GPUs often have different fluency even if the FPS (frames per second) displayed is the same. Why?

Frame number comparison of two video cards


Frame rendering time comparison between two video cards

The problem here lies in the accuracy of the "frame". Even if the previous time can be rendered more than 30 frames As long as there are a few moments falling below 30 frames, it is still a card. In an ideal situation, 30 frames per second are evenly distributed, but in fact, it is possible to render 29 frames in the first half second and only one frame in the last full half second.

Due to the limitation of computing power and image complexity (such as the sudden explosion of images from the plain), the first half second rendering pressure is low and can run full frames. However, as soon as the explosion scene arrives, the amount of computation increases dramatically, and it is too late to render, and the number of frames decreases later. Although the naked eye is insensitive to the absolute value of the frame number, the obvious change of the frame number can be easily detected.

Obviously, the accuracy of FPS (frames per second) we usually see is not enough. We need The stability of frame rate can be accurately measured by improving the accuracy from the number of frames per second to the number of frames per millisecond.

Response time and following degree

The biggest difference between games and movies is that games require users to make actions and give real-time feedback on actions. In addition to visual fluency, we also need smooth operation. The main reason why people pursue a high frame rate of 60 frames is to reduce the response time. To perceive whether an action is completed, we need to The machine receives the operation information and finally reflects it in the next frame. In actual operation, most game engines need 3 frame intervals to be reflected on the screen after receiving operation instructions.

The higher the refresh rate of frames, the faster we can perceive the operation speed. For a 30 frame game, even if the operation command transmission speed is ignored, each screen lasts for 33 milliseconds (1s/30=0.033s), and an operation needs 100 milliseconds (33 milliseconds * 3 frames) to be reflected on the screen. The game with 60 frames only needs 50 milliseconds to respond. This 50 milliseconds may determine whether you are "turned into a box" or others are "turned into boxes" in the game.

In addition, if there is too much pressure on the image, the machine cannot render it in time, and the image appears frame dropping or even jamming, our operation instructions will also be input later. The effect is that the operations we did a few seconds ago were displayed on the screen one by one after a few seconds, which is the legendary Ka Chengxiang


Share:
Charles Fang
Ordinary geek
Benefits!

Scan QR code and follow the author

Share Weibo Share WeChat
 Aigoji WeChat

Aigoji WeChat

 WeChat

WeChat

Recommended products

Sorry, the product you are looking for is not available in the product library

on trial