The SceneGraph3D Description Language

Home About EaZD Deferred renderer API SceneGraph3D API SceneGraph3D scene description language

Index

| Scene file structure | camera | character | directory | eventmessage | group | input | light | linearmotion | material | node | object | proximitytrigger | skylight | spinner | surface | transformation | user | world |

skylight

Derived from: -
Class name: -
Placement: Within the world node. Only one such node can be present.
Description: Creates a sky and a sun. The sky is not geometrically represented and is only rendered within the fragment shader of the frame buffer. As physically-based solutions tend to be more intensive in terms of calculations, the model of EaZD is an empirical one, requires no texture fetches and is only parameterized by air density (haze). The sun is attached to one of the existing (named) light sources in the scene, as specified by the user. The sky illumination is dynamically adjusted according to the sun position, hense the position of the attached light source. Furthermore, the node provides an option to enable volumetric light from the sun, generating realistic godrays from the interception of light from obstructing geometry.
Special notes: -
Inherited attributes: -
New attributes:
attribute type description
active BOOLEAN Enables the use of the skylight
air_density FLOAT Normalized air density in the range [0,1] causing a subtle increase in the haze of the sky. Also affects the godray intensity.
volumetric_light BOOLEAN Enables the use of volumetric sun light. Quality (and performance impact) is determined by the number of samples per say.
samples INTEGER The number of samples per ray when performing volumetric ray marching for the sun. Only effective with the volumetric_light attribute set to true.
sun STRING Provides the node name of a light source node to be used as a sun. Shadow and placement attributes of the light source are respected.
Events:
event name condition
-  
Inherited events: -
New messages:
attribute value description
Inherited messages: -
Redefined messages: -
Obsolete messages: -


Example

<world ambient="0.3 0.3 0.3" defocus="no" shadows="disk">
  
    <skylight sun="sun" active="yes" air_density="0.5" samples="128" 
              volumetric_light="true"/>
    
    <transformation name="environment" scale="1.0,1.0,1.0" translation="0,0,-10">
        
        <object name="geom2" file="arena.obj"></object>
    
    </transformation>
    
    <object name="geom1" file="fighter.obj"></object>
    
</world>

Last update: Feb. 2009