Brush entity: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Nesciuse moved page Brush entity/en to Brush entity without leaving a redirect: Move en subpage to basepage)
No edit summary
Line 6: Line 6:
Brush entities are used for entities that require an area or ''trigger zone'' to be touched, hit, or used in order to perform a specific task. Another use of brush entities is to create a physical object that can move, such as an elevator, or a door (can be made by many brushes selected together and tied as a whole to a brush entity, forming a brush model). A great example of a brush entity that implements both of these designs is a {{Ent|func_button}}, which requires a brush to specify the area the player must press, touch, or shoot to activate the button; the button can be made using any shape of brush, or even a group of brushes, and can be textured to give the appearance of a real button. Brush entities such as the func_button have special features that affect the physical brush they're tied to, such as moving the brush in a general direction when activited, giving the effect of the button being pushed in and then popping back out. Another example of a brush entity is a {{Ent|trigger_multiple}} which can fire some outputs once the player walks into its area of effect (the volume of which is defined by the volume of the original brush used to make the trigger).
Brush entities are used for entities that require an area or ''trigger zone'' to be touched, hit, or used in order to perform a specific task. Another use of brush entities is to create a physical object that can move, such as an elevator, or a door (can be made by many brushes selected together and tied as a whole to a brush entity, forming a brush model). A great example of a brush entity that implements both of these designs is a {{Ent|func_button}}, which requires a brush to specify the area the player must press, touch, or shoot to activate the button; the button can be made using any shape of brush, or even a group of brushes, and can be textured to give the appearance of a real button. Brush entities such as the func_button have special features that affect the physical brush they're tied to, such as moving the brush in a general direction when activited, giving the effect of the button being pushed in and then popping back out. Another example of a brush entity is a {{Ent|trigger_multiple}} which can fire some outputs once the player walks into its area of effect (the volume of which is defined by the volume of the original brush used to make the trigger).


== Keyvalues ==
== Keyvalues / Inputs affecting rendering of brush entities ==
{{KV BaseEntity}}
=== Keyvalues ===
{{KV visiblebrush}}


== Inputs ==
=== Inputs ===
{{I BaseEntity}}
{{IO|Alpha|param=int 0-255|Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its '''[[Render Mode]] (rendermode)''' set to a number other than <code>0</code>.}}
 
{{IO|AlternativeSorting|param=bool|Swaps the rendering order of the entity. Used to attempt to fix sorting problems when rendering, for example an object rendering in front of translucent materials.}}
== Outputs ==
{{IO|Color|param=color255|Sets an RGB color for the entity.}}
{{O BaseEntity}}
{{IO|EnableDraw|since=P2|Removes {{ent|EF_NODRAW}} from the entity.}}
{{IO|DisableDraw|since=P2|Applies {{ent|EF_NODRAW}} to the entity. Note that this is different from {{ent|rendermode|10}}.}}
{{IO|EnableReceivingFlashlight|since=P2|Makes it so that the entity is lit by {{ent|env_projectedtexture}}s.}}
{{IO|DisableReceivingFlashlight|since=P2|Prevents the entity from being lit by {{ent|env_projectedtexture}}s. The shadow made by the texture will still cast.}}
{{I Reflection}}
{{I Shadow}}


== See also ==
== See also ==
* [[CBaseEntity|Keyvalues / Inputs / Outputs available to all entities]]
* [[:Category:Brush Entities]]
* [[:Category:Brush Entities]]
<onlyinclude><includeonly>{{:Brush entity/overview}}</includeonly>[[Category:Entities by type]]</onlyinclude>
<onlyinclude><includeonly>{{:Brush entity/overview}}</includeonly>[[Category:Entities by type]]</onlyinclude>

Revision as of 12:05, 2 September 2024

English (en)Español (es)Português (pt)Русский (ru)中文 (zh)Translate (Translate)

A Brush Entity is an entity type in the GoldSrc GoldSrc and Source Source engines, created by tying an entity to a BSP geometry brush in the map, giving the brush a specific effect or ability defined by the entity tied to it. (The default shortcut is Ctrl + T after selecting a brush)

Purpose and Uses

Brush entities are used for entities that require an area or trigger zone to be touched, hit, or used in order to perform a specific task. Another use of brush entities is to create a physical object that can move, such as an elevator, or a door (can be made by many brushes selected together and tied as a whole to a brush entity, forming a brush model). A great example of a brush entity that implements both of these designs is a func_button, which requires a brush to specify the area the player must press, touch, or shoot to activate the button; the button can be made using any shape of brush, or even a group of brushes, and can be textured to give the appearance of a real button. Brush entities such as the func_button have special features that affect the physical brush they're tied to, such as moving the brush in a general direction when activited, giving the effect of the button being pushed in and then popping back out. Another example of a brush entity is a trigger_multiple which can fire some outputs once the player walks into its area of effect (the volume of which is defined by the volume of the original brush used to make the trigger).

Keyvalues / Inputs affecting rendering of brush entities

Keyvalues

Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
Please use {{Brush rendering note}} instead.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.
Note.pngNote:Archived page history
Icon-Important.pngImportant:These pages are linked often from page history logs so Special:WhatLinksHere will not show anything.

Inputs

Alpha <integer 0–255>
Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its Render Mode (rendermode) set to a number other than 0.
AlternativeSorting <booleanRedirectInput/boolean>
Swaps the rendering order of the entity. Used to attempt to fix sorting problems when rendering, for example an object rendering in front of translucent materials.
Color <color255RedirectInput/color32>
Sets an RGB color for the entity.
EnableDraw  (in all games since Portal 2)
Removes EF_NODRAW from the entity.
DisableDraw  (in all games since Portal 2)
Applies EF_NODRAW to the entity. Note that this is different from rendermode 10.
EnableReceivingFlashlight  (in all games since Portal 2)
Makes it so that the entity is lit by env_projectedtextures.
DisableReceivingFlashlight  (in all games since Portal 2)
Prevents the entity from being lit by env_projectedtextures. The shadow made by the texture will still cast.

Reflection:

DisableDrawInFastReflection  (in all games since Portal 2)
Turns off rendering of this entity in reflections when using $reflectonlymarkedentities in water material.
EnableDrawInFastReflection  (in all games since Portal 2)
Turn on rendering of this entity in reflections when using $reflectonlymarkedentities in water material.

Shadow:

DisableShadow
Turn dynamic shadows off for this entity. Identical to applying  EF_NOSHADOW.
EnableShadow
Turn dynamic shadows on for this entity.
DisableReceivingFlashlight  (in all games since Portal 2)
This object will not receive light or shadows from projected textures.
EnableReceivingFlashlight  (in all games since Portal 2)
This object may receive light or shadows from projected textures.

See also