Lights Editor

May 6, 2026 ยท View on GitHub

The Lights Editor page lets you view and edit the two lighting data files that together define a car's complete lighting setup in ForzaTech: lights.bin and LightPresets.bin. Both files can be loaded independently or together, and each has its own editing tab.


Overview of the Two Files

FilePurpose
lights.binDefines each individual light source on the car - its world-space position, rotation, which model it is attached to, and which preset it references
LightPresets.binA shared library of light preset definitions - each preset stores the full visual parameters for a light (colour, intensity, type, glow, cone angle, shadows, etc.)

A light entry in lights.bin names a preset from LightPresets.bin via its PresetName field. This separation means many different cars can share the same preset library, and changing a preset affects every car that uses it.


Opening Files

  • Drag and drop lights.bin, LightPresets.bin, or a .zip archive containing both onto the page.
  • Files can also be loaded via the Open button in the toolbar.
  • When a .zip is dropped, the tool automatically extracts and loads both files if present.

The page shows the Lights tab and Presets tab independently. Each tab becomes active as soon as its respective file is loaded.


Page Layout

AreaDescription
Tab barSwitches between the Lights tab (lights.bin) and the Presets tab (LightPresets.bin)
Lights tabModel attachment list on the left, light entries in the centre, light properties on the right
Presets tabPreset list on the left, parameter table and editors on the right
Status barShows the loaded file path, version info, and light/preset counts

Lights Tab (lights.bin)

File Format

lights.bin is a little-endian binary file. Its layout depends on the version stored in the header:

VersionHeaderNotes
0No magic or version field - file starts directly with the attachment countOldest format, found in early Horizon titles
10xDEADBEEF magic + version uint32Adds LOD override entries after the light list
20xDEADBEEF magic + version uint32Adds a PresetName string field per light entry
30xDEADBEEF magic + version uint32Adds a 16-byte GUID per light entry

The binary structure written per light entry is:

4 bytes  - ID (uint32)
4 bytes  - Flags bitmask (uint32)
4 bytes  - AttachmentIndex (uint32)
16 bytes - Position XMFLOAT4 (x, y, z, w)
16 bytes - Rotation quaternion XMFLOAT4 (x, y, z, w)
16 bytes - DamagePosition XMFLOAT4
16 bytes - DamageRotation XMFLOAT4
[v2+] variable - PresetName (uint32 length + ASCII chars, no null terminator)
[v3+] 16 bytes - GUID (Data1:uint32, Data2:uint16, Data3:uint16, Data4:byte[8])

Attachment List (Left Panel)

The left panel lists all model attachments in the file. An attachment is a reference to a .modelbin asset that one or more lights are parented to. Each attachment stores:

  • Full Path - the in-game asset path to the modelbin.
  • Bone Index - the skeleton bone index within that modelbin that the attachment is anchored to.

Light Entries (Centre Panel)

ColumnDescription
IndexZero-based position of this light in the file
ID (Hex)The light's unique 32-bit identifier (0xXXXXXXXX)
NameResolved friendly name from the hash mapper (if known)
FlagsActive flag names in abbreviated form
AttachmentThe model this light is attached to

Light Properties (Right Panel)

Identity

  • ID / ID Hex - editable as decimal or hex. The hash mapper resolves this to a human-readable name if found in the database.
  • Attachment Index - which model attachment this light is parented to.
  • Preset Name - the name of the LightPresets.bin preset this light references. Use Jump to Preset to navigate directly to that preset in the Presets tab.
  • V3 GUID - 16-byte GUID present in version-3 files.

Transform - Normal State

  • Position (X, Y, Z) - position of the light relative to its attachment bone.
  • Rotation (X, Y, Z, W) - quaternion orientation of the light.

Transform - Damage State

  • Damage Position / Damage Rotation - override transform used when the car has taken damage. Allows lights to shift position to match physically deformed geometry.

Flags

FlagBitDescription
Exterior0x01Light is visible from outside the car
Cockpit0x02Light is visible in the cockpit/interior view
Casts Shadows0x04Light contributes to shadow maps
Hood0x08Light is associated with the bonnet/hood area
Windshield Reflection0x10Light produces a reflection visible through the windshield
Driverless Cockpit0x20Light is active in the driverless cockpit camera mode
Windshield Reflection (Driverless)0x40Windshield reflection in driverless cockpit mode
Proxy LOD0x80Light uses a proxy/LOD representation at distance

The raw flags hex value is editable directly alongside the individual checkboxes.

LOD Overrides

Version-1 and later files include a LOD override section after the light list. Each override entry contains a LOD index, an array ID, and a full Position/Rotation/DamagePosition/DamageRotation transform set. These allow light positions to be adjusted per LOD level to match the simplified geometry used at distance.

ID Source Selection

Use the ID Source selector to choose which hash name dictionary is used for resolving light IDs:

  • FH3 / FH4 - Forza Horizon 3 and 4 light name database.
  • FH5 - Forza Horizon 5 / Forza Motorsport (2023) light name database.

Presets Tab (LightPresets.bin)

File Format

LightPresets.bin uses the LDFB format (LDFB FourCC = 0x4246444C little-endian). The 16-byte header contains:

FieldSizeDescription
FourCC4 bytesLDFB magic identifier
Size4 bytesTotal file size in bytes
Version4 bytesFormat version (1 = V1, 2 = V2)
Preset Count4 bytesNumber of presets in the file

There are two version variants:

V1 (FH3 / FH4): Preset entries follow the header directly. Presets are referenced by position index only.

V2 (FH5 / FM2023): A table of uint32 preset ID hashes (one per preset) is written between the header and the preset data. Each preset can be referenced by its unique ID hash.

Each preset entry starts with an 8-byte block (PresetSize uint32 + ParameterCount uint32), followed by ParameterCount parameter tuples in the wire format: { uint8 id, uint8 length, byte[length] value }.

Preset List

ColumnDescription
IndexZero-based position in the file
ID HexHash ID (V2 only; V1 shows V1)
Display NameDerived from the LightProjectedTexture parameter if present; otherwise Preset [index] or Preset 0xXXXXXXXX

Parameter Reference

Light Parameters

IDNameTypeDescription
0x00LightEnabledBoolWhether the light source is active
0x01LightTypeUInt32Light shape: Spot (1), PointAmbient (2), SpotSimple (3)
0x02LightColourVec3RGB emission colour (0.0 to 1.0 per channel)
0x03LightRangeFloatMaximum illumination radius in world units
0x04LightIntensityFloatBrightness scalar multiplier
0x05LightPenumbraAngleFloatOuter soft edge angle for spot lights (degrees)
0x06LightConeAngleFloatInner hard cone angle for spot lights (degrees)
0x07LightAttenuationProfileUInt32Distance falloff curve index
0x08LightActivationThresholdFloatMinimum intensity level before the light deactivates
0x09LightActivationTransitionFloatBlend time for activation/deactivation changes
0x0ALightShadowTypeUInt32Shadow mode: ShadowOnly (3), DynamicNoShadow (4)
0x0BLightProjectedTextureStringPath to a projected texture (IES profile or gobo pattern)
0x45LightCinematicsOnlyBoolLight only active during cinematic sequences
0x46LightNonCinematicsBoolLight disabled during cinematic sequences

Glow / Lens Flare Parameters

IDNameTypeDescription
0x0CGlowEnabledBoolEnables the glow/lens flare effect for this preset
0x0DGlowSizeFloatBase size of the glow billboard element
0x10GlowBrightnessFloatOverall glow brightness multiplier
0x11GlowColourVec3RGB tint of the glow element
0x12GlowPrimaryBrightnessFloatBrightness of the primary glow layer
0x13 - 0x14GlowPrimaryFalloff*FloatStart and end distances for primary glow falloff
0x15GlowSecondaryBrightnessFloatBrightness of the secondary glow layer
0x16 - 0x17GlowSecondaryFalloff*FloatStart and end distances for secondary glow falloff
0x18GlowOcclusionFalloffPowerFloatPower curve for occlusion-based glow fading
0x19 - 0x1AGlowActivation*FloatActivation threshold and transition time for the glow
0x1B - 0x25GlowGlow*variousSub-element: main glow halo shape parameters
0x26 - 0x2EGlowFlare*variousSub-element: lens flare shape and brightness parameters
0x2F - 0x38GlowStreak*variousSub-element: streak/ray shape parameters
0x39 - 0x3CGlowOcclusion*variousOcclusion cone and radius parameters
0x3D - 0x3FGlowDistanceFade*variousDistance-based fade start, end, and amount
0x47GlowCubeMapOnlyBoolGlow only visible in cube map captures
0x48GlowFlareRotationSpeedFloatRotation speed of the animated flare element

Editing Parameters

Click any parameter row to edit it. The input control adapts to the parameter type:

  • Bool - checkbox toggle.
  • Float - numeric spinner (4 decimal places).
  • UInt32 - numeric field; LightType and LightShadowType show a named dropdown with their known enum values.
  • Vec3 (colour) - three float fields plus a colour picker swatch.
  • String - text input for the asset path.

Parameters with length = 0 display <default> - the game uses its own built-in default for that parameter.


Saving Changes

lights.bin

Use Save Lights on the Lights tab to write back to the original file, or Save Lights As to choose a new path.

LightPresets.bin

Use Save Presets on the Presets tab to write back to the original file, or Save Presets As to choose a new path.

Saving to ZIP

If both files were loaded from a .zip, use Save to ZIP to write both updated files back into the archive at once, preserving all other archive contents.

Always back up original files before saving. Incorrect flag values, broken transform data, or malformed preset parameters can prevent the game's lighting system from loading the car.


Hash Mapper

The LightHashMapper service resolves raw 32-bit light IDs to human-readable names using a bundled JSON dictionary. Unknown IDs display as their raw hex value. Custom hash mappings can be added by extending the dictionary file in the app's data folder.


Tips

  • Use the Filter box above the light list to search by name, hash, or flag value.
  • Jump to Preset on any light entry switches directly to the Presets tab and selects that preset - useful for quickly checking what colour and intensity a light has without manually browsing the preset list.
  • When both files are loaded from the same car's bundle, each light's preset name resolves to its display name from the loaded LightPresets.bin.