07.01.2013 Views

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Ambient occlusion 6<br />

ambient occlusion diffuse only combined ambient and diffuse<br />

The occlusion at a point on a surface with normal can be computed by integrating the visibility function<br />

over the hemisphere with respect to projected solid angle:<br />

where is the visibility function at , defined to be zero if is occluded in the direction and one otherwise,<br />

and is the infinitesimal solid angle step of the integration variable . A variety of techniques are used to<br />

approximate this integral in practice: perhaps the most straightforward way is to use the Monte Carlo method by<br />

casting rays from the point and testing for intersection with other scene geometry (i.e., ray casting). Another<br />

approach (more suited to hardware acceleration) is to render the view from by rasterizing black geometry against<br />

a white background and taking the (cosine-weighted) average of rasterized fragments. This approach is an example<br />

of a "gathering" or "inside-out" approach, whereas other algorithms (such as depth-map ambient occlusion) employ<br />

"scattering" or "outside-in" techniques.<br />

In addition to the ambient occlusion value, a "bent normal" vector is often generated, which points in the average<br />

direction of unoccluded samples. The bent normal can be used to look up incident radiance from an environment<br />

map to approximate image-based lighting. However, there are some situations in which the direction of the bent<br />

normal is a misrepresentation of the dominant direction of illumination, e.g.,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!