eli5 how CGI lighting worked before Ray tracing.

252 views

eli5 how CGI lighting worked before Ray tracing.

In: 2

5 Answers

Anonymous 0 Comments

Ray tracing has been around a very long time. I had a book on using ray tracing in computer games in ’94. There was also a DOS raytracing program for making pictures. Can’t remember the name.

Anonymous 0 Comments

Ray-tracing has been around for a long time, but even today its not the only method used. In the past particular it was not practical to use ray-tracing for real time rendering (such as 3D games) because the time it took to compute the scene by ray-tracing was longer (usually far longer) than it would take to display it.

Instead of ray tracing various other techniques are used to simulate what the scene should be. For example rather than trace the rays of light coming from a source and calculating how they would eventually look when getting to the camera (ray tracing) a different approach would be for the objects surface to be rendered based on an algorithm that guesses what the surface would look like given a light source of X% intensity is coming from a different direction, and thus drawing the surface colors and shading of the object based on that. Its not as photo realistic but much faster.

There are many different rendering approaches and algorithms but all of them try to do the same thing, model how the various elements will interact and what the scene SHOULD look like given those elements. Ray tracing just happens to be very good because it more closely models how light works in reality, but its also computationally more difficult.

Anonymous 0 Comments

A common shortcut for lighting in games and film was a technique called ‘path tracing’ where the computer would know the camera position and light source position, amd trace the path backwards from the camera to the light source, including the reflections.

Much faster and simpler with mostly the same effectiveness

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”.

Anonymous 0 Comments

Many many years ago, I developed a small program to help visualize 3D surfaces defined by mathematical formulas. The surface was made of “tiles”, and each tile was painted lighter or darker, depending on it’s angle with respect to the angle of the light source.