Inputs

- SetRenderMode <integer>
Sets this entity's render mode.
- SetRenderFX <integer>
Sets this entity's render FX.
- SetViewHideFlags <integer>
Sets view ID hide flags. See the [#New nodraw abilities] section for more information.
- AddEffects <integer>
Adds to this entity's effects flags.
- RemoveEffects <integer>
Removes from this entity's effects flags.
- EnableDraw <void> (from Portal 2)
Draws this entity if it was undrawn before. Equivalent to RemoveEffects 32.
- DisableDraw <void> (from Portal 2)
Undraws this entity if it was drawn before. Equivalent to AddEffects 32.

KeyValues

- View ID nodraw (viewhideflags) <flags>
Controls whether an entity shouldn't be drawn in specific parts of the view rendering process. See the [#New nodraw abilities] section for more information.}
- Disable flashlight (disableflashlight) <choices>
Used to disable flashlight (env_projectedtexture) lighting on this entity. Note that this will not stop the entity from casting projected texture shadows; see the [#New nodraw abilities] section for information on how to do that.

New nodraw abilities

Mapbase adds a few new ways of turning an entity invisible:

  • A SetRenderMode input which can be used to set an entity to the “Don’t render” mode on the fly by using a parameter of 9.
  • New Enable/DisableDraw inputs inspired by the inputs of the same name from Portal 2.
  • A new “view ID nodraw” feature that hides an entity in specific render contexts.

Each of these methods turn an entity invisible in different ways, and they each have their own tradeoffs. For example, using DisableDraw will prevent an entity’s data from being transmitted to the client, while using the other methods will not.

The view ID nodraw ability is unique in the fact that it prevents drawing in specific passes from the view rendering process. For example, if an entity is set to not draw in VIEW_MONITOR, then that entity will not show up on RT camera monitors, but it will show up everywhere else.

View IDs are specified in a similar fashion to spawnflags, and combinations of them can be used. Here’s a list of view IDs in base Source 2013:

- VIEW_MAIN : 1
The main view used for the default player camera.
- VIEW_3DSKY : 2
Used by the 3D Skybox.
- VIEW_MONITOR : 4
Used by point_camera screens.
- VIEW_REFLECTION : 8
Used by expensive water and func_reflective_glass to reflect the world.
- VIEW_REFRACTION : 16
Used by expensive water and func_reflective_glass to show underwater areas.
- VIEW_INTRO_PLAYER : 32
Used by script_intro's secondary camera view.
- VIEW_INTRO_CAMERA : 64
When a script_intro is active, the player uses this instead of VIEW_MAIN.
- VIEW_SHADOW_DEPTH_TEXTURE : 128
Used by env_projectedtexture and flashlight shadow maps. Hiding an entity in this view will stop it from casting projected texture shadows.
- VIEW_SSAO : 256
Used by Pyrovision SSAO in TF2.

The FGD also provides some default presets:

  • 0 : “Draw normally”
  • 193 : “Hide in main view (player’s eyes)” ‘’( VIEW_MAIN + VIEW_INTRO_CAMERA + VIEW_SHADOW_DEPTH_TEXTURE )’’
  • 36 : “Hide in cameras” ‘’( VIEW_MONITOR + VIEW_INTRO_PLAYER )’’
  • 24 : “Hide in mirrors/water” ‘’( VIEW_REFLECTION + VIEW_REFRACTION )’’
  • 60 : “Hide in cameras and mirrors/water” ‘’( VIEW_MONITOR + VIEW_INTRO_PLAYER + VIEW_REFLECTION + VIEW_REFRACTION )’’
  • 2 : “Hide in 3D skybox” ‘’( VIEW_3DSKY )’’
  • 128 : “Hide projected texture shadows” ‘’( VIEW_SHADOW_DEPTH_TEXTURE )’’

Model Entities

The following I/O/KV are only available on entities that use models (i.e. non-brush entities).

Inputs

- SetPoseParameter <string>
Sets the specified pose parameter to the specified value (e.g. aim_yaw 45).
- SetModel <string>
Sets this entity's model. Path must start with models/ and include the extension.
- SetCycle <float>
Sets the animation's cycle.
- SetPlaybackRate <float>
Sets the animation's playback rate.