Func detail: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
Line 28: Line 28:


[[Image:C17plaza-worldbrush.jpg|350px|thumb|right|There's not much left of [[:Image:City17 terminalsquare.jpg|City 17 Trainstation Plaza]] once we remove detail brushes. Valve has missed a few world brushes as well...]]
[[Image:C17plaza-worldbrush.jpg|350px|thumb|right|There's not much left of [[:Image:City17 terminalsquare.jpg|City 17 Trainstation Plaza]] once we remove detail brushes. Valve has missed a few world brushes as well...]]
Any brush which doesn't significantly block the player's view should probably be detail. Specific examples include:


* Pillars, plinths and supports
* Pillars, plinths and supports
* Free-standing walls
* Free-standing walls
* Suspended walkways
* Suspended walkways
* Stairs (create a smooth wedge-shaped world brush underneath)
* Steps (create a smooth wedge-shaped world brush underneath)
* Small buildings
* Small buildings
* Rotated brushes
* Rotated brushes
* Very small or thin brushes
* Very small or thin brushes
* As a general rule, it's usually good to tie to a func_detail ''any brush that doesn't block the player's view''. Note, infact, that all the things mentioned above don't block the player's view.


== Keyvalues ==
== Keyvalues ==

Revision as of 10:59, 18 June 2011

Template:Base brush It creates a brush that does not affect visibility or cause other brushes to be chopped. All brushwork that does not form the 'backbone' of the world (and that is not tied to a real entity) should be detail.

Valve provide an example map at sourcesdk_content\hl2\mapsrc\sdk_func_detail.vmf. You can also load up the HL2 map sources and hide detail brushes with their auto visgroup to see where Valve used them.

Tip.pngTip:Alternatively, use the console command r_drawfuncdetail to hide detail brushes in any map while it is running.

Effects

The point of creating a detail brush is precisely to avoid effects, which makes what it does difficult to describe. You may have more luck learning about the behaviour of world brushes and visleaves, which are what detail brushes exist to not affect. Nevertheless:

World-vs-detail.png

Above are a world brush (left cylinder) and a detail brush (right cylinder). The blue lines are visleaf boundaries. The world brush has chopped the map into nine oddly-shaped segments, leading to longer compile times and marginally lower performance, while the detail brush has not changed anything.

Caveats

  • Detail brushes cannot be used to seal a map.
  • Because detail brushes do not chop world brushes, light can seep underneath them if the other surface's lightmap scale is larger than the detail brush is wide/tall. If you encounter this, manually slice the underlying brush in two (with Shift+X).
    • This effect can cause detail brushes with lots of surface contact to become inefficient, because the surface beneath them is being rendered too!
    • Detail brushes do chop each other, however.
  • Surfaces on very thin (about 2 units thick) detail brushes have been known to disappear at certain distances. As a workaround, use func_brush instead.
  • World brushes with translucent materials applied, or which are displacements, will be treated as detail.
  • Detail brushes will, in some cases, merge faces with other detail brushes, and on occasion, world brushes, which can cause them to create leaves.

Good candidates

There's not much left of City 17 Trainstation Plaza once we remove detail brushes. Valve has missed a few world brushes as well...

Any brush which doesn't significantly block the player's view should probably be detail. Specific examples include:

  • Pillars, plinths and supports
  • Free-standing walls
  • Suspended walkways
  • Steps (create a smooth wedge-shaped world brush underneath)
  • Small buildings
  • Rotated brushes
  • Very small or thin brushes

Keyvalues

Minimum / Maximum DX Level (mindxlevel / maxdxlevel) <integer choices> (removed since Left 4 Dead)
The entity will not exist if the engine is running outside the given range of DirectX Versions.
Choices
Warning.pngWarning:If these are used, the object may break when the user switches their DirectX settings.[missing string]