This article's documentation is for anything that uses the Source engine. Click here for more information.

Pt-br/Func detail: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "{{subst:#if: Translation of 'Func detail' to 'português do Brasil' via Template:LanguageBar buttons * * * * * * * * * * * * * * * * * * * * * * * * * * * *...")
 
m (Created portuguese translation for "func_detail")
Line 1: Line 1:
{{subst:#if:|||{{LAuto/t}}
{{wip}}{{translating}}
 
--- DON'T JUST BLINDLY DELETE THIS PART. DO REPLACE THE LINKS AND CATEGORIES. THE PICTURE SHOWS HOW TO USE IT ! ---
 
SEARCH FOR:
\[\[(?!#|File(?:[ _]talk)?:|Image(?:[ _]talk)?:|Media:|Template(?:[ _]talk)?:|MediaWiki(?:[ _]talk)?:|Talk:|Category[ _]talk:|Project[ _]talk:|Valve[ _]Developer[ _]Community[ _]talk:|Help[ _]talk:|User(?:[ _]talk)?:|c:|commons:|Dictionary:|Google:|GoogleGroups:|IMDB:|M:|Meta:|Metawikipedia:|MW:|SdkBug:|SourceForge:|Steampowered:|W:|Wiki:|WikiBooks:|Wikipedia:|Wikiquote:|Wiktionary:|WP:)(:?(?:Category|Category|Help|Project|Valve[ _]Developer[ _]Community|Special|)(?:[^\|\]]+))(\|?.*?)\]\]
 
REPLACE WITH:
{{subst:LAuto|$1$2}}
 
}}{{wip}}{{translating}}
{{LanguageBar}}
{{LanguageBar}}
{{TabsBar|main=gs|base=func_detail}}
{{TabsBar|main=gs|base=func_detail}}
{{toc-right}}
{{toc-right}}
{{This is a|brush entity|internal=1|name=func_detail}} It is not an actual brush entity, but rather moves all contained brushes to {{ent|worldspawn}} and flags them as {{codelink|CONTENTS_DETAIL}}, resulting in them not affecting [[visibility]] or [[chop]]ping non-detail brushes. All brushwork that does not form the 'backbone' of the world (and that is not tied to a real entity) should be detail, with the exception of translucent glass (which suffers from [[$translucent#Flickering and Reversed Depth|alpha sorting issues]] when not "structural").
{{This is a|brush entity|internal=1|name=func_detail}} It is not an actual brush entity, but rather moves all contained brushes to {{ent|worldspawn}} and flags them as {{codelink|CONTENTS_DETAIL}}, resulting in them not affecting {{L|visibility}} or {{L|chop}}ping non-detail brushes. All brushwork that does not form the 'backbone' of the world (and that is not tied to a real entity) should be detail, with the exception of translucent glass (which suffers from {{L|$translucent#Flickering and Reversed Depth|alpha sorting issues}} when not "structural").


Valve provides an example map at {{file|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.
Valve provides an example map at {{file|sourcesdk_content\hl2\mapsrc\sdk_func_detail|vmf}}. You can also load up the HL2 map sources and hide detail brushes with their auto {{L|visgroup}} to see where Valve used them.


{{tip|Alternatively, use the [[console variable]] {{cmd|r_drawfuncdetail|0}} to hide detail brushes in any map while it is running.}}
{{tip|Alternatively, use the {{L|console variable}} {{cmd|r_drawfuncdetail|0}} to hide detail brushes in any map while it is running.}}


World brushes using {{cmd|%CompileDetail}} materials will always be treated as if they were tied to func_detail.
World brushes using {{cmd|%CompileDetail}} materials will always be treated as if they were tied to func_detail.
Line 23: Line 13:
Separating func_details is purely for editor convenience; 5 brushes in one func_detail will act the same as 5 func_details with one brush each.
Separating func_details is purely for editor convenience; 5 brushes in one func_detail will act the same as 5 func_details with one brush each.


[[CONTENTS_WATER|Water]] and [[CONTENTS_SLIME|Slime]] brushes cannot be detail. [[VBSP]] automatically removes detail contents from [[liquid materials|liquids]], and modifying VBSP to remove this quirk results in the liquids being invisible in-game (although still swimmable).
{{L|CONTENTS_WATER|Water}} and {{L|CONTENTS_SLIME|Slime}} brushes cannot be detail. {{L|VBSP}} automatically removes detail contents from {{L|liquid materials|liquids}}, and modifying VBSP to remove this quirk results in the liquids being invisible in-game (although still swimmable).


== Effects ==
== Effects ==


The point of creating a detail brush entity is to avoid creating an unnecessary number of [[visleaf|visleaves]] for a mere detail of the map, hence the name of the entity. VBSP will allow visleaves to overlay details, and thus minimize visleaves and compile time.
The point of creating a detail brush entity is to avoid creating an unnecessary number of {{L|visleaf|visleaves}} for a mere detail of the map, hence the name of the entity. VBSP will allow visleaves to overlay details, and thus minimize visleaves and compile time.


[[File:World-vs-detail.png|border|center]]
[[File:World-vs-detail.png|border|center]]
Line 35: Line 25:
== Caveats ==
== Caveats ==


* Detail brushes cannot be used to [[seal]] a map, or areaportal areas.
* Detail brushes cannot be used to {{L|seal}} a map, or areaportal areas.
* 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 multiple parts (with {{key|Shift|X}}), and texture underneath with [[nodraw]].
* Because detail brushes do not {{L|chop}} world brushes, light can seep underneath them if the other surface's {{L|lightmap}} scale is larger than the detail brush is wide/tall. If you encounter this, manually slice the underlying brush in multiple parts (with {{key|Shift|X}}), and texture underneath with {{L|nodraw}}.
** This effect can cause detail brushes with lots of surface contact to become inefficient, because the surface beneath them is being rendered too! Structural faces which are completely obscured by func_detail should be textured with [[nodraw]].
** This effect can cause detail brushes with lots of surface contact to become inefficient, because the surface beneath them is being rendered too! Structural faces which are completely obscured by func_detail should be textured with {{L|nodraw}}.
** Detail brushes ''do'' chop ''each other'', however. Vanilla [[VBSP]] does not support detail levels as seen in {{gldsrc}} [[HLBSP]], so all detail brushes will chop each over with no bias.
** Detail brushes ''do'' chop ''each other'', however. Vanilla {{L|VBSP}} does not support detail levels as seen in {{gldsrc}} {{L|HLBSP}}, so all detail brushes will chop each over with no bias.
:: {{tip|[https://github.com/DeathByNukes/source-sdk-2013 DeathByNuke's fork] of [[VBSP]] has {{cmd|%CompileChopLow}}, {{cmd|%CompileChopHigh}}, and {{cmd|%CompileChopAll}} [[material map compile flags]] which give some control over what chops what.}}
:: {{tip|[https://github.com/DeathByNukes/source-sdk-2013 DeathByNuke's fork] of {{L|VBSP}} has {{cmd|%CompileChopLow}}, {{cmd|%CompileChopHigh}}, and {{cmd|%CompileChopAll}} {{L|material map compile flags}} which give some control over what chops what.}}
* 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.
* Surfaces on very thin (about 2 units thick) detail brushes have been known to disappear at certain distances. As a workaround, use {{L|func_brush}} instead.
* World brushes with [[$translucent|translucent]] and/or [[$alphatest|transparent]] materials applied, or which are [[displacement]]s, do not affect [[VIS]], and cannot seal areas.
* World brushes with {{L|$translucent|translucent}} and/or {{L|$alphatest|transparent}} materials applied, or which are {{L|displacement}}s, do not affect {{L|VIS}}, and cannot seal areas.
**World brushes w/ translucent material will still chop leaves. This is because they use [[BSP tree]] to assist in alpha sorting (like in {{quake2|2}}) unlike detail brushes, displacements, and entities.
**World brushes w/ translucent material will still chop leaves. This is because they use {{L|BSP tree}} to assist in alpha sorting (like in {{quake2|2}}) unlike detail brushes, displacements, and entities.
* Detail brushes will, in some cases, merge faces with other detail brushes, and on occasion, world brushes, which can cause them to create leaves.
* Detail brushes will, in some cases, merge faces with other detail brushes, and on occasion, world brushes, which can cause them to create leaves.
* Under normal conditions, any time a detail brush contacts a world brush, [[VBSP]] will note the junction and optimize it. This connection is known alternately as a T-junction and a water index, and there is a limit to the number of T-Junctions VBSP will attempt to fix (65,535). Excessive use of detail brushes in contact with world geometry could cause VBSP to abort compilation with an error. Using the <code>-notjunc</code> option will skip this optimization at the price of possible visual inconsistencies.
* Under normal conditions, any time a detail brush contacts a world brush, {{L|VBSP}} will note the junction and optimize it. This connection is known alternately as a T-junction and a water index, and there is a limit to the number of T-Junctions VBSP will attempt to fix (65,535). Excessive use of detail brushes in contact with world geometry could cause VBSP to abort compilation with an error. Using the <code>-notjunc</code> option will skip this optimization at the price of possible visual inconsistencies.
:{{note|Water, for unknown reasons, causes the t-junction count to skyrocket. Removing/reshaping bodies of water can overcome this.}}
:{{note|Water, for unknown reasons, causes the t-junction count to skyrocket. Removing/reshaping bodies of water can overcome this.}}


Line 68: Line 58:
:{{confirm|Probably also supports {{mono|angles}} for a similar reason.}}
:{{confirm|Probably also supports {{mono|angles}} for a similar reason.}}


[[Category:Optimization Brush Entities]]
{{ACategory|Optimization Brush Entities}}


== See also ==
== See also ==
* [[Optimization (level design)]]
* {{L|Optimization (level design)}}
* {{ent|func_detail_illusionary}} - nonsolid version of this entity, which can be added to custom compilers
* {{ent|func_detail_illusionary}} - nonsolid version of this entity, which can be added to custom compilers

Revision as of 14:49, 3 November 2025

Under construction.png
This page is actively undergoing a major edit.
As a courtesy, please do not edit this while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.

The person who added this notice will be listed in its edit history should you wish to contact them.

Info content.png
This page is being translated.
You can help by finishing the translation.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)
English (en)Español (es)한국어 (ko)Português do Brasil (pt-br)中文 (zh)Translate (Translate)

func_detail é um interno(en) entidade de brush(en) disponível em todos os jogos Source Source. It is not an actual brush entity, but rather moves all contained brushes to worldspawn and flags them as CONTENTS_DETAIL, resulting in them not affecting visibility(en) or chop(en)ping non-detail brushes. All brushwork that does not form the 'backbone' of the world (and that is not tied to a real entity) should be detail, with the exception of translucent glass (which suffers from alpha sorting issues(en) when not "structural").

Valve provides 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(en) to see where Valve used them.

Tip.pngDica:Alternatively, use the console variable(en) r_drawfuncdetail 0 to hide detail brushes in any map while it is running.

World brushes using %CompileDetail materials will always be treated as if they were tied to func_detail.

Separating func_details is purely for editor convenience; 5 brushes in one func_detail will act the same as 5 func_details with one brush each.

Water(en) and Slime(en) brushes cannot be detail. VBSP(en) automatically removes detail contents from liquids(en), and modifying VBSP to remove this quirk results in the liquids being invisible in-game (although still swimmable).

Effects

The point of creating a detail brush entity is to avoid creating an unnecessary number of visleaves(en) for a mere detail of the map, hence the name of the entity. VBSP will allow visleaves to overlay details, and thus minimize visleaves and compile time.

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(en) a map, or areaportal areas.
  • Because detail brushes do not chop(en) world brushes, light can seep underneath them if the other surface's lightmap(en) scale is larger than the detail brush is wide/tall. If you encounter this, manually slice the underlying brush in multiple parts (with Shift+X), and texture underneath with nodraw(en).
    • This effect can cause detail brushes with lots of surface contact to become inefficient, because the surface beneath them is being rendered too! Structural faces which are completely obscured by func_detail should be textured with nodraw(en).
    • Detail brushes do chop each other, however. Vanilla VBSP(en) does not support detail levels as seen in GoldSrc HLBSP(en), so all detail brushes will chop each over with no bias.
Tip.pngDica:DeathByNuke's fork of VBSP(en) has %CompileChopLow, %CompileChopHigh, and %CompileChopAll material map compile flags(en) which give some control over what chops what.
  • Surfaces on very thin (about 2 units thick) detail brushes have been known to disappear at certain distances. As a workaround, use func_brush(en) instead.
  • World brushes with translucent(en) and/or transparent(en) materials applied, or which are displacement(en)s, do not affect VIS(en), and cannot seal areas.
    • World brushes w/ translucent material will still chop leaves. This is because they use BSP tree(en) to assist in alpha sorting (like in Quake II Quake II) unlike detail brushes, displacements, and entities.
  • Detail brushes will, in some cases, merge faces with other detail brushes, and on occasion, world brushes, which can cause them to create leaves.
  • Under normal conditions, any time a detail brush contacts a world brush, VBSP(en) will note the junction and optimize it. This connection is known alternately as a T-junction and a water index, and there is a limit to the number of T-Junctions VBSP will attempt to fix (65,535). Excessive use of detail brushes in contact with world geometry could cause VBSP to abort compilation with an error. Using the -notjunc option will skip this optimization at the price of possible visual inconsistencies.
Note.pngNotar:Water, for unknown reasons, causes the t-junction count to skyrocket. Removing/reshaping bodies of water can overcome this.

Good candidates

There's not much left of City 17 Trainstation Plaza once we remove detail brushes (as well as entities and props). 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(en) choices> (removido desde Left 4 Dead)
The entity will not exist if the engine is running outside the given range of DirectX Versions.
Choices
Warning.pngAtenção:If these are used, the object may break when the user switches their DirectX settings.[missing string]
Name (targetname) <string(en)>
Name of this entity. Displayed in Hammer's 2D views and Entity Report. No effect in-game, nor in map compilers.
Origin (origin) <origin(en)> !FGD
Offset the geometry by this amount in the compiled BSP. (Used for instances; should not be used directly)
Confirmar:Probably also supports angles for a similar reason.

See also