eli5 how CGI lighting worked before Ray tracing.

254 views

eli5 how CGI lighting worked before Ray tracing.

In: 2

5 Answers

Anonymous 0 Comments

This isn’t going to be all that clear for a 5 year old I’m afraid.

Basic lighting is pretty simple. Lights are treated as ambient (from all directions equally), diffuse (from a single direction, like sunlight) or point lights (essentially the light we get from lamps and nearby light sources).

Ambient light we just multiply the colour of the object by the brightness of the light. Trivial stuff.

Diffuse light, we work out the angle that the light hits the object. We usually make objects out of triangles and we can do same fairly simple calculations to work out the angle between a light source and the triangle. The greater the angle, the darker it is. It’s actually a cosine relationship, so if the light hits straight on, it’s full brightness, if it hits at the edge it’s completely dark.

Point lights are similar, but the light hits each corner of a triangle at a slightly different angle. We just set each corner to be a certain brightness and blend between them.

So that’s great! and works really well for space scenes, But nothing casts shadows!

There are various ways to do shadows. One way is to create a depth map. We essentially render an image from the point of view of a light source, with distance information for each pixel, creating a “depth texture”. When we render the image, we project this depth texture on each pixel. We can then compare the texture value with each pixel distance to determine if its lit.

Sorry this isn’t very “ELI5”.

You are viewing 1 out of 5 answers, click here to view all answers.