Skip to content

BakeOptions

Defined in: lightmap/bake.ts:20

Bakes lights into an atlas a MeshLightmap reads. Direct light, then what bounced — the term a frame here cannot compute, and the way past its ceiling of sixteen lights.

Pre-1.0: the options will follow what an authoring panel needs.

optional ambient?: readonly [number, number, number]

Defined in: lightmap/bake.ts:34

Light every surface receives from no direction in particular.


optional atlasSize?: number

Defined in: lightmap/bake.ts:22

Side of the square atlas, in texels.


optional bounces?: number

Defined in: lightmap/bake.ts:30

How many times light is allowed to reflect. Zero is direct light only — useful, because past the sixteen a frame can carry it is still the answer.


optional dilate?: number

Defined in: lightmap/bake.ts:37

Texels the solved edges are smeared outwards, so a bilinear tap near a chart’s border does not read the empty atlas beside it.


optional probeGrids?: readonly ProbeGrid[]

Defined in: lightmap/bake.ts:41

Grids of probes to solve in the same light field — what lights the things a bake cannot hold still. Solved after the surfaces, because a probe gathers what they ended up giving off.


optional probeSamples?: number

Defined in: lightmap/bake.ts:44

Directions each probe gathers. Over the whole sphere, so this buys less per ray than a lumel’s hemisphere does.


optional reflectionProbes?: readonly readonly [number, number, number][]

Defined in: lightmap/bake.ts:47

Where reflections are captured from — a panorama each, solved in the same light field the probes are. The specular half of the same question.


optional reflectionSky?: SkyRadiance

Defined in: lightmap/bake.ts:54

What a captured ray brings back when it escapes the scene. The environment where the caller could sample one, the flat ambient where it could not.


optional reflectionWidth?: number

Defined in: lightmap/bake.ts:51

Width of a captured panorama; its height is half. Small on purpose: what a rough surface reflects is a blur, and the prefilter below widens the lobe anyway.


optional samples?: number

Defined in: lightmap/bake.ts:32

Rays each lumel gathers per bounce.


optional texelsPerUnit?: number

Defined in: lightmap/bake.ts:27

How finely a surface is lit, in texels per world unit. A world unit here is a DESIGN PIXEL, so a room is hundreds of units across and a lumel every few of them is already fine — a density borrowed from an engine whose unit is a metre would ask for an atlas no scene could fit.