Lighting Details

Two lights illuminate the scene in Chimera. Generally, the key light is the dominant (brighter) source of light and the fill light serves as a secondary source to improve the visibility of regions that would otherwise be dark. This scheme is based loosely on the classic three-point lighting method, but without the back light. The key and fill lights each have directionality and can include diffuse and specular contributions: diffuse light is scattered from a surface equally in all directions, whereas specular light is reflected in a preferred direction. The default fill light in Chimera has zero specular contribution and is treated as shadowless during raytracing.

To convey the three-dimensional nature of a scene, the best direction for lighting is not along the line of sight like a headlamp, but oblique, somewhat from the side and above (from over the viewer's shoulder). Key and fill lights are often placed to converge from partially opposing directions, with the key light coming from a higher angle.

The light directions and their diffuse and specular parameters can be controlled in the basic and advanced interfaces of the Lighting tool. The specular parameters of objects in the scene can be controlled in the Shininess section.

Due to the many interacting parameters, the overall effect of changing some aspect of lighting can be unexpected. If adjusted at all, lighting should be the last thing adjusted before images are saved.

Combination Rules

"Object" will be used to refer to any item in the view. The illumination at a point on an object's surface due to a particular light source depends on several things:

The key and fill lights in Chimera do not attenuate with distance.

The key/diffuse, fill/diffuse, key/specular, and fill/specular lights can be treated as four separate contributions. The color shown for a point on an object's surface is generated by the following process:

  1. The object's color component values (RGB, meaning red, green, blue) are multiplied by the scaled diffuse color component values due to each light, yielding a set of RGB values for the key/diffuse light and a set for the fill/diffuse light.

  2. Similarly, the object's specular color component values (spatially modulated according to the object's shininess and scaled by the object's specular brightness) are multiplied by the scaled specular color component values due to each light, yielding a set of RGB values for the key/specular light and a set for the fill/specular light.

  3. The four sets of RGB values are added to generate the color shown for the point. When a scale factor (see the advanced lighting interface) is negative, however, the corresponding contribution is effectively subtracted. Light subtraction is nonphysical but possible in Chimera.
Multiplying color component values has the effect of intersection. For example, multiplying red (RGB values 1,0,0), and blue (0,0,1) gives black:
net red component = (1)(0) = 0
net green component = (0)(0) = 0
net blue component = (0)(1) = 0
(0,0,0) = black
Adding red and blue gives magenta:
net red component =  1 + 0  = 1
net green component =  0 + 0  = 0
net blue component =  0 + 1  = 1
(1,0,1) = magenta

UCSF Computer Graphics Laboratory / December 2007