LIGHT CENTER 4.0 3.0 2.0 RAD 0.2 COLOR 0.5 0.5 0.5This light would be gray colored if seen directly, and would be 50% intensity in each RGB color component.
Tachyon supports simple directional lighting, commonly used in CAD and scientific visualization programs for its performance advantages over positional lights. Directional lights cannot be seen directly in scenes rendered by Tachyon, only their illumination contributes to the final image.
DIRECTIONAL_LIGHT DIRECTION 0.0 -1.0 0.0 COLOR 1.0 0.0 0.0
Tachyon supports spotlights, which are described very similarly to a point light, but they are attenuated by angle from the direction vector, based on a ``falloff start'' angle and ``falloff end''angle. Between the starting and ending angles, the illumination is attenuated linearly. The syntax for a spotlight description in a scene file is as follows.
SPOTLIGHT CENTER 0.0 3.0 17.0 RAD 0.2 DIRECTION 0.0 -1.0 0.0 FALLOFF_START 20.0 FALLOFF_END 45.0 COLOR 1.0 0.0 0.0
The lighting system implemented by Tachyon provides various levels of
distance-based lighting attenuation. By default, a light is not attenuated
by distance. If the attenuation keywords is present immediately
prior to the light's color, Tachyon will accept coefficients which are used
to calculate distance-based attenuation, which is applied the light by
multiplying with the resulting value. The attenuation factor is calculated
from the equation
This attenuation equation should be familiar to some as it is the same lighting attenuation equation used by OpenGL. The constant, linear, and quadratic terms are specified in a scene file as shown in the following example.
LIGHT CENTER -5.0 0.0 10.0 RAD 1.0 ATTENUATION CONSTANT 1.0 LINEAR 0.2 QUADRATIC 0.05 COLOR 1.0 0.0 0.0