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

X3D Example Archives: Conformance Nist, Lights, Spot Light

 
 
  32 X3D Scenes       Scene Descriptions
default_complexsl default complexsl Test browser to apply default values of a SpotLight node to complex geometry (ElevationGrid, Extrusion, The test should generate all three complex geometry (Extrusion, ElevationGrid and IndexedFaceSet) with the default color. IndexedLineSet and PointSet are not lit geometry, therefore are not part of this test.
default_primitivessl default primitivessl Test browser to apply all the default values of a SpotLight node to simple geometry (cone, sphere, cylinder, box). A row containing all four simple geometry is drawn in the local coordinate system and a SpotLight node is defined at the beggining of the test. All figures should be illuminated with white light.
test_ambeffect_ambientcom test ambeffect ambientcom This test addresses the effect of the SpotLight ambientIntensity on the ambient of a complex object (IndexedFaceSet). Two IndexedFaceSets are drawn in the local coordinate system and a SpotLight is defined to shine on them along the -Z axis. The IndexedFaceSet to the left contains an ambientIntensity 0.3 and the one to the right contains an initial ambientIntensity of 1. The ambientIntensity of the light is increased on both geometry as the animation progresses. Since both materials ambientIntensity are constants, at the end of the animation the one to the right will be brigther than the one to the left. This is because at the end of the animation the figure to the right will have maximum ambient (both material and light ambientIntensity will be 1)
test_ambeffect_ambientsim test ambeffect ambientsim This test addresses the effect of the PointLight ambientIntensity on the ambient of a simple object (Sphere). Two spheres are drawn in the local coordinate system and a SpotLight is defined to shine on them along the -Z axis. The sphere to the left contains an ambientIntensity 0.3 and the sphere to the right contains an initial ambientIntensity of 1 The ambientIntensity of the light is increased on both spheres as the animation progresses. Since both materials ambientIntensity are constants, at the end of the animation the one to the right will be brigther than the one to the left. This is because at the end of the animation the sphere to the right will have maximum ambient (both material and light ambientIntensity will be 1)
test_ambientcom test ambientcom Test browser to set the ambientIntensity field to a range of values on complex geometry (Extrusion, ElevationGrid and IndexedFaceSet). One row of the complex geometry is drawn in the local coordinate system. The ambientIntensity of the light should increase as the animation progresses. The animation is started by clicking on the text above the geometry. The ambientIntensity ranges from 0 to 1.
test_ambientsim test ambientsim Test browser to set the ambientIntensity field to a range of values on simple geometry (cone, sphere, cylinder and box). one row of the simple geometry is drawn in the local coordinate system. The ambientIntensity of the light should increase as the animation progresses. The animation is started by clicking on the text above the geometry. The ambientIntensity values range from 0 to 1.
test_beamWidthsim1 test beam Widthsim 1 Test browser to set the beamWidth field to a range of values on a set of a simple geometry (sphere) Seven rows of spheres are drawn in the local coordinate system and a single SpotLight is defined at the center. The lights beamWidth is increased as the animation progesses. The animation is started by clicking on the text above the geometry. The cutOffAngle is set to 1.570796 for the light and is never changed. This should cause the whole area illuminated by the light to be lighted at full intensity gradually as the beamWidth is increased. The area of illumination shall be no larger than the maximum value for the cutOffAngle (1.570796). A browser may choose to ignore the beamWidth field.
test_beamWidthsim2 test beam Widthsim 2 Test browser to set the beamWidth field to a range of values on a set of a simple geometry (sphere) Seven rows of spheres are drawn in the local coordinate system and a single SpotLight is defined at the center. The lights beamWidth is increased as the animation progesses. The animation is started by clicking on the text above the geometry. The cutOffAngle is set to 0.4 for for the light and is never changed. This should cause that only the area bounded by the beamWidth (as its value is increased) be illuminated at full intensity. The area between the cutOffAngle and the beamWidth will receive gradually less amount of light. The area of illumination shall never be higher than the one bounded by the cutOffAngle regardless of the beamWidth value. A browser may choose to ignore the bemWidth field.
test_colorcom test colorcom Test browser to set the color field to a range of values on complex geometry (Extrusion, ElevationGrid and IndexedFaceSet). One row of the complex geometry is drawn in the local coordinate system. The amount of RGB color in the light should increase as the animation progresses. The animation is started by clicking on the text above the geometry. The amount of color ranges from 0 0 0 to 1 1 1.
test_colorsim test colorsim Test browser to set the color field to a range of values on simple geometry (cone, sphere, cylinder and box). one row of the simple geometry is drawn in the local coordinate system. The amount of RGB color in the light should increase as the animation progresses. The animation is started by clicking on the text above the geometry. The amount of color ranges from 0 0 0 to 1 1 1.
test_com_attenuationspecial test com attenuationspecial This test checks the special attenuation value of 0 0 0. This value should produce the same behaviour as 1 0 0 (the default value). The light should not attenuate as long as the objects are within the radius of the light. The objects in question are a set of complex geometry (Extrusion, ElevationGrid and IndexedFaceSet). The test starts by clicking on the text above the geometry. The objects will move further away from the light along the Z axis and stop at position 0 0 -50. The intensity of the light should not change at any time during the animation.
test_com_scope test com scope Test browser to shade light only on objects within its the radius field. The figure in question is a complex geometry (ElevationGrid). Four sets of ElevationGrrids are drawn in the XY plane forming cross-like figure and a four SpotLights with radius 5.5 and intensity 1 is also defined at the origin. If the implementation under test does NOT ignore the radius, then the last figure of each set (except the ones along the +X axis) should not be illuminated. (the last two figures along the +X axis should not be illuminated)
test_comc1_attenuation test comc 1 attenuation Test browser to apply attenuation values to a set of complex geometry. The second index of the attenuation field is set to 0.2, which should cause the attenuation to decrease inversively proportional to the distance from the light. The light brightness should decrease as the objects move away from the light.
test_comc2_attenuation test comc 2 attenuation Test browser to apply attenuation values to a set of complex geometry. The third index of the attenuation field is set to 0.1, which should cause the attenuation to decrease inversively proportional to the square of the distance from the light. The light brightness should decrease rapidly as the objects move away from the light. The ambientIntensity and the intensity are set to 1 for all geometry.
test_cutOffAnglesim1 test cut Off Anglesim 1 Test browser to set the cutOffAngle field to a range of values on a set of a simple geometry (sphere) Seven rows of spheres are drawn in the local coordinate system and a single SpotLight is defined at the center. The lights cutOffAngle is increased as the animation progesses. The animation is started by clicking on the text above the geometry. The beamWidth is set to 1.570796 for the light and is never changed. This should cause the whole area illuminated by the light to be lighted at full intensity. The area of illumination shall be no larger than the maximum value for the cutOffAngle (0.4). A browser may choose to ignore the beamWidth field.
test_cutOffAnglesim2 test cut Off Anglesim 2 Test browser to set the cutOffAngle field to a range of values on a set of a simple geometry (sphere) Seven rows of spheres are drawn in the local coordinate system and a single SpotLight is defined at the center. The lights cutOffAngle is increased as the animation progesses. The animation is started by clicking on the text above the geometry. The beamWidth is set to 0.2 for for the light and is never changed. This should cause that only the area bounded by the beamWidth value be illuminated at full intensity. The area between the cutOffAngle and the beamWidth will receive gradually less amount of light. A browser may choose to ignore the beamWidth field.
test_directioncom test directioncom Test browser to apply different direction field values to a complex geometry (ElevationGrid). A set of ElevationGrids arranged in circular pattern along the XY plane are drawn in the local coordinate system. A SpotLight is defined at location 0 0 2 and its direction field is changed as the animation progresses. The test is started by clicking on the tests above the geometry. The intensity is set to 1 and the cutOffAngle and beamWidth fields are set to 0.4 and 0.4 respectively. following is the main parent transform with center at origin.
test_directionsim test directionsim Test browser to apply different direction field values to a simple geometry (Sphere). A set of spheres arranged in circular pattern along the XY plane are drawn in the local coordinate system. A SpotLight is defined at the origin and its direction field is changed as the animation progresses. The test is started by clicking on the tests above the geometry. The intensity is set to 1 and the cutOffAngle and beamWidth fields are set to 0.4 radians.
test_inteffect_diffusecom test inteffect diffusecom This test addresses the effect of the light intensity on the diffuse color of complex geometry. One row of complex geometry is drawn in the local coordinate system and a SpotLight is also defined with radius 50 and intensity 0 at location 0 0 10. The test starts by clicking on the text above the geometry. The intensity of the light is increased as the test progresses and the diffuse color brightness of the objects should also increase. Intensity ranges from 0 to 1. The geometry are originally defined with a diffuseColor of 0 0 1.
test_inteffect_diffusesim test inteffect diffusesim This test addresses the effect of the light intensity on the diffuse color of simple geometry. One row of simple geometry is drawn in the local coordinate system and a SpotLight is also defined with radius 50 and intensity 0 at location 0 0 10. The test starts by clicking on the text above the geometry. The intensity of the light is increased as the test progresses and the diffuse color brightness of the objects should also increase. Intensity ranges from 0 to 1. The geometry are originally defined with a diffuseColor of 0 0 1.
test_inteffect_specularcom test inteffect specularcom This test addresses the effect of the light intensity on the specular color of complex geometry. One row of complex geometry is drawn in the local coordinate system and a SpotLight is also defined with radius 50 and intensity 0 at location 0 0 10. The test starts by clicking on the text above the geometry. The intensity of the light is increased as the test progresses and the specular color of the light should also increase (in a linear fashion). Intensity ranges from 0 to 1. The geometry are originally defined with a diffuseColor of 1 0 0 and a specularColor of 0 1 0.
test_inteffect_specularsim test inteffect specularsim This test addresses the effect of the light intensity on the specular color of simple geometry. One row of simple geometry is drawn in the local coordinate system and a SpotLight is also defined with radius 50 and intensity 0 at location 0 0 10. The test starts by clicking on the text above the geometry. The intensity of the light is increased as the test progresses and the specular color of the objects should also increase (in a linear fashion). Intensity values range from 0 to 1. The geometry are originally defined with a diffuseColor of 1 0 0 and a specularColor of 0 1 0.
test_intensitycom test intensitycom Test browser to set the intensity field to a range of values on complex geometry (Extrusion, ElevationGrid and IndexedFaceSet). One row of the complex geometry is drawn in the local coordinate system. The intensity of the light should increase as the animation progresses. The animation is started by clicking on the text above the geometry. The intensity ranges from 0 to 1.
test_intensitysim test intensitysim Test browser to set the intensity field to a range of values on simple geometry (cone, sphere, cylinder and box). one row of the simple geometry is drawn in the local coordinate system. The intensity of the light should increase as the animation progresses. The animation is started by clicking on the text above the geometry. The intensity ranges from 0 to 1.
test_locationcom test locationcom Test browser to apply different location field values to a complex geometry (ElevationGrid). A set of ElevationGrids arranged in circular pattern along the XY plane are drawn in the local coordinate system. A SpotLight is defined at location 0 6 2 and its location field is changed as the animation progresses. The test is started by clicking on the tests above the geometry. The intensity is set to 1 and the cutOffAngle and beamWidth fields are set to 0.5 and 0.4 respectively.
test_locationsim test locationsim Test browser to apply different location field values to a simple geometry (Sphere). A set of spheres arranged in circular pattern along the XY plane are drawn in the local coordinate system. A SpotLight is defined at location 0 6 1 and its location field is changed as the animation progresses. The test is started by clicking on the tests above the geometry. The intensity is set to 1 and the cutOffAngle and beamWidth fields are set to 0.5 and 0.4 respectively.
test_on test on This test sets the on field to true/false for two SpotLight node defined using two different Transform node. The test should generate two default size Spheres. The leftmost one should be illuminated and the rightmost one should be dark.
test_red_on_blue test red on blue This test addresses the ability of a browser to apply a colored (red) light on an object of a different color (blue). Four simple geometries are defined in the local coordinate system and the emissive and diffuse color are both set to 0 0 1. A Spotlight is also defined and a red color is associated with it. The dot product of the light and object color produce a black appearing object.
test_sim_attenuationspecial test sim attenuationspecial This test checks the special attenuation value of 0 0 0. This value should produce the same behaviour as 1 0 0 (the default value). The light should not attenuate as long as the objects are within the radius of the light. The objects in question are a set of simple geometry (cone, spehere, box and cylinder). The test starts by clicking on the text above the geometry. The objects will move further away from the light along the Z axis and stop at position 0 0 -50. The intensity of the light should not change at any time during the animation.
test_sim_scope test sim scope Test browser to shine light only on objects within its radius. The objects in question are a set of simple geometry (Cone, Sphere, Cylinder, and Box). A set of four simple geometry is drawn in the local coordinate system and four SpotLight node are also defined along the X, Y axis with radius 5.5 and intensity 1 at location 0 0 0 (with different directions). If the implementation under test does NOT ignore the radius, then the last figure of each set should not be illuminated.
test_simc1_attenuation test simc 1 attenuation Test browser to apply attenuation values to a set of simple geometry. The second index of the attenuation field is set to 0.2, which should cause the attenuation to decrease inversively proportional to the distance from the light. The light brightness should decrease as the objects move away from the light.
test_simc2_attenuation test simc 2 attenuation Test browser to apply attenuation values to a set of simple geometry. The third index of the attenuation field is set to 0.1, which should cause the attenuation to decrease inversively proportional to the square of the distance from the light. The light brightness should decrease rapidly as the objects move away from the light. The intensity and the ambientIntensity are set to 1 for all geometry.

Online at http://www.web3d.org/x3d/content/examples/ConformanceNist/Lights/SpotLight

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/ConformanceNist/Lights/SpotLight

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