Sound { exposedField SFVec3f direction 0 0 1 exposedField SFFloat intensity 1 exposedField SFVec3f location 0 0 0 exposedField SFFloat maxBack 10 exposedField SFFloat maxFront 10 exposedField SFFloat minBack 1 exposedField SFFloat minFront 1 exposedField SFFloat priority 0 exposedField SFNode source NULL field SFBool spatialize TRUE }Explanation :
Sound node describes the positioning and spatial presentation of a sound in a VRML scene. The sound is located at a point in the local coordinate system and emits sound in an ellipsoid pattern. The ellipsoid is pointed in a specific direction determined by the direction field. The shape of the ellipsoid may be modified to provide more or less directional focus from the location of the sound.
The source field specifies the sound source for the Sound node. If there is no source specified, the Sound node will emit no audio. The source field shall specify either an AudioClip node or a MovieTexture node. MovieTexture nodes specified as the sound source shall refer to a movie format that supports sound (e.g., MPEG1-Systems, see 2.[MPEG]).
The intensity field linearly adjusts the volume of the sound source within the world. The intensity is a value that ranges from 0.0 to 1.0 and specifies the volume of the sound source at the location of the source. An intensity of 0.0 represents silence; an intensity of 1.0 specifies that sound shall be played at full volume at the location of the source.
The priority field provides a hint for the browser to choose which sounds to play when there are more sounds active than sound channels available. The priority field varies between 0.0 and 1.0, with 1.0 being the highest priority and 0.0 the lowest priority.
A sound's location field determines the location of the sound source in the local coordinate system. A sound may only be audible if it is part of the traversed scene; sound nodes that are descended from LOD, Switch, or any grouping or prototype node that disables traversal (i. e., drawing) of its children are not audible unless they are traversed. If a sound is disabled under a Switch or LOD node, and later it becomes part of the traversal again, the sound shall resume where it would have been had it been playing continuously.
The minFront field specifies a positive distance along the direction vector that is in front of the sound location . The minBack field specifies a negative distance along the direction vector that is behind the sound location. The sound location determines one focus of an ellipsoid defined by the minBack, minFront, and the direction fields. This minimum (inner)ellipsoid defines a region of space that full intensity sound is audible (i. e., no sound attenuation).
The maxFront field specifies a positive distance along the direction vector that is in front of the sound location. The maxBack field specifies a negative distance along the direction vector that is behind the sound location. The sound location determines one focus of an ellipsoid defined by the maxBack, maxFront, and the direction fields. This maximum (outer) ellipsoid defines a region of space that bounds the audibility of the sound (i. e., no sound is audible outside this region).
If minFront equals minBack, and maxFront equals maxBack, the sound is omni-directional, the direction vector is ignored, and the min and max ellipsoids become spheres centred around the sound node. The fields minFront, maxFront, minBack, and maxBack are specified in the local coordinate system (i. e., scaled by the ancestors' transformations) and shall be >= 0.0. The minBack field shall be <= maxBack, and minFront shall be <= maxFront.
The minimum (inner) ellipsoid defines a region of full intensity for the sound. Within that region the sound will play at the intensity specified in the intensity field. The maximum (outer) ellipsoid determines the maximum extent of the sound. Outside that region, the sound cannot be heard at all. In between the two ellipsoids, the intensity drops off proportionally with the distance. These relationships are depicted in Figure 6.13. The sound intensity received at a given point, I(d), where d is the distance from the viewer location to the sound location, is computed as follows:
I(d) = full intensity, if d is inside minimum ellipsoid, = full intensity * (1-(d'/d")), if d is outside the minimum ellipsoid and inside the maximum ellipsoid, where d' is the distance from the viewer location to the point of intersection with the minimum ellipsoid along the vector from the viewer location to the sound location, and, d" is the distance from between in the intersection points of the viewer location to sound location vector and the minimum and maximum ellipsoids. = 0.0, if outside maximum ellipsoid.
The spatialize field determines if the sound shall also be directionally located (i. e., directional attenuation as well as distance attenuation). If the spatialize field is TRUE, the sound shall be treated as a monaural sound emanating from the sound location, and the viewer's location, as well as direction of view, must be factored into the intensity computation. The viewer is considered to have a uniform spherical receptor. If the spatialize field is FALSE, directional affects shall be ignored; the viewer's direction of view has no effect.
create rendered objects in the world. The appearance field specifies an Appearance node that specifies the visual attributes (e. g., material and texture) to be applied to the geometry. The geometry field specifies a geometry node. The specified geometry node is rendered with the specified appearance nodes applied.