Setting Up Emergency Lights

Basics

Emissive Models and Textures

Models for emergency light emissive objects have to use the vehicle_lightsemissive shader (more information in our Materials and Shaders guide). They are mapped to colored textures that support transparency. The game then brightens these textures and applies a bloom affect based on the colors used in the texture.

visualsettings.dat

GTA used to support shader properties to increase the brightness of emissive materials, however, this feature was removed (possibly by accident) in a patch a short while after the PC release. Now, to increase the brightness of emergency lights, it is necessary to modify the visualsettings.dat file.


Many graphics mods include settings for bright emergency lights. Standalone modifications like Improved Emergency Lights are also available.



Note: Increasing the brightness of emergency lights also effect other lights, for example roof advertisements on taxis.


The following settings affect emergency lights:

Code: update/update.rpf/common/data/visualsettings.dat
car.defaultlight.day.emissive.on    15.00
car.defaultlight.night.emissive.on    6.00
car.defaultlight.day.emissive.off    0.05
car.defaultlight.night.emissive.off    0.003

The off settings are used while the engine is off (usually kept unchanged), the on settings while the engine is on. The values for on usually need to be increased to values around 500-1500, depending on the graphics mods used and the brightness desired.


Default Lights (non-ELS)

The default lighting system used by GTA is commonly referred to as non-ELS to differentiate it from cars set up for the ELS modification. No mods are required to use non-ELS cars.

Model

The game's configuration files, and therefore also this guide, refers to each light object as "siren". The game supports a maximum of 20 sirens by default, their objects are named siren#, # being a number from 1 to 20. The SirenSetting Limit Adjuster mod increases the number of sirens to 32.


A siren object can either be just a dummy or a compound of a model with LODs. The light's corona will be positioned at the axis of the siren object. The following types of lights can be achieved using sirens:

  • A flashing object with an optional corona.
  • A rotating object with an optional corona.
  • A corona without any object.


A light object must be assigned to the vehicle_lightsemissive shader.


Note that the positioning of the objects is not rendered precisely by the game engine. To prevent emissive models from clipping into other models, a gap of roughly a millimeter between these meshes is recommended.

Scale

To make lights flash, the game will scale them up and down. Sirens will always be visible, but while they are off, they are smaller and usually hidden inside other parts of the model, such as the lightbar. By default, the game uses a model scale of 0.5, and therefore a scale multiplier of 2 in the siren settings (see below).


It is possible to use higher values such as a model scale of 0.1 and a multiplier of 10 respectively or 0.01 and 100, however, it is recommended to keep the scale factor as low as possible: As the game deforms the light at its original small scale after a collision, the lights can move out of position while they are active and the vehicle is deformed. This effect is more noticeable as the scale multiplier gets higher. If high scale settings are necessary, it is possible to set up the siren with a parent misc object with a breakable glass collision, causing it to break and disappear rather than deform and move out of position.

Rotation

To achieve that the corona and the environment reflections point in the correct direction, the siren must be rotated in the siren settings (see below). This rotation also rotates the object itself, in order to match the rotation of the environment reflections and the object, the model must therefore point towards the front of the vehicle. The rotation value of the siren settings must match the rotation of the model, for example, if a light is angled towards the driver side front (45° angle in the siren settings), then the siren model or its respective axis must be rotated by -45°.

Configuration

sirensettings

Every vehicle has a siren setting ID assigned in the carvariations.meta. The ID 0 disables all lights. The siren settings themselves are found in the carcols.meta. These settings include for example the flashing speed, size of the environment reflection, color and patterns. By default, the game supports IDs up to 255, the SirenSetting Limit Adjuster mod can be used to increase this limit to 65535.


To set up siren settings, the Live Lights tool is recommended, it allows adjusting all values in-game on the fly and exporting a carcols.meta with the intended settings.


Patterns are set with a 32 bit binary sequencer, set as a decimal number in the carcols.meta. A 1 turns the light on, a 0 off, with each number being one beat. For example, the sequencer 10101010101010101010101010101010 is set as 2863311530. Our Sequencer Converter or Live Lights can be used convert the decimal sequencer to binary and back.


Rotations are set as radians in the carcols.meta, a rotation of 180° corresponds to a delta value of 3.14159274. Our Degree and Radian Converter or Live Lights can be used to convert the radians to degrees and back.


When sirens are angled (delta value other than 0), adjustments to the start value will be necessary, otherwise the corona will not be in sync with the mesh. To determine the optimal start value, you can use our Start Value Calculator and input your delta value, either in radians (like in the carcols.meta) or in degrees, and copy the resulting start value to your carcols.meta. The required start value shifts based on the delta value. This shift increases for each siren. To determine the optimal start value in degrees, the following calculation is used, X being the siren ID, Y being the delta value in degrees: (X - 1) * Y - (Y / 11.25°) * 360°. For a steady instead of a flashing corona, 180° needs to be added or subtracted.


The syncToBpm setting and speed value can be used to modify the time a light or rotator is active for each beat. It does not allow to change the behavior as if the siren had a different BPM setting, it will still be affected by the beats of the sequencer based on the BPM. The following formula sets a base speed value for syncToBpm set to false, which will be identical to the default behavior with syncToBpm set to true:

BPM value / 100 * 16 = speed value

Increasing this value will make the flash shorter, for example multiplying by 2 results in the light flashing for half a beat. Decreasing the value will make the flash longer, which can be useful for rotators and halogen coronas (see below).


Example carcols.meta with comments to explain the most important settings:

Specific Light Types

External Video www.youtube.com
Content embedded from external sources will not be displayed without your consent.
Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

Rotating Lights and Wig-Wags

More information about settings up rotating lights and halogen corona effects can be found in the guide Rotator Lightbars and Wig-Wags.

Halogen Lights

To create a halogen effect with a flashing siren object and a fading corona, disable the syncToBpm setting and use one of the following sequencers and speed values in the flashiness section, sorted from fastest to slowest:

  • Sequencer: 10101010101010101010101010101010 (2863311530) - Speed value: BPM value / 100 * 16
  • Sequencer: 10001000100010001000100010001000 (2290649224) - Speed value: BPM value / 100 * 8
  • Sequencer: 10000000100000001000000010000000 (2155905152) - Speed value: BPM value / 100 * 4
  • Sequencer: 10000000000000001000000000000000 (2147516416) - Speed value: BPM value / 100 * 2

To calculate the speed value and to find example sequencers for different speeds, our Speed Value Calculator can be used. Note that the sequencers listed here in and the calculator are the most common examples, shifting the starting position is possible as long as the spacing of 1s and 0s is kept the same.


To create an overlap where both the left and right emissives are active at the same time, the speed value can be decreased to almost half of the calculated speed value. Note that it must always stay above half (speed value / 2 + 1), otherwise the mesh will become steady instead of flashing.


If the lights do not point at the front (delta value other than 0), adjustments to the start value will be necessary to make sure the corona and the mesh flash at the same time. To determine the optimal start value, you can use our Start Value Calculator.


Strobe Lights

To create a strobe effect, disable the syncToBpm setting and use a very high speed value in the flashiness section to decrease the time of the light being active for each beat. The speed value must be higher than the base value as described in the sirensettings section, in most cases a value of at least double the base value is recommended. To calculate this speed value, our Speed Value Calculator can be used, with the siren type set to strobe.


If the lights do not point at the front (delta value other than 0), adjustments to the start value will be necessary. To determine the optimal start value, you can use our Start Value Calculator, with the siren type set to flashing corona.


Steady Lights

To create a steady corona, it is necessary to set syncToBpm to false and the speed value to 0 in the flashiness section. Adjustments to the start value that depend both on the siren ID and the delta value are necessary. To determine the optimal start value, you can use our Start Value Calculator, with the siren type set to steady corona.


Dynamic Lighting System (DLS)

Dynamic Lighting System expands the default lighting system to add light stages, traffic advisor patterns and other features. As DLS uses the default lighting system, DLS vehicles can still be used with properly working lights if DLS is not installed.

Model

DLS expands the games' default lights, vehicles are therefore set up with the default lighting system.

Configuration

DLS uses .xml configuration files per vehicle. The vehicle configuration file must have the same name like the vehicle slot. Each file contains multiple sirensettings, one for each light stage. In addition, vehicles can be assigned a traffic advisor configuration file, which can have any name. The name of the traffic advisor configuration is set in the vehicle configuration file.


The default configuration files include comments which explain each setting.


Emergency Lighting System (ELS)

Instead of using siren objects, ELS toggles extra components. ELS vehicles are not compatible with vehicles using the default lights or DLS, ELS must be installed in order to use any ELS-compatible vehicle. ELS allows switching between many patterns in-game, however it does not allow creating custom patterns.


ELS is no longer in active development, it has not been updated in 5 years as of the publishing date of this guide. There are many known issues and bugs, for example performance issues due to the extra toggling, issues with AI vehicles using different patterns, or takedown environment lights pointing to the back of a vehicle.

Model

Rather than create sirens, emissives are therefore set up as extras. Extra components are compounds named extra_#, # being a number from 1-12. Note that extra 10 must be named extra_ten. The emissive models are assigned to the vehicle_lightsemissive shader, however unlike with default lights, rotations or scaling are not necessary. As ELS allows enabling the default lights, it is possible to combine both ELS and default lights on a single car.


ELS uses preset extra configurations for its lights. Extras 1-4 are used for the primary lights, which are all active in stage 3, while in stage 2 only two of these extras (either 1 and 4 or 2 and 3) are active. Extras 5 and 6 are warn lights, they are active at stage 3 only. Extras 7-9 are used for the secondary lights, which are active for all stages. Extra 10 is used for steady burn lights for all stages, extra 11 for takedowns and extra 12 for alley lights.


At axis of the extra, ELS creates a corona in the color defined in the configuration file. This corona will be only appear as you move further away from the car and is used to make the lights appear bright at higher distances. The direction and pull values of the coronas cannot be changed, which can cause lights to appear visible through other meshes or from wrong directions.

Configuration

ELS uses .xml configuration files per vehicle. The vehicle configuration file must have the same name like the vehicle slot. The files include settings for the color and position of environment lighting effects as well as the preset patterns for each stage.

Authors

  • Cj24
    Administrator Accurate Studio

Don’t have an account yet? Register yourself now and be a part of our community!