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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Schlick's approximation 173<br />

Schlick's approximation<br />

In <strong>3D</strong> computer <strong>graphics</strong>, Schlick's approximation is a formula for approximating the bidirectional reflectance<br />

distribution function (BRDF) of metallic surfaces. It was proposed by Christophe Schlick to approximate the<br />

contributions of Fresnel terms in the specular reflection of light from conducting surfaces.<br />

According to Schlick's model, the specular reflection coefficient R is given by<br />

where is half the angle between the incoming and outgoing light directions, and is the reflectance at normal<br />

incidence (i.e. the value of the Fresnel term when ).<br />

References<br />

• Schlick, C. (1994). "An Inexpensive BRDF Model for Physically-based Rendering". Computer Graphics Forum<br />

13 (3): 233. doi:10.1111/1467-8659.1330233.<br />

Screen Space Ambient Occlusion<br />

Screen Space Ambient Occlusion (SSAO) is a rendering<br />

technique for efficiently approximating the well-known computer<br />

<strong>graphics</strong> ambient occlusion effect in real time. It was developed by<br />

Vladimir Kajalin while working at Crytek and was used for the<br />

first time in a video game in the 2007 PC game Crysis made by<br />

Crytek.<br />

Implementation<br />

The algorithm is implemented as a pixel shader, analyzing the<br />

SSAO component of a typical game scene.<br />

scene depth buffer which is stored in a texture. For every pixel on the screen, the pixel shader samples the depth<br />

values around the current pixel and tries to compute the amount of occlusion from each of the sampled points. In its<br />

simplest implementation, the occlusion factor depends only on the depth difference between sampled point and<br />

current point.<br />

Without additional smart solutions, such a brute force method would require about 200 texture reads per pixel for<br />

good visual quality. This is not acceptable for real-time rendering on modern <strong>graphics</strong> hardware. In order to get high<br />

quality results with far fewer reads, sampling is performed using a randomly rotated kernel. The kernel orientation is<br />

repeated every N screen pixels in order to have only high-frequency noise in the final picture. In the end this high<br />

frequency noise is greatly removed by a NxN post-process blurring step taking into account depth discontinuities<br />

(using methods such as comparing adjacent normals and depths). Such a solution allows a reduction in the number of<br />

depth samples per pixel to about 16 or less while maintaining a high quality result, and allows the use of SSAO in<br />

soft real-time applications like computer games.<br />

Compared to other ambient occlusion solutions, SSAO has the following advantages:<br />

• Independent from scene complexity.<br />

• No data pre-processing needed, no loading time and no memory allocations in system memory.<br />

• Works with dynamic scenes.<br />

• Works in the same consistent way for every pixel on the screen.<br />

• No CPU usage – it can be executed completely on the GPU.

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

Saved successfully!

Ooh no, something went wrong!