Game Development Reference
In-Depth Information
2
III
Simulating Partial Occlusion
in Post-Processing
Depth-of-Field Methods
David C. Schedl and Michael Wimmer
2.1
Introduction
This chapter describes a method for simulating depth of field (DoF). In particu-
lar, we investigate the so-called partial occlusion effect: objects near the camera
blurred due to DoF are actually semitransparent and therefore result in par-
tially visible background objects ( Figure 2.1 ). This effect is strongly apparent
in miniature and macro photography and in film making. Games and interac-
tive applications are nowadays becoming more cinematic, including strong DoF
effects, and therefore it is important to be able to convincingly approximate the
partial-occlusion effect. We show how to do so in this chapter, with the proposed
optimizations even in real time.
2.2
Depth of Field
Before we discuss the technique in detail, let us first revisit the theory. DoF is an
effect caused by the fact that optical lenses in camera systems refract light rays
onto the image sensor, but different light paths representing the same object point
only converge exactly if the object is at the focus distance. For other distances,
objects appear blurred. This imperfection is not reproduced by the standard
pinhole camera model used in rendering and needs to be simulated. Object-space
methods like ray tracing can do so at high quality but are too slow for interactive
rates.
Faster methods are based on the idea of using rasterized images and simulating
DoF via post-processing. The first to discuss such an approach were Potmesil and
Chakravarty in 1981. Based on the parameters of an optical lens, the diameter of
 
Search Nedrilad ::




Custom Search