Func detail: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎Caveats: no they don't)
No edit summary
Line 1: Line 1:
{{wrongtitle|title=func_detail}}
{{wrongtitle|title=func_detail}}


[[Image:Opt_detailbrush_wireframe.jpg|thumb|<code>[[mat_wireframe]]</code> screenshot of two cylinders. Left is a world brush, and causes bad triangles; right is a detail brush and causes no problems.]]
'''func_detail''' is an [[Internal entity|internal]] [[brush entity]] that does not affect visibility or cause other brushes to be sliced - in other words that does not affect the structure of the rest of the map. It should be used on all brushwork that does not form the 'backbone' of a map (and that is not already tied to an entity).


[[Image:Opt_detailbrush_glview.jpg|thumb|The same scene examined in [[glview]]. The world brush butchers the BSP, while the detail brush does nothing.]]
[[Image:World-vs-detail.png|frame|center|A world brush (left) and a detail brush. The blue lines are [[visleaf]] boundaries, where the world has been chopped up, leading to longer compile times and lower performance.]]
 
'''func_detail''' is an [[Internal entity|internal]] [[brush entity]] that does not affect visibility or cause other brushes to be sliced - in other words that does not affect the structure of the rest of the map. It should be used on all brushwork that does not form the 'backbone' of a map (and that is not already tied to an entity).


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


== Caveats ==
== Caveats ==

Revision as of 07:04, 1 September 2008

Template:Wrongtitle

func_detail is an internal brush entity that does not affect visibility or cause other brushes to be sliced - in other words that does not affect the structure of the rest of the map. It should be used on all brushwork that does not form the 'backbone' of a map (and that is not already tied to an entity).

A world brush (left) and a detail brush. The blue lines are visleaf boundaries, where the world has been chopped up, leading to longer compile times and lower performance.

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.

Caveats

  • Detail brushes cannot be used to seal a map.
  • Because detail brushes do not slice other 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 create a slice in the underlying brush (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!
  • 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.
  • Brushes with translucent materials applied will automatically become detail.

Good candidates

  • Pillars, plinths and supports
  • Free-standing walls
  • Suspended walkways
  • Stairs (create a smooth wedge-shaped brush underneath)
  • Small buildings
  • Rotated brushes

See also

(These duping pages should really be merged into this one.)

Keyvalues

(You'll probably never need to change these.)