Table of Contents Previous Chapter Summary Chapter Viewpoint Slideshow Javadoc for translated java source Next Chapter Summary X3D Resources

X3D Example Archives: VRML 2 Sourcebook, Chapter 20 Lighting

Figure 20.06b Point Light Spheres Intensity

Figure 20.13a Directional Light Sunrise

Lights provide virtual illumination that allows objects to be seen.

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.

  20 X3D Scenes       Scene Descriptions
Figure20_04HeadlightSpheres Figure 20 04 Headlight Spheres A sphere world illuminated by the headlight. Also see Figures 20.4, 20.6a, 20.6b, 20.7, 20.8 for comparison.
Figure20_05FlatMesh Figure 20 05 Flat Mesh A flat mesh created using an ElevationGrid node.
Figure20_06aPointLightSpheres Figure 20 06a Point Light Spheres A sphere world illuminated by a point light in the center. Also see Figures 20.4, 20.6a, 20.6b, 20.7, 20.8 for comparison.
Figure20_06bPointLightSpheresIntensity Figure 20 06b Point Light Spheres Intensity A sphere world illuminated by a point light with its ambient intensity set high. Also see Figures 20.4, 20.6a, 20.6b, 20.7, 20.8 for comparison.
Figure20_07PointLightSpheresAttenuation Figure 20 07 Point Light Spheres Attenuation A sphere world illuminated by a point light with attenuation control. Also see Figures 20.4, 20.6a, 20.6b, 20.7, 20.8 for comparison.
Figure20_08PointLightSpheresSmallRadius Figure 20 08 Point Light Spheres Small Radius A sphere world illuminated by a point light with a small radius. Also see Figures 20.4, 20.6a, 20.6b, 20.7, 20.8 for comparison.
Figure20_09GlowingOrbArchwaysExhibit Figure 20 09 Glowing Orb Archways Exhibit A glowing sphere within a gothic building.
Figure20_10BlinkingRedLightbulb Figure 20 10 Blinking Red Lightbulb A blinking lightbulb showing multiple lighting effects.
Figure20_11aDirectionalLightAimingRightThroughSpheres Figure 20 11a Directional Light Aiming Right Through Spheres A sphere world illuminated by a DirectionalLight aiming to the right. Compare Figures 20.11a, 11b, 12.
Figure20_11bDirectionalLightAimingUpperRightThroughSpheres Figure 20 11b Directional Light Aiming Upper Right Through Spheres A sphere world illuminated by a DirectionalLight aiming up and to the right. Compare Figures 20.11a, 11b, 12.
Figure20_12TwoDirectionalLightsAimingLeftRightThroughSpheres Figure 20 12 Two Directional Lights Aiming Left Right Through Spheres A sphere world illuminated by a DirectionalLight aiming up and to the right. Compare Figures 20.11a, 11b, 12.
Figure20_13aDirectionalLightSunrise Figure 20 13a Directional Light Sunrise A DirectionalLight used to simulate the sun at sunrise. Compare Figures 20.13a, 13b, 13c, 14.
Figure20_13bDirectionalLightNoon Figure 20 13b Directional Light Noon A DirectionalLight used to simulate the sun at noon. Compare Figures 20.13a, 13b, 13c, 14.
Figure20_13cDirectionalLightSunset Figure 20 13c Directional Light Sunset A DirectionalLight used to simulate the sun at sunset. Compare Figures 20.13a, 13b, 13c, 14.
Figure20_14DirectionalLightSunAnimated Figure 20 14 Directional Light Sun Animated A DirectionalLight simulates the sun from sunrise through sunset, animated using multiple interpolators. Compare Figures 20.13a, 13b, 13c, 14.
Figure20_15aSpotLightSpheres Figure 20 15a Spot Light Spheres A sphere world illuminated by a SpotLight aiming to the right. Compare Figures 20.15a, 15b.
Figure20_15bWideAngleSpotLightSpheres Figure 20 15b Wide Angle Spot Light Spheres A sphere world illuminated by a wide-angle SpotLight aiming to the right. Compare Figures 20.15a, 15b.
Figure20_16SpotLightBeamWidthComparison Figure 20 16 Spot Light Beam Width Comparison 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. Combines Figures 20.16a, 16b, 16c.
Figure20_17aSimpleWorldNoShadows Figure 20 17a Simple World No Shadows A simple world without fake shadows. Compare Figures 20.17a, 17b.
Figure20_17bSimpleWorldFakeShadows Figure 20 17b Simple World Fake Shadows A simple world with fake shadows. Compare Figures 20.17a, 17b.

Online at http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter20Lighting

Validate XHTML 1.1

Master source-code model archive is under subversion control at
http://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Chapter20Lighting

The X3D Resources: Examples page and Savage Developers Guide provide more information about the production of this archive.

Table of Contents Previous Chapter Summary Chapter Viewpoint Slideshow Javadoc for translated java source Next Chapter Summary X3D Resources