Hover or focus Tap an item to see what the bake does with it.
game file faces, brushes, texinfo lumps 7/58, 18, 6
Drawn faces become triangle fans with texture and lightmap UVs in geometry; solid, window, grate, player-clip and water brushes become plane-set colliders in sim. The 3D skybox room is left out of both.
into sim geometry
game file displacements lumps 26, 33
Per displacement, its power, start corner and first vertex; per vertex, an offset direction, a distance and an alpha, which becomes the blend weight between the two textures of a $basetexture2 material.
into displacement tessellation
game file static props game lump 'sprp' · mdl, phy
Each placement is welded into world geometry, vertex-lit from the leaf ambient cube plus the sun where a march through the leaves meets no solid; its .phy solids, or a hull round the mesh, become colliders in sim.
into geometry sim
game file lighting lump LDR 8, HDR 53 · RGBExp32
Each face’s luxel block becomes a linear tile in one BC6H atlas in lightmaps. The HDR lump wins when present; LDR luxels go through the game’s own 8-bit page first, so they match what the game shows.
into bump basis, light styles lightmaps
game file leaf ambient lighting lumps 55, 56
The compiler’s ambient cubes, a few per leaf at points inside its box, six colours each. They are resampled into the light grid, and they give every static and dynamic prop its baked vertex colour.
into leaf ambient to a grid geometry
game file worldlights, cubemaps lumps 15/54, 42 · c*.vtf
Point and spot worldlights become punctual lights marked as baked, keeping Source’s quadratic falloff. Each cubemap origin names a c<x>_<y>_<z>.vtf in the pakfile, turned to Y-up as a probe of at most 128 px.
into lighting cubemaps
game file entity lump lump 0 · round-logic outputs
Spawns, sites, doors, breakables, physics props, hurt volumes, sun, fog, sky name and exposure bounds come from here. Round-logic outputs are traced, so a gate a round opens is baked open and what it kills is left out.
into sim entities sites lighting props skies
game file .vmt and .vtf vpk archives + pakfile 40
Materials and textures resolve through every *_dir.vpk and loose file the game mounts, with the map’s pakfile zip searched first, so custom, patched and cubemap files shipped inside the .bsp win.
into vmt chain, vtf decode
importer step displacement tessellation source/disp.rs
The .bsp keeps a flat base quad and offsets, not triangles. This spreads a 5², 9² or 17² grid over the quad from its start corner, pushes vertices along their offsets, recomputes normals and makes each cell a 4-unit prism.
from displacements
into geometry sim
importer step bump basis, light styles 3 pages · 64-entry table
Splits a bump-lit face’s extra luxel blocks into the three radiosity-basis pages a normal map weights, and keeps the three light styles covering the most luxels, since the format holds no more for the whole atlas.
from lighting lump
into lightmaps lighting
importer step leaf ambient to a grid source/grid.rs · 64 units
The format stores a regular volume, not per-leaf samples. Each cell averages its leaf’s cubes by inverse squared distance, cells in solid copy the nearest filled cell, and the step doubles past 2 million cells.
from leaf ambient lighting
into lighting
importer step vmt chain, vtf decode source/vmt.rs, vtf.rs
Resolves patch materials through their single include and folds dx-level blocks, then picks base, blend, bump, detail and envmap-mask textures. Each .vtf’s top mip is decoded, fitted to 1024 px and re-encoded.
from .vmt and .vtf
into textures geometry skies
section sim
Every array a server needs, in one table: convex colliders as expanded plane sets or wound hulls, breakables, doors, triggers, teleport destinations, spawns and hurt volumes, each with a gametype mask. A dedicated server inflates this section and no other.
from faces, brushes, texinfo displacement tessellation static props entity lump
section geometry
Four parallel arrays: materials, a 52-byte vertex struct vector, u32 indices and batches. The vertex vector is little-endian and memcpy-shaped, so a client uploads the slice to a GPU buffer untouched. A batch is one draw call and one culling unit.
from faces, brushes, texinfo displacement tessellation static props leaf ambient lighting vmt chain, vtf decode
section textures
The image array materials index by integer. Each image carries size, encoding and mip and layer counts, then either its bytes inline at version 0 or, at version 1, a 16-byte blake3 key whose bytes sit in blvl.assets or in any .bass file. Block-compressed images hold the whole mip chain, level-major.
from vmt chain, vtf decode
section lightmaps
One atlas page per item: a colour image of peak irradiance, up to three L1 direction planes, optional Source bump-basis pages and style layers. A renderer reconstructs irradiance from the colour and the direction, so a normal map bends baked light.
from lighting lump bump basis, light styles
section skies
One image per sky, layers in +X, -X, +Y, -Y, +Z, -Z order, plus a cloud height. A lighting profile names a sky by index. Same keyed form as textures.
from entity lump vmt chain, vtf decode
section lighting
The cross-referencing hub. Profiles name a lightmap, a sky and a grading LUT. Lights are derived from emissive materials, the light grid is three or more image pages over a regular volume, probes name a cubemap, and fog volumes are what geometry batches point at.
from bump basis, light styles leaf ambient to a grid worldlights, cubemaps entity lump
section entities
The source map’s entity lump as plain text, a classname and key/value pairs, uninterpreted. It is the evidence a game reads for anything the core sections do not model.
from entity lump
section cubemaps
A second image array, six layers each, that reflection probes index. It has no keyed form, so these bytes are always inline.
from worldlights, cubemaps
section props
A self-contained mini-geometry with its own vertex and index buffers, models carrying meshes and convex hulls, and placements with position, rotation, motion and solidity. Mesh materials index geometry’s material array, so props share the world’s textures.
from entity lump
section sites
Objective volumes as named boxes with a kind, a team and a gametype mask. A site spanning several boxes appears once per box under one name, and the reader unions them.
from entity lump