HammeriteBakeSettings

Core: lighting. Inherits Resource

How a map is baked: everything HammeriteLightmapper reads that is not the map itself.

One per bake rather than shared by the process, so one map's settings never leak into the next bake - and a resource, so a game can keep a map's beside it and every bake of that map is the same.

Properties

TypeNameDefault
intbounces4
floatbounce_scale1.0
floatemission_scale8.0
intshadow_samples4
intfalloff_mode0
floatfalloff_range8.0
floatbounce_range0.0
floatbounce_floor0.0
boolwater_reflectionstrue
boolwater_refractiontrue
boolcull_buried_prop_facestrue
floatsky_lightmap_scale64.0
floatprobe_gather_radius_mult12.0
floatprobe_cell_size64.0
floatprobe_surface_offset1.0

Enumerations

enum FalloffMode

ValueNameDescription
0INVERSE_SQUAREWhat light actually does: brightness falls with the square of the distance, and so never quite reaches nothing. Energy is luminous flux in lumens.
1LINEARA stealth game's light: a straight ramp from the lamp to a hard edge at falloff_range, and darkness past it. Runs hotter than INVERSE_SQUARE within the range and nothing at all outside it, so a map changing modes retunes its lamp energies.

Property descriptions

bounces

var bounces: int = 4

How many times light bounces after the direct pass. 0 is direct light alone.

bounce_scale

var bounce_scale: float = 1.0

How much of the bounce is kept, as a fraction of what the physics says. 1.0 is physically based: every transfer in the bake is a form factor, and reflectance is applied by whoever sends. Turn it DOWN for a darker game rather than turning the lights down - indirect light is what softens a room, and a stealth game wants direct light bold and indirect soft. It moves the indirect light and nothing else, probes included.

emission_scale

var emission_scale: float = 8.0

Multiplier on emission texel values. The texture is LDR, so its brightest texel is 1.0, while a point light's irradiance on a nearby surface runs to tens: this decides how bright "fully white in the emission map" glows. Raise it for lamp glass and lava, lower it for faint runes.

shadow_samples

var shadow_samples: int = 4

How many visibility rays a luxel casts at each light, spread over the texel's own footprint. One ray makes a shadow edge stair-step along the lightmap grid; four give it the part-lit texels it should have had, at four times the visibility rays of the direct pass.

falloff_mode

var falloff_mode: int = 0

Which FalloffMode the direct pass uses.

falloff_range

var falloff_range: float = 8.0

How far a LINEAR light reaches, per unit of its energy: a lamp of 32 with 8.0 lights 256 units around itself and nothing beyond. An inverse-square lamp is never out of range, so a wall right across the level takes a little of its light - enough to wash out a room meant to be dark, and to spend one of that wall's four light slots on it.

bounce_range

var bounce_range: float = 0.0

How far bounced light carries, in world units, or 0 for as far as it can see. A bright courtyard otherwise keeps feeding a cellar three rooms away through a hundred distant patches; a room or two is the useful setting.

bounce_floor

var bounce_floor: float = 0.0

How faint a switchable light's bounced light may be before a wall goes without it, as a light level, or 0 to keep all of it. A wall that takes any of a switchable light's bounce holds one of its four slots for it; a baked light's bounce costs a wall nothing and is all kept.

water_reflections

var water_reflections: bool = true

Whether a pool throws the light that falls on it back into the room over it (#79). Off saves a second pair of visibility rays per light, per texel, per pool.

water_refraction

var water_refraction: bool = true

Whether light entering water bends where it goes in (Snell's law at the surface), for the texels and probes under it. Off is the straight line from light to receiver.

cull_buried_prop_faces

var cull_buried_prop_faces: bool = true

Whether a prop's faces buried in rock or another prop are left out of the bake: nobody sees them, and lighting them costs atlas space.

sky_lightmap_scale

var sky_lightmap_scale: float = 64.0

The texel size of a sky aperture's lightmap, which nothing ever renders - it exists only so the aperture has patches to emit from. Coarse on purpose.

probe_gather_radius_mult

var probe_gather_radius_mult: float = 12.0

How far a probe reaches for the patches that light it, as a multiple of the probe grid's cell size. A hard cutoff before the visibility ray, not a falloff: a patch beyond it contributes nothing. Too small and a probe in a large room is lit only by the walls beside it; larger costs gather rays.

probe_cell_size

var probe_cell_size: float = 64.0

The light probe grid HammeriteLightmapper.bake() builds first: its cell size, and how far off the walls a probe stands.

probe_surface_offset

var probe_surface_offset: float = 1.0

Undocumented.

Hammerite 1.0 · built from a6dd634, 2026-10-10