bit-gamer.net

Cinematic Effects in Source

Depth of Field:

In real life, all cameras have a focal length - the distance at which objects are in focus. The Depth of Field is the distance in front of, and behind, and object in a scene that appears in focus, beyond which everything is out of focus or blurred.

It is a technique used in TV and cinema to draw attention to objects in a scene; to make them stand out from their surroundings. For example, when two actors are standing where one is closer to the camera than the other, the focus alternates between foreground and background when each actor delivers their dialogue so your eye is drawn to the person speaking. For more examples, read the Wikipedia entry.

The human eye works in essentially the same way. Try this quick test: look around the room and find something a few metres away that has some detail in it - a blank wall won't work. A bookcase, doorway, sofa - it doesn't matter. Look closely and assuming you've got your contact lenses in, everything should be in focus.

Now hold your index finger 10-20cm from your nose and focus on it. You should be able to see all the tiny wrinkles, the swirls that make up your fingerprint and so on. Without moving your eyes or changing your focus, notice how the room behind your finger is all blurry. Now move your eye slightly and switch your focus back to the distant object. Bingo, now your finger is out of focus. Flick back and forth a few times and this is Depth of Field at work.


Cinematic Effects in Source Depth of Field Cinematic Effects in Source Depth of Field
Computer games, on the other hand, have a pinhole camera approach to focus in that every object in a scene is perfectly focused, no matter how close or far it is to the viewpoint. The result is the very flat, artificial look that makes a game look like, well, just a game. As games become more cinematic and strive for even higher levels of photo-realism, having access to variable Depth of Field effects will be increasingly important to developers.

Movie buffs talk about the "suspension of disbelief" which means you get so hooked on the atmosphere and drama of a film that you forget that you're watching a film and become totally immersed in the on-screen action. A newer twist to that theory applies to the CGI and other special effects in modern films: to reach such a level of quality that you couldn't tell the difference between the live action and the CGI.

Renny Harlin, director of the Jaws-a-like film Deep Blue Sea, claimed it was impossible for the audience to tell the difference between the mechanical shark prop and the CGI shark in various scenes. This was, of course, totally untrue for a film made in 1999; with the rendering power available these days, it is increasingly difficult to spot the difference.

Arguably, computer games are catching up - we will eventually reach the scientific cliche of not being able to tell the difference between the in-game graphics and real life. At the very least, games are become more cinematic and certainly a far cry from the bitmap platform games of the 1990's, if you'll excuse the pun.

Cinematic Effects in Source Depth of Field Cinematic Effects in Source Depth of Field
By adding Depth of Field to the Source engine, Valve has added to the HDR lighting effects (such as Blooming) it introduced a few months ago to really boost the realism of the Source engine. If you look at the screenshots here, you will see Depth of Field at work in Day of Defeat.

Each screenshot is divided vertically down the middle, with the left side running "normally" while the right side has the effect applied. For example, if you click on the second screenshot from the top of the page - the close-up of the soldiers - you will see that the camera is focused on the third soldier in middle distance. The rubble in the background is blurred, as is the soldier closest to the camera.

It is difficult to explain with just screenshots, so the best thing to do is to show you what it looks like running. Valve kindly supplied us with some videos recorded in-game to demonstrate these new effects. To start with, grab the unmolested Control footage. This has no special effects applied to it, and will look just like normal Day of Defeat.

Day of Defeat. Reference footage - no effects

Duration: 25s
Resolution: 1280x720
Filesize: 43.4 MB
Codec: WMV9

Download Locations:

bit-tech.net Server #1 (Removed) - Please use FileShack or the bittorrent.
FileShack mirror

Update: bittorrent - ALL VIDEOS (~360mb)

Once you are familiar with the sequence we are analysing, go ahead and grab the next video, which features the Depth of Field effect in split-screen. Remember, the left is "regular" mode and the right has the effect applied.

Day of Defeat. Depth of Field

Duration: 25s
Resolution: 1280x720
Filesize: 32.7 MB
Codec: WMV9

Download Locations:

bit-tech.net Server #1 (Removed) - Please use FileShack or the bittorrent.
FileShack mirror

Update: bittorrent - ALL VIDEOS (~360mb)

The action moves quickly, so you will probably need to watch it more than once to appreciate the changes. A good example is at the 7 second mark: the wall nearest the camera is blurred because the focus is on the soldiers further away, in the centre of the scene.

Depth of Field is just one of a number of effects being added to Source. The next we will look at is Motion Blur...