Level Editor/Workflows/Lighting and lightmaps

Revision as of 03:47, 20 October 2026 by TeamSpecBot (talk | contribs) (Level Editor: lighting and lightmap baking workflow)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A TeamSpec map is lit by its sun and sky, the lights you place, and a baked lightmap: light, bounced light and shadow worked out once, ahead of time, and stored with the map. Baked light looks rich and costs players almost nothing to draw.

1. Sun and sky

Open Map Config > Environment (Map Config):

  • Sun (DirectionalLight3D): its rotation is the direction the sunlight comes from; set its colour and energy.
  • World Environment: the sky, the ambient light (light that reaches everywhere), fog, glow and colour adjustments.

2. Lights

Place Omni and Spot lights from the Functional menu where the sun does not reach: interiors, tunnels, lamps. Set their colour, energy and range in the inspector. See Lights.

3. Bake

Open Map Config > LightmapGI:

  • Its inspector holds the lightmap's settings, such as quality and the number of light bounces.
  • Bake Lightmaps bakes now, so you can see the result in the editor. The progress dialog shows each stage; the editor does not respond while it bakes (on purpose, so the level cannot change mid-bake). Hold Esc to cancel; the previous lighting is kept.
  • Clear removes the bake.
  • Bake lightmaps on export (on by default) bakes again every time you export, so the exported map always has up-to-date light. You only need the Bake button to preview.

A bake and a clear are each one undo step. The status line under the buttons reports the result, for example Baked 412 mesh(es) successfully.

Note: Nothing to bake, no static geometry found. means the map has no still geometry yet.

What is baked, and what is not

  • Still brushes, displacements, terrain and props are baked.
  • Things that move or switch are lit by light probes instead, so they leave no baked shadow where they stood: doors, switchable groups, and props linked from an imported Source map.
  • Geometry far outside the area where play happens is left out of the bake and lit by probes. The bake dialog and the status line say how many meshes lie outside the play area. A single stray object kilometres away would otherwise spread the bake thin and make it slow.
  • The 3D skybox takes no lightmap; its own lights, the sun and the sky light it.

Seeing your lighting while you work

The Viewport Rendering window and the View menu change how the editor draws the map without changing it: Fullbright to see colours without light, Headlight to see the shape of a dark map, Lighting Only to see the light alone, Exposure to brighten the view.

Tip: Raising the map's ambient light does not brighten a baked surface: surfaces with a lightmap ignore it. Brighten with lights and bounces, or use the headlight to work.

Tips

  • Keep the number of lights with real-time shadows low; baked shadows are free in the game.
  • If you see a line of light along a flush join between brushes, check the brushes' Weld On Export is on, or put them in a group with Merge On Export.
  • Bake once early to check the look, then rely on bake-on-export.

Related pages

TeamSpec Level Editor
Basics Getting started · Interface · Viewport and camera · Selecting and hiding · Keyboard shortcuts · Settings · Map Config · Troubleshooting
Menus File · Edit · View · Tools · Functional
Panels Scene tree · Inspector · Materials · Props · Snapping · UV editor · Displacement · Terrain
Tools Move, Rotate and Scale · Box · Sphere · Cylinder · Prism · Stairs · Spiral Stairs · Spiral Tower · Arch · Path Brush · Plane · Terrain · Clip · Duplicate · Ruler and Cordon · Edit Vertex and Edge · Edit Face · Loop Cut · Material Brush · Vertex Color Brush · Displacement · Prop Path
Entities Brush · Zone · Group · Mirror Node · Prop · Spawn Point · Supply Pickup · World Boundary · Lights · Water · Sounds · Anchor Platform · Payload Track · Boss Spawn · Map Marker · World Text · Decal · Door · Button · Logic entities · 3D Skybox · Nav Region
Workflows Your first map · Brushes and CSG · Materials and UVs · Lighting and lightmaps · Bots and navigation · Mirrored maps · Outputs and logic · Custom assets · Playtesting · Exporting and publishing · Importing Source maps
Scripting Overview · Server rules · Client HUD · Bots · Teams and spawning · Zones · Pickups · Payload tracks · Map entities · Sandbox limits · Testing · King of the Hill · Team Deathmatch · API reference · What a script may use