Webots Reference Manual

previous page go up next page

Thanks

1. Introduction

2. Node Chart

3. Nodes and API Functions

4. Motion Functions

5. Prototypes

6. Physics Plugin

7. Fast2D Plugin

8. MTN Functions

9. Webots World Files

10. Other APIs

     

3.29 Light

Light {
  SFFloat   ambientIntensity   0        # [0,1]
  SFColor   color              1 1 1    # [0,1]
  SFFloat   intensity          1        # [0,1]
  SFBool    on                 TRUE
  SFBool    castShadows        FALSE
}

Direct derived nodes: PointLight, SpotLight, DirectionalLight.

3.29.1 Description

The Light node is abstract: only derived nodes can be instantiated. Lights have two purposes in Webots: (1) the are used to graphically illuminate objects and (2) they determine the quantity of light perceived by LightSensor nodes. Except for castShadows, every field of a Light node affects the light measurements made by LightSensor nodes.

3.29.2 Field Summary

  • The intensity field specifies the brightness of the direct emission from the light, and the ambientIntensity specifies the intensity of the ambient emission from the light. Light intensity usually ranges from 0.0 (no light emission) to 1.0 (full intensity). However, when used together with LightSensors, and if real physical quantities such as Watts or lumen (lm) are desired, larger values of intensity and ambientIntensity can also be used. The color field specifies the spectral color properties of both the direct and ambient light emission as an RGB value.

  • The on boolean value allows the user to turn the light on (TRUE) or off (FALSE).

  • The castShadows field allows the user to turn on (TRUE) or off (FALSE) the casting of shadows for this Light. When activated, sharp shadows are casted from and received by any renderable object except for the semi-transparent objects, for the objects having a texture containing an alpha channel, and the IndexedLineSet primitive. Shadows are additive (Several lights can cast shadows). The darkness of a shadow depends on how the occluded part is lighted (either by an ambient light component or by another light). Activating the shadows of just one Light can have a significant impact on the global rendering performance, particularly if the world contains either lots of objects or complex meshes. Some shadow issues can occurs in closed spaces.

previous page go up next page
^ page top ^

  E-mail to webmaster Last updated: Copyright © 2010 Cyberbotics Ltd.