3.3. Lights

To specify lights attributes, there are several instructions:

light point point [color_extended] - this is a point light that irradiates in any direction. If any of the color components is negative, then there is no distance fall-off. Default color is white.

light directional vector [color] - this is a light like the Sun that irradiates along a direction, with no distance fall-off.

light spot point vector color_extended [angle [factor]] - this light illuminates inside a cone defined by the angle (default 45 degrees) with a transition that can be sharp (factor near 1) or smooth (factor >> 1). The default value for factor is 1.

light extended point color_extended radius samples - a spherical light sampled samples2 rays.

light linear point color_extended vector samples - a thin linear light source defined by the vector and centered at given point. It is sampled by samples rays.

light planar point color_extended vector vector samples samples - a kind of area light source defined by the two vectors (the given point is at the center of the area). It is sampled by the product of samples (8 by 8 is generally good).

Examples:

	light point 2 6 1 yellow
	light directional -1 -1 -1              ; white
	light spot 0 5 0 0 -1 0 red 30 2        ; smooth 30 degrees spot
	light extended -3 5 3 green 0.5 8       ; 0.5 radius light sphere
	light linear 1 8 3 white 0 0 2 32       ; white linear light
	light planar 9 1 8 blue 1 0 0 0 0 1 8 8 ; blue square light

Examples of the six light sources. The basic scene is:

	eye 7 5 0
	at  0 0
	fov 30
	background white
	sphere surface matte mono 0.8 data 0 3 0 1
	cylinder surface matte mono 0.7 data 2 0 2 2 2 2 0.2
	box surface matte white data 0 0 0 5 0.01 5
	light ...


To Table of Contents
To 3. Syntax
Back To 3.2. Ambient and Background
Forward To 3.4. Surfaces