Package Vrml2Sourcebook.Chapter20Lighting
Lights provide virtual illumination that allows objects to be seen.
This X3D VRML2 Sourcebook examples archive is online.
By default, you have one light in the scene, attached to your head. For more realism, you can add multiple lights: suns, light bulbs, candles, flashlights, spotlights, firelight. Lights can be positioned, oriented, and colored. Lights do not cast shadows.
There are three types of lights: PointLight, DirectionalLight, and SpotLight. All lights have an on/off, intensity, ambient effect, and color fields. PointLight and SpotLight nodes have a location, radius, and attenuation. DirectionalLight and SpotLight nodes have a direction.
These X3D scenes are adapted directly from the original VRML 2.0 Sourcebook chapter examples. Also available: Introduction to VRML97 SIGGRAPH98 course notes.
This X3D VRML2 Sourcebook Chapter 20 Lighting examples archive is online.
The X3D Java Scene Access Interface (x3djsail) package provides concrete classes for each X3D node and statement.
Online: X3D Java Scene Access Interface Library (X3DJSAIL) and X3DJSAIL Javadoc
- See Also:
-
ClassDescriptionA sphere world illuminated by the headlight.A flat mesh created using an ElevationGrid node.A sphere world illuminated by a point light in the center.A sphere world illuminated by a point light with its ambient intensity set high.A sphere world illuminated by a point light with attenuation control.A sphere world illuminated by a point light with a small radius.A glowing sphere within a gothic building.A blinking lightbulb showing multiple lighting effects.A sphere world illuminated by a DirectionalLight aiming to the right.A sphere world illuminated by a DirectionalLight aiming up and to the right.A sphere world illuminated by a DirectionalLight aiming up and to the right.A DirectionalLight used to simulate the sun at sunrise.A DirectionalLight used to simulate the sun at noon.A DirectionalLight used to simulate the sun at sunset.A DirectionalLight simulates the sun from sunrise through sunset, animated using multiple interpolators.A sphere world illuminated by a SpotLight aiming to the right.A sphere world illuminated by a wide-angle SpotLight aiming to the right.Three meshes illuminated by separate spotlights, with outer cone set to 45 degrees and inner cones set to 45, 22 1/2, and 1/2 degrees respectively.A simple world without fake shadows.A simple world with fake shadows.