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.
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.
The inner radius describes the minimum distance for a light to appear. If the distance to the source is shorter, no light is applied.
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.
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 |
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:
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.
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.
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.
Spot lights are useful in these scenarios: object lights, streetlights, headlights and rear lights.
Line lights are advanced spot lights with a direction ray (v) and a spot ray described by a line rotation (alpha l).
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 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.
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.
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 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.