Game Development Reference
In-Depth Information
The Skylanders SWAP Force
Depth-of-Field Shader
Michael Bukowski, Padraic Hennessy,
Brian Osman, and Morgan McGuire
This chapter describes the depth-of-field (DoF) shader used in production at
Vicarious Visions for the Skylanders SWAP Force game on multiple console plat-
DoF is an important rendering effect. A real camera lens focuses on a single
plane in the scene. Images of objects in that plane are perfectly sharp. Images of
objects closer to or farther from the camera are blurry. Of course, most objects
are typically outside the exact plane of focus. Photographers recognize that each
point on an out-of-focus object blurs into the shape of the camera aperture, which
is usually a disk, octagon, or hexagon. They call the bounding circle of a blurred
point the circle of confusion (CoC) of that point. They say that an object is in
focus (for a digital image) when the radius of the CoC is half a pixel or less. In
that case, the object does not appear blurred because the blur falls below the
image resolution. Photographers refer to the depth range over which the CoC
radius is less than half a pixel as the focus field . They refer to the extent of this
range as the depth of field . In computer graphics, that phrase is now associated
with the effect of blurring images of objects outside of the field.
In a game, a DoF effect serves both gameplay and aesthetics. It allows the art
director to control the player's attention by de-emphasizing background objects or
those that are merely in the foreground to frame the shot. Rack-focus ( Figure 1.1 )
in on a specific object can emphasize goals and powerups during gameplay without
resorting to floating arrows or halos. In cut-scenes, DoF is a powerful cinematic
tool. DoF also conceals many rendering limitations. Defocusing the background
conceals aliasing and low level of detail. Defocusing the extreme foreground
conceals texture magnification and tessellation limits.
Search Nedrilad ::

Custom Search