3D Light Sources
Previous  Top  Next

Dialog Box - called from: Input2 Menu

There may be as many as 8 light sources in the 3D drawing mode, and each may have a different color.

Each light may be either Directional, in which case all rays are parallel in a given direction; it may be Positional, in which case all rays emanate from a given point; or it may be Ambient, in which case the rays bathe all objects uniformly - there is no directional quality. If the light is Directional, the x, y and z coordinates in the Position/Direction box give the direction vector. If the light is Positional, the coordinates give the location of the light source, in Angstroms in the Observer coordinate system. Ambient light is neither directional or positional and these coordinates are not used.

There may be only one ambient light.

Each light has only one color. For non-ambient lights, the diffuse and specular components have the same color and intensity. The absolute values of the RGB components determine the intensity of the light - for example, 0.2, 0.2, 0.2 gives a white light of one/fifth the maximum intensity.

Since the colors and Material properties for each atom, etc. are specified individually, the Ambient, Diffuse and Specular Colors should normally be white (1.0, 1.0, 1.0). However, they can be changed for special effects or to correct color distortions in display or output devices.

The color of a given object is the resultant of the colors of the various lights, the color specified for the object itself in the dialogs of the Input1 and Input2 menus, and the Material coefficients. See Lighting Equation for details.

Attenuation. The incident intensity from a light source is itself subject to attenuation according to the equation

Ii = Ii(0) / (Kc + Kl d + Kq d^2 )

Where d is the distance of the point in question from the (positional) light and Kc, Kl and Kq are the constant, linear and quadratic attenuation coefficents respectively. Constant attenuation is essentially a brightness coefficient. Values larger than 1.0 simply darken the scene. Values smaller than 1.0 may add a white component and/or increase the specular contribution. Linear and quadratic attenuation apply only to Positional lights.