This page covers how to configure lights on cars including how to use the built in editor.
Car lights are set in the GEN file for the car.
Beneath are some examples of the physical lights. It's important to keep the number of physical lights to a minimum for performance, and additionally only a limited number of lights are rendered at a time.
The values shown are recommended at present for GTE cars (obviously some things like position will need customising for each car).
Glow meshes can additionally be configured as shown below. These meshes are responsible for the glare on the actual headlights.
Let's take a look at each of the values that makes up the lights.
The name of the light signifies it's purpose. There are various options here, but typically only HeadlightL, HeadlightR and TailLight are used.
- Headlight / HeadlightL / HeadlightR
- Taillight / TaillightL / TaillightR - If only one of brake or tail light is specified, then it is copied to the other too.
- Brakelight / BrakelightL / BrakelightR
The following lights are not currently implemented due to previously mentioned performance limitations with the number of physical lights, they can only be specified by glow meshes:
- Rain Light
- Reverse Light
- Warning Light
This is a generic type setting for lights. Car lights should be configured as Spot.
This is relative to the vehicle. X is left to right. Y is up / down, and Z is how far to the front or back of the car.
This is a direction vector for the light along the same axis as the position. It is important to ensure that the these point down on the Y axis around -0.15 typically.
This is near and far range of the headlight. Typically we can not simulate accurately super far headlights of modern cars due to the limit on headlights the game has. It is recommended to set around a maximum of 400-500m for LM classes. For other cars this is likely to be less. Note this value can often be over-ridden by the strength of attenuate settings.
This setting is very important for producing natural and linear headlights. Realistically, car headlights should have quite a high attenuation on the Y axis, slightly less on the X and very low on the Z. This will mean they show very far into the distance, but do not light things up high in the sky or super far to the side.
- Typically we have to set the X value stronger though due to headlights not casting shadows on barriers, which would result in excessive lighting up of areas outside the barriers.
- The Z value (and others), will effectively over-ride the range value. You may need to adjust these to get your range working correctly.
Attenuation settings apply on top of hotspots, fall off and intensity.
The two hot spots configure the coverage of the light. The values are in degrees, the first is the centre hot spot and specifies the area that the light has full coverage. The second is the outer area and specifies where the light fades out. Typically, the first value should be small, and the second quite high. (1, 150).
Fall off controls the power at which the light fades out from the inner hot spot to the outer hotspot.
This is the strength of the light. Headlights can have something in the range of 12-15. Where as rear lights would only have around 1.
Glow meshes are used to give the illusion of light from a surface. They should use the High Lum Sun shader and only cover the area of the bulb.
The following instances are allowed for lights.
- HLIGHTDS \ HLGLO_DS (Driver / Left Side)
- HLIGHTPS \ HLGLO_PS (Passenger / Right Side)
- BLIGHTDS \ BLGLO_DS
- BLIGHTPS \ BLGLO_PS
Developer Mode has a built in Car Headlight editor. This allows you to modify existing properties for lights configured on the car.
Some notes about using the editor and setting up lights:
- It only edits the lights for the currently selected light.
- The settings do not save back to the GEN file, but will persist for the duration of your session.
- You must edit the Left and Right lights separately.
- Any lights not setup in the GEN file will appear with 0 values.
- It is recommended to configure a single car, before then testing it in a large pack. At it's important to consider how the lights look with multiple cars in the same area as well as alone.