BakeOptions
Defined in: sdk/src/lightmap/bake.ts:24
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.
Properties
Section titled “Properties”ambient?
Section titled “ambient?”
optionalambient?: readonly [number,number,number]
Defined in: sdk/src/lightmap/bake.ts:39
The sky’s radiance where no sky is given: the same from every direction, and still only reaching what can see it.
atlasSize?
Section titled “atlasSize?”
optionalatlasSize?:number
Defined in: sdk/src/lightmap/bake.ts:26
Side of the square atlas, in texels.
bounces?
Section titled “bounces?”
optionalbounces?:number
Defined in: sdk/src/lightmap/bake.ts:34
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.
dilate?
Section titled “dilate?”
optionaldilate?:number
Defined in: sdk/src/lightmap/bake.ts:46
Texels the solved edges are smeared outwards, so a bilinear tap near a chart’s border does not read the empty atlas beside it.
occluders?
Section titled “occluders?”
optionaloccluders?: readonlyBakeSurface[]
Defined in: sdk/src/lightmap/bake.ts:57
What stands in the light and holds none of it: geometry with no lightmap UV set (lit by probes when the game runs). It shadows the surfaces and hides the sky from the probes; a ray that meets it finds it unlit.
probeGrids?
Section titled “probeGrids?”
optionalprobeGrids?: readonlyProbeGrid[]
Defined in: sdk/src/lightmap/bake.ts:50
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.
probeSamples?
Section titled “probeSamples?”
optionalprobeSamples?:number
Defined in: sdk/src/lightmap/bake.ts:60
Directions each probe gathers. Over the whole sphere, so this buys less per ray than a lumel’s hemisphere does.
reflectionProbes?
Section titled “reflectionProbes?”
optionalreflectionProbes?: readonly (readonly [number,number,number])[]
Defined in: sdk/src/lightmap/bake.ts:63
Where reflections are captured from — a panorama each, solved in the same light field the probes are. The specular half of the same question.
reflectionSky?
Section titled “reflectionSky?”
optionalreflectionSky?:SkyRadiance
Defined in: sdk/src/lightmap/bake.ts:70
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.
reflectionWidth?
Section titled “reflectionWidth?”
optionalreflectionWidth?:number
Defined in: sdk/src/lightmap/bake.ts:67
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.
samples?
Section titled “samples?”
optionalsamples?:number
Defined in: sdk/src/lightmap/bake.ts:36
Rays each lumel gathers per bounce.
optionalsky?:SkyRadiance|SkySpec
Defined in: sdk/src/lightmap/bake.ts:43
What a lumel or a probe receives along a ray that escapes the scene — the environment as the frame lights by it, tint and turn included. A bake split across threads needs it as data.
skyOcclusion?
Section titled “skyOcclusion?”
optionalskyOcclusion?:boolean
Defined in: sdk/src/lightmap/bake.ts:54
Bake the probes WITHOUT the sky, and how much of it each sees: the frame then lights them with the sky it has (a live Sky Atmosphere, a weather) seen through that, so a room stays dark under a sky that changes. Off, the probes hold the sky as it was at the bake.
texelsPerUnit?
Section titled “texelsPerUnit?”
optionaltexelsPerUnit?:number
Defined in: sdk/src/lightmap/bake.ts:31
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.