Light controlling (QSF)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Information about the light controlling options.

    Light controlling

    In EM5 we have the following elements that can be used as a "light"
    • Light component: Can be used for point, directional and spot lights
    • Flare component: A billboard with an material asset which defines the texture to be used as a flare
    • Emissive maps: A material asset which simulates illumination
    For controlling a light we have following components:
    • Light Animation: Animates the intensity of the an light (with a light or flare component)
    • Material Light Animation: Extended version of the Light Animation component with additional support for animating the instensity of a emissive map
    • Light Controller: Contains information about the position of a light (Used by the Road Vehicle component) and can be used to activate/deactivate the light
    • EM5 Light Time Controller: Activates/Deactivates the light on timely basis (connected to the current game time)
    • EM5 Building Light Time Controller: An extended Version of EM5 Light Time Controller with additional time configuration for the window lights (an using emissive map) of an building
    == Light Animation ==
    This component should be used for any animation usecase of a light. It supports different animation modes and additional options. The animation is done by manipulating the intensity factor (a percentage value how bright the light should be).

    Animation types:
    • PULSE: Pulsing light (simple sinwave pulsing)
    • FLICKER: Flickering light
    • SWITCHING: Light switching between on and off
    • DEFECTIVE: Flickering defective light
    • CUSTOM: A user editable list of intensity factor values
    Options:
    • Active: Indicates if this component is active (-> the light intensity gets animated). This component activates/deactivates also the light/flare component
    • AnimationType: The type of animation to be used
    • AnimationCyle: A time in seconds how long an animation cyle takes. (e.g. an animation cycle of 5 would cause for the SWITCHING animation type that the light will be on for 2.5 seconds and off for 2.5 seconds until the animation repeats)
    • MinIntensity: The minimal intensity factor for the light (Note: This value is ignored for the CUSTOM animation type)
    • Fade: A boolean value which indicates if the light should be faded in/out in activation/deactivation. (Currently the fade time is hardcoded to 3 seconds)
    • CustomAnimationValues: A list of intensity factor values which defines the sequence of the light animation. How long each value is used is determined as follows: AnimationCycle / <Number of custom animation values>. E.g. When 5 values are set by an animation cyle of 1 second each value will be used for 200 ms.
    • CustomAnimationStartOffset: The offset from which the custom animation should start in the configured sequence.
    Note: When a light entity has this component activation/deactivation of the light must be done via this component!

    Material Light Animation

    This component extends the Light Animation component with support to animate an light which uses a emissive map. For the animation the emissive color is changed with an RGB value between 0.0 .0.0 .0.0 (Black) and 1.0 1.0 1.0 (White) The R, G and B channels of the color are set to the same value

    Additional Options to the ones of the Light Animation component:
    • LightMaterial: Holds a refference to a material asset which contains the emissive map to be animated
    • LightMaterialIsInTopParent: Boolean value which indicates in which entity the material is used/located. When "true" the material in the top most entity in a link hierarchy is modified otherwise the material in the entity which contains this component.
    Note: When a light entity has this component activation/deactivation of the light must be done via this component!

    Light Controller

    This component holds information about the position of an light entity. This component is used by the Road Vehicle component find and control the different lights (e.g. Head, Break, Blinker) of an vehicle

    Options:
    • Active: Indicates if the light should be active or not
    • LightPosition: The position of the light
    Light Position values:
    • LIGHTPOSITION_UNDEFINED: The position of the light is undefined
    • LIGHTPOSITION_HEAD: The light should be considered as an head light of the vehicle
    • LIGHTPOSITION_BRAKE: The light should be considered as an break light of the vehicle
    • LIGHTPOSITION_LEFT_BLINKER: The light should be considered as an left blinker light of the vehicle
    • RIGHTPOSITION_LEFT_BLINKER: The light should be considered as an right blinker light of the vehicle
    • LIGHTPOSITION_BLUE: The light should be considered as an blue light of the vehicle (e.g. used by a fire department vehicle)
    Note: When a light entity has this component activation/deactivation of the light must be done via this component!

    EM5 Light Time Controller

    This component controls a light on a time basis. The current game time is used for the check when an light should be switched on or off.

    Options:
    • LightsEmissiveMaterial: A reference to a material asset which contains the emissive map for the light
    • LightEntity: Holds the entity id of the light entity, which should be controlled by this component
    • LightsEarliestOnTime: A time value (between 0:00 and 23:59) on which defines the erliest point in time when the light should be switched on
    • LightsLatestOnTime: A time value (between 0:00 and 23:59) on which defines the latest point in time when the light should be switched on
    • LightsEarliestOffTime: A time value (between 0:00 and 23:59) on which defines the erliest point in time when the light should be switched off
    • LightsLatestOffTime: A time value (between 0:00 and 23:59) on which defines the latest point in time when the light should be switched off
    The actual point in time used for determining if the light should be on or off is a random value between the two values (Earliest/Latest) for the on state and the off state.

    EM5 Building Light Time Controller

    This component extends the EM5 Light Time Controller component with additional options needed for controlling the window lights of an building.

    Options:
    • WindowLightsEmissiveMaterial: A reference to a material asset which contains the emissive map for the window light
    • WindowLightsEarliestOnTime: A time value (between 0:00 and 23:59) on which defines the erliest point in time when the window lights should be switched on
    • WindowLightsLatestOnTime: A time value (between 0:00 and 23:59) on which defines the latest point in time when the light should be switched on
    • WindowLightsEarliestOffTime: A time value (between 0:00 and 23:59) on which defines the erliest point in time when the window lights should be switched off
    • WindowLightsLatestOffTime: A time value (between 0:00 and 23:59) on which defines the latest point in time when the light should be switched off
    The actual point in time used for determining if the window lights should be on or off is a random value between the two values (Earliest/Latest) for the on state and the off state. This component uses the light array of the building component to get the child light entities of a building

    907 times viewed