Skip to content

light.ron

Sun, fill light, colour grade and haze. Read by the game client only: a change here changes how it looks or sounds, never how it plays.

File: assets/data/light.ron

How the light looks (crates/client/src/daynight.rs): the sun, the light that fills shadows, and the camera’s grade and vignette, by day and at night (in between follows the daylight). Only the look: what zombies see by is the simulation’s own. Every field is optional; one left out takes the value shown.

The file is one LightLook.

How the light looks, from the data folder’s light.ron (every field optional: one left out takes its default, no file at all the shipped one). Only the look: the sim’s own daylight (what zombies see by) is sim::senses::daylight.

Field Type What it is
sun SunLook
moon MoonLook The moon: its brightness in lux and its colour (sRGB).
soft_shadows f32 How wide the sun and moon are, as a soft shadow’s size (0 = hard-edged shadows). Only drawn soft with the graphics settings’ soft shadows on.
fill_day FillLook The light in the shadows: its colour (sRGB) and brightness.
fill_night FillLook
grade_day GradeLook The camera’s grade. shadows: saturation, contrast, lift. midtones: saturation, contrast. highlights: saturation, gain. vignette: intensity, radius.
grade_night GradeLook
dusk (f32, f32) Added to the temperature and the saturation at dawn and dusk.
haze HazeLook The haze: what stands up the screen from the survivor is washed toward its colour, in slow banks. colour (sRGB), brightness against sunlit ground and strength (how much of what stands in it it takes at most, 0 = none) are for a low sun, at dawn and dusk; day and day_colour the same for the thin veil with the sun high (day: 0 = none by day). near and far: how many metres from the survivor it starts and is thickest, at the default zoom (they follow the zoom). Drawn only with “Haze” on in the graphics settings.
old_look OldLookStyle The old look: the picture as a faded print, at the strengths the settings offer.
fire FireLook A campfire at night: its colour (sRGB), brightness in lumens, how far its light reaches and how high over the ground it sits (metres), and how far round it what stands in its light is seen in the dark.
indoor_fill f32 How many times stronger the fill is by day while the player is inside a building: rooms lie in their roof’s shadow, hidden from the camera or not (1 = no stronger).

The sun: how bright (lux), how high it climbs (low + climb at noon, against a ground distance of 1, with south of tilt), and its colour at its highest and toward dawn and dusk.

Field Type What it is
lux f32 Brightness at full daylight, in lux.
low f32 How high it stands: low at the horizon’s end of the day plus climb at noon, against 1 along the ground (0.2 + 0.4 is about 47 degrees up at noon), tilted south.
climb f32
south f32
colour_high (f32, f32, f32) Its colour (sRGB) at its highest, and toward dawn and dusk.
colour_low (f32, f32, f32)

The moon: how bright (lux) and its colour (sRGB).

Field Type What it is
lux f32 Brightness at full daylight, in lux.
colour (f32, f32, f32)

The light that fills shadows (the ambient light): its colour and brightness.

Field Type What it is
colour (f32, f32, f32)
brightness f32

The camera’s grade and vignette at one end of the day (night, or full daylight).

Field Type What it is
exposure f32
temperature f32
tint f32
saturation f32
shadows (f32, f32, f32) Saturation, contrast and lift of the shadows; saturation and contrast of the midtones; saturation and gain of the highlights.
midtones (f32, f32)
highlights (f32, f32)
vignette (f32, f32) The vignette’s intensity and radius.

The haze: what stands up the screen from the survivor (and a little of what stands off to the sides) is washed toward its colour, in drifting banks, thickest near the ground: a thin pale veil all day, thick and warm with a low sun (dawn and dusk). The camera is orthographic, so this stands in for distance fog (world.wesl). Drawn only with the graphics settings’ haze on.

Field Type What it is
colour (f32, f32, f32) Its colour with the sun low (sRGB) and how bright it is against sunlit ground.
brightness f32
strength f32 How much of what stands in it the haze takes at most, with the sun at the horizon (0 = none).
day f32 The same with the sun high (0 = no haze by day), and its colour then.
day_colour (f32, f32, f32)
near f32 Metres from the survivor where it starts and where it is at its thickest, at the default zoom (HAZE_ZOOM); they shrink and grow with the zoom, so the screen is as hazy at any.
far f32

The old look at each strength the settings offer (Off draws none of it).

Field Type What it is
subtle OldLookLevel The setting’s “Subtle”.
strong OldLookLevel The setting’s “Strong”.

One strength of the old look (film.rs, the settings’ “Old look”): the picture as a faded print. Colours are sRGB; every amount is 0 for none.

Field Type What it is
fade f32 How far the blacks are lifted toward ink (0 = true black stays, 1 = black becomes ink).
ink (f32, f32, f32) What the darkest parts fade to: a warm brown, as old ink does.
wash f32 How far the whites are pulled down to paper (0 = white stays white, 1 = white is paper).
paper (f32, f32, f32) The colour of the paper: a warm cream that tints the whole picture through the whites.
desaturate f32 How much colour is taken out (0 = none, 1 = grey before the tint).
grain f32 Grain added on top of the film grain (as its strength; that is 0.085 by day).
glow f32 The soft glow round the brightest parts (0 = none, 1 = a lot).
night f32 The share of fade kept at night (in between follows the daylight), so the dark stays dark.

A fire burning outdoors (a campfire’s light at night): its colour (sRGB), brightness in lumens, how far its light reaches, how high above the ground it sits, and how far round it what stands in its light is seen in the dark.

Field Type What it is
colour (f32, f32, f32)
lumens f32
range f32
height f32
seen f32
The whole file as shipped
// How the light looks (crates/client/src/daynight.rs): the sun, the light that fills shadows, and
// the camera's grade and vignette, by day and at night (in between follows the daylight). Only the
// look: what zombies see by is the simulation's own. Every field is optional; one left out takes
// the value shown.
(
sun: (
// Brightness at full daylight, in lux.
lux: 16000.0,
// How high it stands: `low` at the horizon's end of the day plus `climb` at noon, against
// 1 along the ground (0.2 + 0.4 is about 47 degrees up at noon), tilted `south`.
low: 0.2,
climb: 0.4,
south: 0.55,
// Its colour (sRGB) at its highest, and toward dawn and dusk.
colour_high: (1.0, 0.88, 0.7),
colour_low: (1.0, 0.64, 0.34),
),
// The moon: its brightness in lux and its colour (sRGB).
moon: (lux: 1100.0, colour: (0.55, 0.65, 1.0)),
// How wide the sun and moon are, as the size of a soft shadow's edge: 0 = hard-edged. Drawn
// only with "Soft shadows" on in the graphics settings.
soft_shadows: 6.0,
// The light in the shadows: its colour (sRGB) and brightness.
fill_day: (colour: (0.86, 0.74, 0.62), brightness: 520.0),
fill_night: (colour: (0.3, 0.38, 0.66), brightness: 40.0),
// The camera's grade. `shadows`: saturation, contrast, lift. `midtones`: saturation, contrast.
// `highlights`: saturation, gain. `vignette`: intensity, radius.
grade_day: (
exposure: 0.45,
temperature: 0.04,
tint: -0.01,
saturation: 0.95,
shadows: (0.9, 1.0, 0.006),
midtones: (0.97, 1.08),
highlights: (0.92, 1.1),
vignette: (0.46, 0.8),
),
grade_night: (
exposure: 0.35,
temperature: -0.03,
tint: 0.0,
saturation: 0.72,
shadows: (0.6, 1.0, 0.0),
midtones: (0.8, 1.04),
highlights: (1.0, 1.0),
vignette: (0.6, 0.62),
),
// Added to the temperature and to the saturation at dawn and dusk.
dusk: (0.06, 0.1),
// The haze: what stands up the screen from the survivor is washed toward its colour, in slow
// banks. `colour` (sRGB), `brightness` against sunlit ground and `strength` (how much of what
// stands in it it takes at most, 0 = none) are for a low sun, at dawn and dusk; `day` and
// `day_colour` the same for the thin veil with the sun high (day: 0 = none by day). `near` and
// `far`: how many metres from the survivor it starts and is thickest, at the default zoom (they
// follow the zoom). Drawn only with "Haze" on in the graphics settings.
haze: (colour: (1.0, 0.7, 0.42), brightness: 1.15, strength: 0.26, day: 0.24, day_colour: (0.95, 0.93, 0.86), near: 8.0, far: 34.0),
// The old look (the settings' "Old look": Off, Subtle, Strong): the picture as a faded print.
// `fade`: how far the blacks lift toward `ink` (sRGB, a warm brown). `wash`: how far the whites
// come down to `paper` (sRGB, a warm cream that tints everything through them). `desaturate`:
// how much colour goes. `grain`: grain added to the film grain's. `glow`: the soft glow round
// the brightest parts. `night`: the share of `fade` kept at night, so the dark stays dark.
// Every amount is 0 for none.
old_look: (
subtle: (fade: 0.3, ink: (0.3, 0.22, 0.16), wash: 0.45, paper: (0.97, 0.9, 0.76), desaturate: 0.12, grain: 0.05, glow: 0.25, night: 0.35),
strong: (fade: 0.55, ink: (0.34, 0.25, 0.18), wash: 0.8, paper: (0.95, 0.86, 0.7), desaturate: 0.3, grain: 0.11, glow: 0.45, night: 0.35),
),
// A campfire at night: its colour (sRGB), brightness in lumens, how far its light reaches and
// how high over the ground it sits (metres), and how far round it what stands in its light is
// seen in the dark.
fire: (colour: (1.0, 0.55, 0.22), lumens: 600000.0, range: 14.0, height: 0.7, seen: 7.0),
// How many times stronger the fill is by day while you are inside a building. Rooms lie in
// their roof's shadow (the roof casts it whether the camera draws the roof or not), so only
// the windows let the sun in. 1 = no stronger.
indoor_fill: 1.6,
)