11 - Bump and Shadow Mapping Flashcards

1
Q

Bump Mapping

A

Bump mapping simulates height variations on an object by adjusting the directions of surface normals.

Perception of surface height depends on lighting, by adjusting surface normal directions according to a bump map bumps are simulated.

Provide the normal as a texture.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an elevation map(heightmap/bump map)

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does bump mapping work the steps

A
  1. Look up the heightmap for the current surface position
  2. Calculate the surface normal perturbation at this location from the heightmap
  3. Combine the calculated normal with the original one
  4. Calculate illumination for the new normal using a standard shading
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Limitation of bump mapping

A

Shadows don’t reflect the changed height

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Bump mapping with a normal map

A

skips out the computation above by directly applying the new normals, as opposed to computing them on-the-fly.

A normal map is an image that encodes the direction of the surface normal at each texel (texture pixel) of the object’s surface;

this can then be applied in the illumination model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Shadowing algorithms

A

determine which pixels in a scene are in the light, or in shadow.

There are two types of shadowing algorithms: direct, and indirect.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Direct Shadowing:

A
  • Shadow volumes
  • Shadow maps
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Indirect:

A
  • Raytracing
  • Radiosity

derived from the global illumination model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a shadow volume

A

shadow volumes work by creating a 3D volume, which represents the space where an object (known as the occluder object) would cast a shadow.

A point is in shadow if it is in the volume.

shadow volumes can be computationally expensive; this is because the shadow volumes are large

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do we know whether to render a shadow using shadow volumes?

A
  1. Trace rays from eye point into scene for each pixel
  2. Initialise a shadow counter to zero
  3. Calculate intersections with shadow volume(s)
  4. For each intersection (sorted by distance from eye)
    a. Increase shadow volume counter if entering the volume
    b. Decrease shadow counter if leaving the volume

If the counter is 0, the point is not in any shadow volume

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Stencil Buffer

A

Shadow volumes can also be calculated using the stencil buffer algorithm.

Specifies which fragments should be drawn, allowing fine-grained clipping to arbitrary shapes (like a stencil)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do we use the stencil buffer with shadow volumes?

A

Render the whole scene in the shadows (without the light source)

For all light sources, create a mask using Stencil buffer with gaps on the illuminated areas

Then rerender the scene with full lighting applying the stencil buffer.

Use blending to add to scene.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is shadow MAPPING?

A

Render the scene from a light source perspective using a depth buffer (z-buffer) to asses whether the fragment is in the shade or the light.

A depth map texture with low res can cause aliasing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Difference between shadow map and shadow volume

A

Shadow map is faster to compute but quality is dependent on the shadow map resolution

Shadow volumes can be computationally expensive as shadow volumes can be large

How well did you know this?
1
Not at all
2
3
4
5
Perfectly