Computer graphics lighting

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Computer graphics lighting refers to the simulation of light in computer graphics. This simulation can either be extremely accurate, as is the case in an application like Radiance which attempts to track the energy flow of light interacting with materials using radiosity computational techniques. Alternatively, the simulation can simply be inspired by light physics, as is the case with non-photorealistic rendering. In both cases, a shading model is used to describe how surfaces respond to light. Between these two extremes, there are many different rendering approaches which can be employed to achieve almost any desired visual result.

Illumination model[edit]

In order to compute the color of a specific surface pixel, an illumination model must be used. One of the most common shading models is the Phong model. The Phong model assumes that the intensity of each pixel is the sum of the intensity due to diffuse, specular, and ambient lighting. Ambient light is the directionless light of a scene, diffuse light comes from a specific source in the scene and is reflected in all directions, specular light comes from a specific source and is sent in a specific direction.

Lighting algorithms[edit]

A variety of algorithms exist to simulate lighting. Some produce realistic results at the cost of efficiency, but many are designed to be as fast as possible. Advancements in computer hardware technology have allowed for more intensive computations and have increased the quality of the results of several of these algorithms.

Ray tracing[edit]

Image rendered using ray tracing

Light sources emit rays that interacting with various surfaces, either by being absorbed, reflected, or refracted. An observer in the scene would see the result of any light source that reaches its eye. Any ray that does not reach the observer goes unnoticed. It is possible to simulate this by having all of the light sources emit rays and then compute how of each of them interact with all of the objects in the scene. Anything that reaches the observer would then be rendered. However, this process is inefficient as most of the light rays would not reach the observer and would waste processing time. Ray tracing solves this problem by reversing the process: sending view rays from the observer and calculating how they interact until they reach a light source. Although this way is makes more effective use of processing time, ray tracing is still expensive to run, but the end result is a very realistic image.[1]


Radiosity takes into account the energy given off by surrounding objects and the energy it has, in addition to the energy given off by the light source. Unlike ray tracing, which is dependent on the position and orientation of the observer, radiosity lighting is independent of view position. Radiosity requires even more computation power than ray tracing, but can be more useful for scenes with static lighting because it would only have to be computed once. The surfaces of a scene can be divided into a large amount of patches. [1] Because each patch radiates some light and affects the other patches, a large set of equations needs to be solved simultaneously in order to get the final radiosity of each patch.


  1. ^ a b Greenberg, Donald P. (1989-04-14). "Light Reflection Models for Computer Graphics". Science. 244 (4901): 166–173. doi:10.1126/science.244.4901.166. ISSN 0036-8075. PMID 17835348.