The SEDRIS Data Representation Model
APPENDIX A - Classes Spot Light |
---|
An instance of this DRM class is a <Base Positional Light> instance that specifies an elliptical cone of influence, the tip of which is the specified <Location 3D> component. The elliptical cone is bounded where it intersects the sphere centred at the tip with radius as specified by the radius field. This results in a truncated elliptical cone. Only objects located within this elliptical cone are affected by the light.
The location of the spot light is specified by the <Location 3D> component. The shape and orientation of the spot light is specified by the <Lobe Data> component L as follows:
These provide the necessary information to position the spot light in the currently applicable SRF, orient the spot light with respect to its SE_REFVEC_VERTICAL_AXIS vector, and identify the direction in which the spot light is pointing. The lobe shape is centred horizontally and vertically around the SE_REFVEC_LIGHT_DIRECTION vector, with origin at the location specified by the <Location 3D> component.
The intensity dropoff is computed as follows. Given a point on a ray in the cone at fixed distance D from the cone apex, if
I0 = intensity on L's SE_REFVEC_LIGHT_DIRECTION vector at distance D,
Ah = the horizontal angle of the ray in radians from SE_REFVEC_LIGHT_DIRECTION vector, and
Av = the vertical angle of the ray in radians from SE_REFVEC_LIGHT_DIRECTION vector;
then the intensity I at the point is:
Case 1: 0.0 < horizontal_drop_off_rate, 0.0 < vertical_drop_off_rate
I = I0 × (1.0 - |Ah| × horizontal_drop_off_rate) × (1.0 - |Av| × vertical_drop_off_rate)
Case 2: 0.0 = horizontal_drop_off_rate, 0.0 < vertical_drop_off_rate
I = I0 × (1.0 - |Av| × vertical_drop_off_rate)
Case 3: 0.0 < horizontal_drop_off_rate, 0.0 = vertical_drop_off_rate
I = I0 × (1.0 - |Ah| × horizontal_drop_off_rate)
A <Model> instance of a theatre has a <Geometry Model> component with a <Union Of Geometry Hierarchy> component, to which is attached a <Spot Light> instance representing a spot light designed to illuminate a single entertainer. The <Spot Light> instance has a <Light Source Control Link> component that turns the light on or off, depending on whether the entertainer is on stage or not.
A headlight that actually emits light could have a <Spot Light> instance with a <Location 3D> component specifying the light mounting location, with light direction facing towards the area to be illuminated.
<Spot Light> can losslessly represent an OpenGL spot light.
<Spot Light>, however, has the additional capability of specifying that the light is to spread horizontally and vertically, while in an OpenGL <Spot Light>, the horizontal and vertical lobe angles shall be identical, as shall the fall off angles.
SE_Long_Float | horizontal_drop_off_rate; | 13 |
---|---|---|
SE_Long_Float | vertical_drop_off_rate; | 14 |
For a <Light Source> instance that is a component of some <Aggregate Geometry> instance(s), apply_to_children provides a mechanism for limiting the scope of the <Light Source> instance. If apply_to_children is SE_TRUE, only <Primitive Geometry> instances in the component tree of those <Aggregate Geometry> instances are affected by the <Light Source> instance. If apply_to_children is SE_FALSE, the <Light Source> instance is not limited to the scope of those <Aggregate Geometry> instances and thus applies globally.
For a <Light Source> instance that is a component of some <Aggregate Geometry> instance, override_positional_lights provides a mechanism to indicate with a value of SE_TRUE that the effect of the <Light Source> instance overrides that of any <Base Positional Light> instances that would have otherwise applied to that <Aggregate Geometry> instance.
EXAMPLE This might be appropriate if the <Light Source> instance is so close to the affected <Geometry Representation> instance(s) that the effects of the <Base Positional Light> instances would be negligible.
If override_positional_lights = SE_FALSE, the effect of the <Light Source> instance is combined with that of any <Base Positional Light> instances that are already in effect.
For a <Light Source> instance that is a component of some <Aggregate Geometry> instance, override_infinite_lights provides a mechanism to indicate with a value of SE_TRUE that the effect of the <Light Source> instance overrides that of any <Infinite Light> instances that would have otherwise applied to that <Aggregate Geometry> instance. If override_infinite_lights = SE_FALSE, the effect of the <Light Source> instance is combined with that of any <Infinite Light> instances that are already in effect.
A value of SE_TRUE for the active_light_value field indicates that the light is on, while a value of SE_FALSE indicates that the light is off. For a <Light Source> instance with a <Light Source Control Link> component X, the value of the active_light_value field is obtained from X.
The radius field, which is specified in metres, together with the <Location 3D> component specifies the zone of influence of the <Base Positional Light> instance.
The constant_attenuation_factor field is the constant "a" in the attenuation quadratic (a + bd + cd2).
The linear_attenuation_factor field is the constant "b" in the attenuation quadratic (a + bd + cd2).
The quadratic_attenuation_factor field is the constant "c" in the attenuation quadratic (a + bd + cd2).
The horizontal_drop_off_rate field specifies, in radians, the horizontal angular intensity distribution of the light. The higher this value, the more focused the light. A value of 0.0 specifies a light that equally illuminates all objects within the cone of influence, and instantly falls to an intensity of 0.0 at the edge of the cone of light.
The vertical_drop_off_rate specifies, in radians, the vertical angular intensity distribution of the light. The higher this value, the more focused the light. A value of 0.0 specifies a light that equally illuminates all objects within the cone of influence, and instantly falls to an intensity of 0.0 at the edge of the cone of light.
|