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 Models       X3D Model Descriptions
   Figure20_04HeadlightSpheres Figure20_04HeadlightSpheres A sphere world illuminated by the headlight. Also see Figures 20.4, 20.6a, 20.6b, 20.7, 20.8 for comparison.
   Figure20_05FlatMesh Figure20_05FlatMesh A flat mesh created using an ElevationGrid node.
   Figure20_06aPointLightSpheres Figure20_06aPointLightSpheres 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 Figure20_06bPointLightSpheresIntensity 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 Figure20_07PointLightSpheresAttenuation 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 Figure20_08PointLightSpheresSmallRadius 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 Figure20_09GlowingOrbArchwaysExhibit A glowing sphere within a gothic building.
   Figure20_10BlinkingRedLightbulb Figure20_10BlinkingRedLightbulb A blinking lightbulb showing multiple lighting effects.
   Figure20_11aDirectionalLightAimingRightThroughSpheres Figure20_11aDirectionalLightAimingRightThroughSpheres A sphere world illuminated by a DirectionalLight aiming to the right. Compare Figures 20.11a, 11b, 12.
   Figure20_11bDirectionalLightAimingUpperRightThroughSpheres Figure20_11bDirectionalLightAimingUpperRightThroughSpheres A sphere world illuminated by a DirectionalLight aiming up and to the right. Compare Figures 20.11a, 11b, 12.
   Figure20_12TwoDirectionalLightsAimingLeftRightThroughSpheres Figure20_12TwoDirectionalLightsAimingLeftRightThroughSpheres A sphere world illuminated by a DirectionalLight aiming up and to the right. Compare Figures 20.11a, 11b, 12.
   Figure20_13aDirectionalLightSunrise Figure20_13aDirectionalLightSunrise A DirectionalLight used to simulate the sun at sunrise. Compare Figures 20.13a, 13b, 13c, 14.
   Figure20_13bDirectionalLightNoon Figure20_13bDirectionalLightNoon A DirectionalLight used to simulate the sun at noon. Compare Figures 20.13a, 13b, 13c, 14.
   Figure20_13cDirectionalLightSunset Figure20_13cDirectionalLightSunset A DirectionalLight used to simulate the sun at sunset. Compare Figures 20.13a, 13b, 13c, 14.
   Figure20_14DirectionalLightSunAnimated Figure20_14DirectionalLightSunAnimated A DirectionalLight simulates the sun from sunrise through sunset, animated using multiple interpolators. Compare Figures 20.13a, 13b, 13c, 14.
   Figure20_15aSpotLightSpheres Figure20_15aSpotLightSpheres A sphere world illuminated by a SpotLight aiming to the right. Compare Figures 20.15a, 15b.
   Figure20_15bWideAngleSpotLightSpheres Figure20_15bWideAngleSpotLightSpheres A sphere world illuminated by a wide-angle SpotLight aiming to the right. Compare Figures 20.15a, 15b.
   Figure20_16SpotLightBeamWidthComparison Figure20_16SpotLightBeamWidthComparison 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 Figure20_17aSimpleWorldNoShadows A simple world without fake shadows. Compare Figures 20.17a, 17b.
   Figure20_17bSimpleWorldFakeShadows Figure20_17bSimpleWorldFakeShadows A simple world with fake shadows. Compare Figures 20.17a, 17b.

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