Fix: MAX_MAP_CLIPNODES Exceeded

July 2, 2025 Daemon666 8 min read 5 просмотров

Your compile dies in hlbsp with a line every mapper eventually meets:

Error: Exceeded MAX_MAP_CLIPNODES

Clipnodes describe the collision hulls the engine uses to stop the player walking through walls — separate from the visible faces. GoldSrc stores them in a fixed-size structure capped at 32767 clipnodes, and complex, chamfered, cylindrical, or heavily fragmented brushwork generates them fast. When your solid geometry needs more collision nodes than that, hlbsp aborts. The fix is to reduce the collision complexity of the map, not the visual detail.

1. Know which brushes cost clipnodes

Every solid, structural brush the player can collide with contributes to the clip hulls. The expensive offenders are: cylinders and arches with many sides, terrain built from many small angled brushes, grates and railings modelled as solid geometry, and any brush that gets split repeatedly by the BSP process. Decorative detail that the player never actually bumps into is pure waste in the clip hull.

2. Convert non-structural brushes to func_detail

This is the primary fix. func_detail (a ZHLT/VHLT entity) tells the compiler the brush is decorative: it stays visible and lit, but it is removed from the BSP tree and from clipnode generation. Select trim, pipes, signs, clutter, and ornamental arches, and tie them to func_detail:

Entity class: func_detail

A func_detail brush no longer blocks the player by default, so keep genuinely solid detail as world brush or add a simple CLIP cage around it (next step). Converting a map's clutter to func_detail routinely cuts clipnodes by a third or more. See the optimization checklist for where else it helps.

A useful rule of thumb: if a brush exists purely to be looked at — a pipe on a wall, a beam across a ceiling, a decorative frame — it should almost never be world geometry. World brushes are for the sealed shell of the map (the outer walls, floors and ceilings that keep the level airtight) and for the large structural masses that define collision. Everything else is a func_detail candidate. Mappers who hit MAX_MAP_CLIPNODES are usually building an entire scene as world brushes when three quarters of it is decoration.

3. Replace complex collision with simple CLIP brushes

The player does not need to collide with the exact shape of a jagged rock or a many-sided pillar — only with a rough box around it. Texture a simple block brush with the CLIP tool texture and wrap it around the complex geometry. CLIP brushes block the player but are invisible and cheap in the hull. Meanwhile make the complex decorative shape a func_detail or texture its hidden faces with NULL so it stops generating collision at all.

4. Simplify cylinders and arches

A 24-sided cylinder generates far more clipnodes than a 12-sided one, and at play distance nobody counts the sides. Rebuild oversized round geometry with fewer sides, and cap arches at a reasonable segment count. For big round rooms, a low-poly collision cage in CLIP with a higher-poly func_detail visual shell gives you smooth looks and cheap collision.

5. NULL the faces that never matter

Applying NULL to faces the player can never see or touch removes them from rendering and reduces the geometry the compiler has to process, which indirectly lowers splits and clipnodes. Backs of walls, undersides of floors, and hidden brush sides should all be NULL.

6. Recompile with -chart and watch the number

Add -chart to the compile so hlbsp prints the clipnode count against the limit:

hlbsp -chart mymap.bsp

Read the clipnodes line. If you are still near 32767, keep converting structural clutter to func_detail and simplifying round brushes until you have clear headroom. The compile parameters guide lists every flag.

Common errors

  • Error: Exceeded MAX_MAP_CLIPNODES — too much collision geometry. Convert decorative brushes to func_detail and simplify cylinders.
  • func_detail made things fall through / walk through — expected; func_detail is non-solid to the player by default. Add a CLIP cage where collision is genuinely needed.
  • Count barely dropped after func_detail — you converted faces that were already cheap. Target the many-sided round brushes and fragmented terrain instead.
  • Compile now passes but the player snags on invisible edges — a CLIP brush is oversized or misaligned. Tighten the CLIP cage to the visible shape.
  • MAX_MAP_CLIPNODES on a tiny map — usually one hyper-detailed model built from brushes; box it in CLIP and func_detail the shell.

Verification

Recompile the full chain and confirm hlbsp completes without the error. Load the map and walk every area you converted — make sure you cannot fall through a func_detail floor or clip into a decorative pillar, and that CLIP cages stop you where they should. Check the -chart clipnode figure sits well under 32767 so you have room to keep building. If you also hit face or lightmap limits, work through the AllocBlock fix in the same pass.

Участники: Daemon666 ✦
Поделиться: