top of page
Search
• Lingheng Tao

# TA#2 Lighting

This note writes about lighting in computer graphics.

### Lighting Pipeline Models

There are several common lighting pipeline models that helps to process lighting in rendering. We list the most important ones. In these models, we assume we have m objects and n lights.

Forward pipeline

Iteratively going through every light, and compute its affect applied on the current pixel. The complexity is then O(mn), obviously.

Very expensive, but very simple to implement.

Deferred pipeline

- Traverse all the objects first, document them in a data structure. (O(m))

- Traverse all the lights, compute the render effect only for those pixels that are in the lighting range of the light. (O(n)).

So in total O(m+n).

Less expensive but take more space because we need a data structure at the first step.

Lightmap/Static Lighting

- Calculate for once about the lighting condition and store them as texture sprites.

- Apply these sprites to the models, pretending as there's light shedding on them.

Very accurate and does not require real-time computation. However, it is static.

Point-cloud Bakery

- The fatal problem for light map: it is not able to process dynamic objects.

- We create cloud of points around the object, and sample these points.

- Calculate the light on the object by interpolating through the samples we get.

Imaged Based Rendering / Lighting (IBL, IBR)

- Pre-render a cube centered at the object as the information of environment lighting.

- When dynamic computation is necessary, we calculate the light with the cube along with the normal vector information.

### Next Generation Rendering

There are some essential technologies that are developed recently.

Normal Map

Instead of adding vertices, we can use a normal map sprite to store the height information on the normal direction. This is much more efficient than adding bunches of vertices (usually hundreds of thousands, or even millions of vertices).

Physically Based Rendering (PBR)

PBR requires a rigorous physical and mathematical understanding, and we will expand later in other blogs. In this note we will only go over the three most important parameters of PBR.

1. Albedo/Diffuse color/Base color

2. Albedo refers to the base color of the object.

3. It is a native property of an object.

5. Roughness

6. The surface details of an object.

7. Describes the concentration of highlights. (Lower roughness indicates a more concentrated highlight)

8. Metallicity

9. The reflectance of an object.

Reference:

1. Lightmap, https://en.wikipedia.org/wiki/Lightmap