Brush: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(redone)
(cannot animate)
Line 13: Line 13:
* Low-detail and [[cheap]]
* Low-detail and [[cheap]]
* Lit with pre-computed [[lightmap]]s
* Lit with pre-computed [[lightmap]]s
* Rigid (cannot [[Skeletal animation|deform]])


== Compilation ==
== Compilation ==

Revision as of 16:57, 11 January 2010

Template:Otherlang2

A brush is a convex 3D shape created with Hammer's Block Tool. Brushes are used by level designers define the shape of the world (which defines visibility) and to create brush entities.

When a map is compiled VBSP converts brush faces that touch a visleaf to individual polygons. The resulting 'brush models' are stored within the BSP file and can be claimed by entities (e.g. the world, or your brush entity). The brushes themselves are actually retained in the BSP, though the reasons for Valve doing so are not clear.

In comparison to models, brushes are:

Compilation

  1. For each individual brush model, only faces that touch a visleaf are compiled. Some of the results of this process can be seen below:

    Brushes and their compiled equivalents

  2. If some parts of a brush face look into visleaves and others do not, the face will be chopped up accordingly.

There are two exceptions to these rules:

  • Although created separately in Hammer, func_details are all merged into the same entity during a compile. The single brush model that results is later added to the world.
    Note.pngNote:This means that you should always apply nodraw to hidden surfaces between a func_detail and the world.
  • Faces with translucent materials applied are never chopped. Don't apply them to internal or hidden surfaces unless you really mean to.

Limits

VBSP enforces these limits:

  • 8192 brushes
  • 128 faces on a single brush
  • 65536 faces overall

Invisible brushes like triggers and even hint brushes count toward the limit.

Confirm:However, nodraw faces do not.
Tip.pngTip:It is possible to compile a custom build of VBSP with these limits changed or removed, but who knows how the engine would respond?

See also