Brush: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(brushes -> compiled polys)
Line 1: Line 1:
A '''brush''' is a [[Wikipedia:Convex and concave polygons|convex]] block created with Hammer's [[Hammer Block Tool|Block tool]]. Unless tied to an [[Brush entity|entity]] it will form part of the backbone of the map, defining [[visibility]] as a [[worldspawn|world brush]].
A '''brush''' is a [[Wikipedia:Convex and concave polygons|convex]] 3D shape created with [[Hammer]]'s [[Hammer Block Tool|Block tool]]. Unless tied to an [[Brush entity|entity]] it will form part of the backbone of the map, defining [[visibility]] as a [[worldspawn|world brush]].


Brushes are complimented in Source with [[model]]s:
Brushes are each unique, can't sustain huge amounts of detail, and are lit with pre-computed [[lightmap]]s. They are complimented by [[model]]s, which are more dynamic, more detailed, and exactly the same whenever and wherever used.


* Models cannot control visibility, and are slower to draw, but allow for greater detail, enforced consistency, and dynamic lighting.
== In-game ==
* Brushes perform poorly with too much detail, are each unique, and are lit exclusively with [[Lightmap]]s (which do not change once the map has been compiled).
 
Brushes are compiled by [[VBSP]] into individual polygons, which means that unless tied to an entity they only exist as discrete objects in Hammer.
 
As a part of this process faces are merged and chopped so that parts touching either the void or one another are removed. You can see some scenarios in this image:
 
[[Image:Optimize.jpg|750px|center|Brushes and their in-game result]]
 
Exceptions are:
 
* [[Brush entity|Brush entities]], which merge and chop only within themselves.  
** [[func_detail]]s will also merge and chop each other (since they are really all the same entity).
* Brushes with [[$translucent|translucent]] materials applied, which do not merge or chop at all.
 
Don't bother coating the inner surfaces of brush constructions with [[nodraw]] unless they meet one of the above criteria.
 
{{note|Surfaces that are merely flush with one another will not be merged. Doing so would disrupt texturing.}}


== See also ==
== See also ==

Revision as of 10:32, 16 March 2009

A brush is a convex 3D shape created with Hammer's Block tool. Unless tied to an entity it will form part of the backbone of the map, defining visibility as a world brush.

Brushes are each unique, can't sustain huge amounts of detail, and are lit with pre-computed lightmaps. They are complimented by models, which are more dynamic, more detailed, and exactly the same whenever and wherever used.

In-game

Brushes are compiled by VBSP into individual polygons, which means that unless tied to an entity they only exist as discrete objects in Hammer.

As a part of this process faces are merged and chopped so that parts touching either the void or one another are removed. You can see some scenarios in this image:

Brushes and their in-game result

Exceptions are:

  • Brush entities, which merge and chop only within themselves.
    • func_details will also merge and chop each other (since they are really all the same entity).
  • Brushes with translucent materials applied, which do not merge or chop at all.

Don't bother coating the inner surfaces of brush constructions with nodraw unless they meet one of the above criteria.

Note.pngNote:Surfaces that are merely flush with one another will not be merged. Doing so would disrupt texturing.

See also

Template:Otherlang:en Template:Otherlang:en:pt, Template:Otherlang:en:pt-br, Template:Otherlang:en:ru