Kambi VRML game engine
← Users Developers →
 
Intro and News
 
view3dscene
 
The Castle
 
All Programs
 
Forum
 
Engine
 
VRML/X3D
 
Other
 

Lighting component

This component defines light source nodes.

See also X3D specification of Lighting component.

Supported nodes:

  • DirectionalLight, PointLight, SpotLight

    Note: VRML 2.0 SpotLight.beamWidth idea cannot be translated to a standard OpenGL spotlight, so if you set beamWidth < cutOffAngle then the light will not look exactly VRML 2.0-spec compliant. Honestly I don't see any sensible way to fix this (as long as we talk about real-time rendering using OpenGL). And other open-source VRML implementations rendering to OpenGL also don't seem to do anything better.

    VRML 2.0 spec requires that at least 8 lights are supported. My units can support as many lights as are allowed by your OpenGL implementation, which is at least 8.

    TODO: global field from X3D is not supported for now. We handle this following VRML 97 spec, which means that the default global value is always used: directional lights are never global, positional/spot ligthts are always global.