3D Lights

 

Watch a Video Presentation

 

The shading of the surfaces is determined by the light sources. This tool enables you to control 4 light sources and an ambient light.

 

 

From the Graphic Interface

 

 

 

Light List

Select the light source that will be affected by the tool’s controls.

 

On/Off

The selected light source can be toggled on or off.

 

X/Y/Z Sliders

Control the selected light direction. The lights are considered infinitely far from the objects. The sliders determine the direction from which the light comes.

 

Demo Image

This demo shows how a centered sphere would be lighted.

 

Color Edit

Change the light’s intensity and color.

 

Note:

 

When the Ambient light is selected (Amb. Button), the On/Off buttons and the X/Y/Z Sliders are disabled.

 

 

From the Display Area

 

There is no Display Area interaction specific to this tool.

 

 

From the Keyboard

 

There is no keyboard interface specific to this tool.

 

 

From the Command Line

 

System Variables defined in this library:

 

 

$LIGHT_MAX

(U16,R)

Maximum number of light sources. (= 8)

 

$LIGHT_NB

(U16)

Current number of defined lights (Default=5)

 

$LIGHT_LIST

(A,U16)

List of all the lights (1,..., n)

 

$LIGHT_STATE

(A,U8)

Array of light states (0=Off, 1=On, 3=Ambient)

 

$LIGHT_COLOR

(A,C)

Array of light colors

 

$LIGHT_DIR

(A,P)

Array of pointer to the light's directions

 

Commands recognized in this library:

 

Light: t_light State (on|off)

Assign values to the elements of $LIGHT_STATE specifying the state of the light sources. (0=Off, 1=On). 

 

Light: t_light Dir x y z

Assign values to the elements of $LIGHT_DIR specifying the direction of the light sources.

 

Light: t_light Color R G B

Assign values to the elements of $LIGHT_COLOR specifying the color of the light sources.

 

Templates:

 

t_light is a template for the light names ("amb", "1" to "4")