Lighting a CS 1.6 Map (light and light_environment)

April 23, 2026 Daemon666 8 min read

Lighting in a GoldSrc map is not real-time — it is baked. The hlrad compile stage calculates how light bounces around your level and writes the result into lightmaps stored in the BSP. That means every lighting change requires a recompile, and it means a map with no light entities compiles fullbright: flat, shadowless, and obviously unfinished. This covers the entities you place and how they interact. It assumes you can already compile with ZHLT/VHLT parameters.

1. The light entity (point light)

The workhorse is light — a point that emits in all directions. Its key values:

classname   light
_light      255 255 200 300   // R G B brightness

The first three numbers are the colour (0–255 each), the fourth is brightness. Warm interior light might be 255 200 150; a cold fluorescent 200 220 255. Place a light under each lamp, in each room that needs fill, and anywhere a dark corner needs lifting. Brightness falls off with distance, so a big room needs several.

2. The light_spot (directional cone)

light_spot emits a cone in a direction — a spotlight, a downlight, a lamp with a shade. Beyond the colour/brightness of a light, it adds a direction (aim it with the angle or a target) and inner/outer cone angles that control the hard and soft edges of the pool. Use it for focused pools under fixtures where an omni light would spill everywhere.

3. The light_environment (the sun)

light_environment is the outdoor sun and skylight, and there must be exactly one per map. It works together with your sky-textured brushes: hlrad casts sunlight through every sky-textured face into the level, so wherever the player can see the skybox, sunlight falls in. Its keys set the sun colour/brightness, the pitch (how high the sun sits) and the angle (compass direction the light comes from), plus a separate ambient skylight colour for the diffuse fill in shadow. One light_environment plus sky brushes gives you directional sun and soft ambient in a single entity.

4. Texture lights (surfaces that glow)

Any texture can be made to emit light via the lights.rad file that hlrad reads — you list a texture name and an RGB+brightness, and every face using that texture becomes a light source. This is how ceiling light panels, glowing screens, and neon signs illuminate a room realistically, because the light comes from the whole surface rather than a point. It is the cleanest way to light large flat fixtures.

5. Let hlrad bounce the light

The reason baked lighting looks good is radiosity: hlrad bounces light off surfaces so a bright floor lifts the walls above it. Higher-quality hlrad settings (more bounces, finer sampling) give softer, more realistic results at the cost of compile time. During iteration, run fast/low-quality RAD to preview placement; do a full-quality RAD only for the final compile. Every change to any light entity means re-running RAD — nothing about lighting updates without a recompile.

6. Avoid fullbright and pure black

Two failure states bracket good lighting. Fullbright (everything evenly lit, no shadows) means hlrad found no lights or was skipped — add at least one light entity and run RAD. Pitch black areas mean no light reaches there — add fill lights or raise the ambient on the light_environment. Aim for contrast with detail visible in the shadows, not crushed black.

Common errors

  • Map is fullbright — no light entities exist, or hlrad did not run. Add lights and run the RAD stage of the compile.
  • Outdoors is dark despite a sun — the sky brushes are not textured with the sky texture, so sunlight has nowhere to enter, or you have no light_environment.
  • Weird double shadows / no sun direction — more than one light_environment. Delete extras; there must be exactly one.
  • Lighting looks flat and blotchy — you ran fast/low RAD. Do a full-quality RAD for release.
  • Changed a light but nothing updated in-game — you did not recompile. Lightmaps are baked; re-run the compile.

Verification

Compile with a full RAD pass and load the map. Confirm nothing is fullbright, that outdoor areas under sky brushes get directional sun with soft ambient in shadow, and that interior lights cast believable pools with visible detail in the darker corners. Walk the whole map for pure-black spots and add fill where needed. If the outdoors is dark, check that your skybox brushes use the sky texture and that you have one working light_environment. For sky and sun specifics, see light_environment and sky.

Mitwirkende: Daemon666 ✦
Teilen: