Week 7 - Bump & Shadow Mapping and Visibility, Occultations & Clipping Flashcards
What is bump mapping?
Simulating height variations by adjusting directions of surface normals
What his a heightmap (elevation map)?
A texture provided to the shader that defines for each pixel on the model’s surface how far from the polygonal mesh’s surface it should lie
What are the steps for using a height map (elevation map)?
Look up the heightmap for the current surface position (implemented as a texture lookup)
Calculate surface normal perturbation at this location from the height map
Combine the calculated normal with the original one
Calculate illumination for the new normal using a standard shading
What are the direct shadow methods?
Shadow volumes and shadow maps
What are the indirect shadow methods?
Raytracing, radiosity and photon mapping
What is the idea of shadow volumes?
Determine volumes which are created by shadows
Shadow volume represented by a polyhedral generated by object silhouette and receiver object
A point is in shadow if it is in the volume
What is the shadow volume algorithm?
Trace rays from eye point into scene for each pixel
Initialise a shadow counter to zero
Calculate intersections with shadow volumes(s)
For each intersection (sorted by distance from eye), increase shadow counter if entering the volume, and decrease shadow counter if leaving the volume
If the counter is zero, the point is not in any shadow volume
What does OpenGL’s depth buffer contain?
The depth value for each fragment, and used for occlusion control (ie z-buffering)
What does OpenGL’s stencil buffer contain?
Which fragment should be drawn, and therefore allowing fine grained clipping to arbitrary shapes
How are shadow volumes created using the stencil buffer proposed by Tim Heidmann in 1981?
Render the whole scene without the light source (ie everything in the shadows)
Then, for all light sources:
- Calculate a mask using the stencil buffer with caps on the illuminated areas
- Render the scene with lighting applying the stencil buffer
- Use blending to add this to the scene
What is the idea of shadow mapping?
Only the objects which are visible from the light source can receive direct lighting
What is the basic method for shadow mapping?
Step 1 (generation of depth maps):
- Render the scene from the light source as usual, but only keep track of the depth buffer
- Be aware of aliasing
Step 2:
- Look up the shadow maps
Step 3:
- Lookup in shadow map texture
What are the three types of culling?
View-Frustum culling
Back-face culling
Occlusion culling
What is also known as View-Frustum culling?
Rendering and clipping
What can you clip to?
Camera view frustum
Device boundaries
Viewport boundaries
User specified clipping path