Table 6.47 — DRM_Cone_Directional_Light

Property

Description

Class

  • <DRM Cone Directional Light>

Superclass

Subclass

  • None.

Definition

An instance of this DRM class is a <DRM Directional Light Behaviour>, the intensity of which varies depending on the observer's position relative to the light's location, direction, and shape. This light takes the shape of a cone, which can be elliptical.

A <DRM Cone Directional Light> instance can specify a plane that divides the light cone into an upper and a lower section along the body of the cone. The upper section receives the primary colour while the lower section receives the secondary colour, if one is used.

Class diagram

Figure 6.49 — DRM_Cone_Directional_Light

Inherited field elements

Field name

Range

Field data type

None

   

Field elements

Field name

Range

Field data type

has_plane1

 

Boolean

plane_angular_offset2

 

Long_Float

use_full_intensity3

 

Boolean

minimum_colour_intensity4

[0.0..1.0]

Long_Float

invisible_behind5

 

Boolean

Associated to (one-way) (inherited)

  • None.

Associated to (one-way)

  • None.

Associated by (one-way) (inherited)

  • None.

Associated by (one-way)

  • None.

Associated with (two-way) (inherited)

  • None.

Associated with (two-way)

  • None.

Composed of (two-way) (inherited)

Composed of (two-way metadata) (inherited)

  • None.

Composed of (two-way metadata)

  • None.

Component of (two-way) (inherited)

Component of (two-way)

  • None.

Constraints

Clarifications

1 If this value is TRUE, a plane, based at the cone apex and extending along the body of the cone, divides the light cone into an upper and a lower section. The upper section receives the primary colour. If a secondary colour is used, the lower section receives it.

2 If has_plane is TRUE, this value defines the angular offset of the plane measured in degrees (-180, 180) from the <DRM Lobe Data> instance's LIGHT_DIRECTION vector and along its VERTICAL_AXIS vector.

The resulting upper section of the light is taken to be between the plane and the positive end of the VERTICAL_AXIS vector.

This value is ignored if has_plane is FALSE.

3 If this value is TRUE, it indicates that the full intensity of the light is shown in the cone shaped area. Otherwise, the intensity of the light decreases (towards the minimum_colour_intensity value) as one moves away from the LIGHT_DIRECTION vector.

4 This value is used in conjunction with the primary colour's intensity value. If the primary colour is represented by a <DRM Colour Index> instance, the full intensity is specified by its intensity_level field. If the primary colour is represented by an <DRM Inline Colour> instance, the full intensity is 1,0.

A location in the direct path of the <DRM Lobe Data> instance's LIGHT_DIRECTION vector receives the full intensity value. If use_full_intensity is FALSE, the intensity decreases with increasing distance from the LIGHT_DIRECTION vector, until the boundary specified by the horizontal and vertical <DRM Lobe Data> widths is reached. Outside the lobe, the intensity is minimum_colour_intensity.

If the minimum_colour_intensity value is 0,0, the secondary colour (if present) will be seen outside the lobe. If no secondary colour is present, nothing is visible outside the lobe.

5 If this value is TRUE, the directional light is invisible when viewed from behind the plane of the directional light.

6 This specifies the lobe shape.

Example(s)

  • A 100 kilometre highway has regularly spaced lampposts. Each lamp has <DRM Cone Directional Light> with <DRM Lobe Data> pointing down. If all the lamps use the same <DRM Cone Directional Light>, instance, then all the directions will be parallel. Due to the curvature of the Earth, very few of the lights will shine directly down; the others will be slightly skewed. If, instead, the set of lamps is divided into smaller contiguous groups, each with its own <DRM Cone Directional Light> instance using a <DRM Location> near the centre of the group, the skewing effect will be greatly minimized.

  • Consider a <DRM Cone Directional Light> instance with a primary colour that is a <DRM Colour Index> with intensity_level = 0.8.

    Cone Directional Light, Example 2

    Figure 6.50 — <DRM Cone Directional Light> example

    equation:
    final_intensity = minimum_colour_intensity + ((((width / 2,0) - degrees_away_from_direction_vector) / (width / 2,0)) * (full_intensity - minimum_colour_intensity))

    At 15 degrees from the light direction vector in the horizontal direction, the final intensity is 0,35.

    At 25 degrees from the light direction vector in the horizontal direction, the final_intensity is 0,2, because that position lies outside the horizontal width of the lobe.

  • Consider the following <DRM Cone Directional Light> instance, with its primary colour specified by an <DRM Inline Colour>, so that the full intensity is 1,0.

    Cone Directional Light, Example 3

    Figure 6.51 — <DRM Cone Directional Light> example

    At 40 degrees from the light direction vector in the horizontal direction, the final_intensity is 1,0, because use_full_intensity is TRUE and the position lies inside the horizontal width of the lobe.

    At 50 degrees from the light direction vector in the horizontal direction, the final_intensity is 0,5, because the position is outside the horizontal width.

  • Consider a <DRM Cone Directional Light> instance with both a primary and a secondary colour, each of which is a <DRM Colour Index> instance with intensity 0,8

    Cone Directional Light, Example 4

    Figure 6.52 — <DRM Cone Directional Light> example

    At 40 degrees from the light direction vector in the vertical direction, the primary colour is in effect with intensity 0,8, because the position is inside the vertical width and use_full_intensity is TRUE.

    At 40 degrees from the light direction vector in the horizontal direction, the secondary colour is in effect with intensity 0,8, because the position is outside the horizontal width and minimum_colour_intensity = 0,0.

  • Consider a <DRM Cone Directional Light> instance with both a primary and a secondary colour, each of which is a <DRM Colour Index> instance with intensity 0,8,

    Cone Directional Light, Example 5

    Figure 6.53 — <DRM Cone Directional Light> example

    At 25 degrees from the light direction vector in the vertical direction, towards the positive end of the vertical axis vector, the full intensity of the primary colour is 0.8, because this position lies in the upper section of the cone and the minimum_colour_intensity is 0,0.

    At 15 degrees from the light direction vector in the vertical direction, towards the positive end of the vertical axis vector, the full intensity of the secondary colour is 0,8, because this position lies in the lower section of the cone and the minimum_colour_intensity is 0,0.