S&box Wiki

Render Tags

Render Tags

Entity Tags and tags assigned to Scene Objects can be used to filter out what should be rendered by a Camera.

A Scene Object will automatically inherit tags from the Entities that own them.

Default Tags

Particles

All Particles will automatically have the particles tag applied to them.

World

The game world including all Hammer meshes and static objects will automatically have the world tag applied to them.

Lighting

All lights automatically have the light tag applied, but some lights will have additional tags applied such as spotlight, ortholight, or envlight.

Usage

You can change which Entities or Scene Objects a Camera should render by adding any tags associated with them to either RenderTags or ExcludeTags on the camera.

Render Tags

If this set contains any tags, the camera will only render Entities or Scene Objects that have any of these tags.

Exclude Tags

If this set contains any tags, the camera will exclude Entities or Scene Objects that have any of these tags from rendering.

Example

If you had a minimap in your game and you wanted its camera to only render the world and nothing else, you could do this:

Camera = new SceneCamera( "Minimap" ); Camera.World = Game.SceneWorld; Camera.RenderTags.Add( "world" );