Understanding VIS and hint brushes in Q3Map2

Mapping tutorials KleskBY 0 14
Source: http://tremmapping.pbworks.com/

Hint brushes are useful when a map has a bend, doorway, or junction where the visibility compiler creates a room-sized region that is too generous. The goal is to help VIS exclude parts of the map that cannot be seen from that region. This guide explains what to look for, where to place a hint, and how to tell whether it helped.

This article concerns maps compiled with Q3Map2, including Q3 BSP maps used by DarkPlaces. Quake 1 and GoldSrc have different map tools and should not be given these instructions verbatim.

What VIS actually decides

During compilation, structural world geometry divides the traversable space into regions connected by portals. VIS works out a potentially visible set (PVS) for each region: other regions that might be seen from somewhere inside it. At runtime, the engine can use that set to reject world geometry before drawing. Its camera frustum and other renderer checks can reject more.

The word potentially matters. If a region wraps around a corner, its PVS may include a room that the player cannot see from their present position. VIS must be conservative: excluding genuinely visible geometry would make it disappear in game.

Why the PVS can include a room hidden from the player Top-down schematic of an L-shaped route. The player is at the near end. A structural wall blocks the player's direct view of the far room, while a broad visibility region can still reach around the bend. One camera position ≠ the whole PVS region player far room possible from the broader region Schematic only: actual portal boundaries come from the compiled map.
From the player's dot the wall blocks the far room. A region covering more of the bend can still have that room in its PVS.

What a hint brush changes

A hint brush tells Q3Map2 where to prefer a portal split. It does not become a visible wall or block the player's movement. A useful split gives VIS a smaller source region whose possible view is easier to bound. A split in open space, where both sides can see the same geometry, often gains nothing and may add compile work or portal complexity.

A hint cut at a corridor bend Side-by-side top-down schematic. On the left, a broad cluster covers the junction. On the right, a hint plane divides the near corridor from the bend, allowing VIS to test the smaller near-side cluster separately. Before: broad source region After: a deliberate cut one large region near side bend dashed blue = hint face
The cut separates the near corridor from the bend. Whether that reduces the PVS depends on the rest of the map, so inspect the compiled portals rather than trusting the sketch.

Where to put the cutting face

Start with a genuine occluder: a solid corner or wall that already blocks sight. Place a thin hint brush across the open corridor close to that transition. In a Q3Map2 game pack that supplies common/hint and common/skip, put hint on the face where you want the split and skip on the remaining faces. Check your game pack's shader definitions and portal viewer; painting every face as hint can introduce cuts you did not intend.

In a horizontal plan, the intended cut should span the usable opening from one structural boundary to the other. In 3D it should also extend from floor to ceiling, or between other structural boundaries. A short slab can leave a path around, above, or below its intended cut.

Full-height and short hint faces across a corridor Two corridor cross sections. The left blue hint face reaches from floor to ceiling. The right hint face stops below the ceiling, leaving an open route around its top. Useful: spans the opening Weak: leaves a gap floor-to-ceiling cut space above the face
Corridor cross sections. The same principle applies horizontally: connect the cut to the structural sides.

A practical test in your map

  1. Save a baseline. Compile the map with its normal BSP and VIS settings. Confirm there is no leak, then save the portal view and performance readings from the spots you want to improve.
  2. Inspect the portals. Use your editor's portal viewer or the compiler's portal debug output to find a broad region spanning a bend. A good candidate is a place where a solid wall blocks the view but the current region reaches past it.
  3. Add one hint cut. Put its hint face across the opening near the corner and use skip on the other faces if supported by the game pack. Keep the brush in world geometry, not a moving entity.
  4. Compile again with the same settings. Check that a portal appears at the intended plane and that no unexpected portal cuts were added.
  5. Compare in game. From identical camera positions, compare the renderer's visible surface or triangle counters and the frame time. Also walk through the doorway to ensure nothing visible disappears.

A useful result is measurable. Keep the hint only when it improves visibility or rendering cost in the problem area without creating a worse result elsewhere. Hinting every opening is not an optimization strategy.

Common mistakes

  • Hinting without an occluder: if both sides can see the same spaces, a new portal cannot hide them.
  • Stopping at a gap: a partial cut may not separate the region as intended.
  • Using detail geometry as the wall: small detail brushes generally do not form the structural visibility boundary you need. Make sure the occluding wall is structural.
  • Judging by FPS alone: frame time varies for many reasons. Inspect portal placement and visible geometry as well.
  • Assuming one recipe fits every compiler: shader names and hint handling vary by game pack and BSP toolchain.




Tags: Q3Map2, mapping, VIS, hint brushes, DarkPlaces

Comments


captcha


No comments yet. Be the first!
Owned by kleskby#1837
Close

You have no new notifications.

SHOUTBOX
Open chat to load…
Log in to chat