Func detail: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{wrongtitle|title=func_detail}}
{{wrongtitle|title=func_detail}}
{{base_brush}}


== Entity description ==
[[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.]]
A [[Entity#Brush_entities|brush entity]] that does not retain any actual entity data after a compile, making it similar to a [[brush|world brush]]. It is solid (unless materials specify otherwise) and blocks light just like a normal world brush. Press Ctrl+T in hammer with a brush selected to convert it to a func_detail.


{{brushmodel}}
[[Image:Opt_detailbrush_glview.jpg|thumb|The same scene examined in [[glview]]. The world brush butchers the BSP, while the detail brush does nothing.]]


* Unlike a world brush, a func_detail does not divide [[visleaf]]s. Therefore it does not contribute to [[vvis|VVIS]] calculations (reducing VVIS compile time) and does not divide the BSP tree. Thus, they are ideal for optimizing "visual detail" brushes that do not significantly block the player's line-of-sight (like debris, fences, or even small buildings) and complicated brushwork (like stairs, columns and angled brushes), since func_detail brushes will not cause other brushes to be divided into additional faces on contact. It does generate new vertices where it intersects world brushes and is the only entity to do so. The new vertices are only generated for lighting reasons and do not create any registerable slow down.
'''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).


* For an example of how func_detail geometry can be used to reduce face splits, see the example file ''Steam\SteamApps\username\sourcesdk_content\hl2\mapsrc\sdk_func_detail.vmf''.
Valve provide an example map at <code>sourcesdk_content\hl2\mapsrc\sdk_func_detail.vmf</code>.


{{Note|In some cases, surfaces on very thin (about 2 units thick) func_details has been known to disappear at certain distances. A workaround for this is to make the entity a [[func_brush]] instead. It is advised to instead use a larger brush or world brush rather than a func_brush, which is networked}}
== Caveats ==


{{intent}}
*Detail brushes cannot be used to [[seal]] a map.
* See also [[Controlling_Geometry_Visibility_and_Compile_Times#Detail_brushes|Controlling Geometry Visibility and Compile Times - Detail brushes]]
*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 ({{key|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 ''will'' slice brushes when they intersect with them. {{todo|Confirm in OB.}}
*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.)
 
*[[Controlling_Geometry_Visibility_and_Compile_Times#Detail_brushes|Controlling Geometry Visibility and Compile Times - Detail brushes]]
* See also [[BSP Map Optimization#Detail Brushes|BSP Map Optimization - Detail Brushes]]
* See also [[BSP Map Optimization#Detail Brushes|BSP Map Optimization - Detail Brushes]]
* See also [[Optimization %28Geometry%29#Detail brushes|Optimization (Geometry) - Detail brushes]]
* See also [[Optimization %28Geometry%29#Detail brushes|Optimization (Geometry) - Detail brushes]]


== Keyvalues ==
== Keyvalues ==
(You'll probably never need to change these.)
* {{kv dxlevelchoice}}
* {{kv dxlevelchoice}}
[[Category:Brush Entities]]
[[Category:Optimisation Brush Entities]]

Revision as of 15:17, 31 August 2008

Template:Wrongtitle

mat_wireframe screenshot of two cylinders. Left is a world brush, and causes bad triangles; right is a detail brush and causes no problems.
The same scene examined in glview. The world brush butchers the BSP, while the detail brush does nothing.

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).

Valve provide an example map at sourcesdk_content\hl2\mapsrc\sdk_func_detail.vmf.

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!
  • Detail brushes will slice brushes when they intersect with them.
    Todo: Confirm in OB.
  • 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.)