Train Simulator NEXT
In This Topic
    Lights
    In This Topic

    Train Simulator NEXT supports a lot of different light types and uses a physical based light system.

    This documentation page describes how lights work and how to use them.

    Design of all lights

    All and most lights have these properties:

    Most properties can be found in the light settings and the light design window.

     

    The following section describes some properties:

    The light radius describes how far a light transmits its light in the world. From this information, Train Simulator NEXT computes a realistic light curve. The following function curve describes how the light intensity appears over its radius:

    This function curve presents the light intensity over a distance in Train Simulator NEXT. In this example, a light with a radius of 40 m was used.

    This function curve presents the light intensity over a distance in Train Simulator NEXT. In this example, a light with a radius of 40 m was used.

    The inner radius describes the minimum distance for a light to appear. If the distance to the source is shorter, no light is applied.

    Light intensity

    The intensity of light depends on the luminous flux of a light source. To make lights to appear realistic, the luminous flux of a light is describing by a light source type and its power.

    Train Simulator defines these types of lights and luminous flux per watt:

    Light source type Luminous flux
    Edison bulb 17.5 cd/m per W
    Flouroscent 75 cd/m² per W
    Halogen 24 cd/m² per W
    LED 100 cd/m² per W
    Mercury vapor 65 cd/m² per W
    Metal halide 95 cd/m² per W
    Sodium high 200 cd/m² per W
    Sodium low 130 cd/m² per W

    Train Simulator NEXT allows artists to create lights with a luminous up to 200.000 cd/m²; this light has an intensity of light direct light from the sun at daytime at the equator region.

    Please note that the luminous flux relation of a light is in the fourth square root. For example, if the sunlight has a luminous flux of 30.000 cd/m² and the luminous flux is 200.000 cd/m², you get a description of 21.14 / 13.16. This means that the light would be nearby 2 times more intense than the light from the sun. But if you look at the graph above and let's say the light shines 1000 m: at a distance of about 400 m from the light source you get about 40% of the light source power; so 8.4 / 13.16 which results to about 64% of the direct sunlight.

    Light color

    The color of a light source is a very complex topic. In Train Simulator NEXT, it is made easy as possible.

    Either the artist sets up a direct light color or the artist selects a color temperature from a black body. However, if the artist selects a color temperature, it will be read from a pre-computed texture and set as the light color. Train Simulator NEXT does not handle internally how the color temperature behaves over distances, as this gets very wild for real-time performance.

    The way to choose a light temperature is very comfortable for artists, as the behavior of this value is very well known by many people. Here are some typical values for lights:

    Light temperature Color Relation
    1500 K Candle; romantic places or fire places

    2800 K

    Edison bulb; gastronomy and sleeping rooms
    3700 K Warm white; gastronomy and home rooms
    5000 K Typical office and trade rooms
    5500 K Midday sun with fair weather; Offices and trade rooms 
    6500 K Daylight white; Light overcast sky; Very bright offices and trade rooms
    7500 K Lightened bright fog

    Number of rendered lights

    Train Simulator NEXT renders up to these count of lights:

    Light type Minimum count Maximum count
    Point lights 256 1024
    Spot lights 256 1024
    Line lights 128 512
    Area lights 128 512
    Circle lights 128 512
    Projected lights 12 64

    The number of available lights depends on the computing power of the graphics card.

    Train Simulator NEXT sorts the lights from near to far distance by their world space position. Near distance lights are picked at first if the count of lights exceeds the boundary.

    If you set up lights, we recommend these priorities:

    1. In general cases, use point lights. For example: buildings.
    2. You could go to use spotlights for streetlights, if applicable.
    3. You may use a matching light type to simplify complex scenarios or to present important lights. For example,
      1. one or two line lights for the interior of coaches or
      2. two or three projected lights for the headlights, maybe. For rear lights, spot lights are good enough.

    Point lights

    A point light is a described by a position, radius (dr) and an inner radius (di).

    A point light is a described by a position, radius (dr) and an inner radius (di).

    The point light is a very basic light description. Each point light has a position and a radius. An inner radius is also given. The inner radius describes a region where no light is emitted. This is useful, for example, for light source near geometry.

    A point light.

    A point light.

    Point lights are useful in these scenarios: object lights and streetlights. The usage for streetlights (or station lights) is limited, as the light is also cast upwards. For example, there is upper geometry like a station roof, it gets lighted which is potentially not requested.

    Spot lights

    Spot lights are advanced point lights with a direction and a light cone.

    Spot lights are advanced point lights with a direction and a light cone.

    Additionally to point lights, spot lights have a direction ray (v) computed by the yaw and pitch of the light direction and a cone.

    The cone is specified by an inner (gamma i) and an outer angle (gamma o). Inside the inner cone, the received light is equal to the distance function. From the inner cone to the outer cone, this received lights is leveling out. Outside the cone, no light is received. Note that the cone draws a circle around the direction ray.

    A spot light.

    A spot light.

    Spot lights are useful in these scenarios: object lights, streetlights, headlights and rear lights.

    Line lights

    Line lights are spot lights with a direction ray (v) and a line rotation (gamma l).

    Line lights are spot lights with a direction ray (v) and a line rotation (gamma l).

    Line lights are advanced spot lights with a direction ray (v) and a spot ray described by a line rotation (alpha l).

    A line light with its properties.

    A line light with its properties.

    Line lights are very useful for interior lighting of coaches: instead of setting up many point lights, a single line light describes a system better.

    Area lights

    Area lights are alike spot lights but with a rectangle surface as a light source region.

    Area lights are alike spot lights but with a rectangle surface as a light source region.

    Area lights work alike a spot light but having a surface for the light emit region. This region is described by the extend parameters for the x and z axis.

    An area light with its properties.

    An area light with its properties.

    Circle lights

    Circle lights are alike spot lights but with a circle surface as a light source region.

    Circle lights are alike spot lights but with a circle surface as a light source region.

    Circle lights work alike a spot light but having a surface for the light emit region. This circle is described by the extend parameters describing a radius.

    A circle light.

    A circle light.

    Projected lights

    Projected lights are area lights with a texture.

    Projected lights are area lights with a texture.

    If the light hits a surface point, a matching texture coordinate will be computed. The light is sampling the texture for the color intensity of the light.

    Lens Flares

    Lens Flares are bound to lights using the Lens Flare window. Read Lens Flares for information how to create own lens flares and the Lens Flare panel for further information.

    See Also

    Light Panel