A Primer on Tool Textures
(September 13, 2017)
Tool textures are textures that serve special purposes when you apply them to a brush in a map. They're not seen after compiling—in fact, sometimes, their purpose is to make other textures unseen. Tool textures exist in all Quake-based engines, though this article deals only with the main Source tool textures: tools/toolsskybox
and tools/tools2dskybox
, tools/toolsclip
, tools/toolsnodraw
, tools/toolstrigger
, and tools/toolsskip
.
To use a tool texture, simply texture a brush with it. You don't need to tie the brush to a brush entity for the tool texture to work. Many, but not all, tool textures will only function correctly if all sides of a brush have the same tool texture. Tool brushes, despite being invisible, will count towards your brush limit of 8,192 brushes in a single map.
tools/toolsskybox
and tools/tools2dskybox
Imagine going outside and seeing that the sky is actually six faces of a cube surrounding you, never moving to give the appearance of infinity. The tools/toolsskybox
texture acts as a window into seeing that cube. This box doesn't actually exist in Hammer, and it's horrible practice to make an actual box of tools/toolsskybox
around your map. Don't confuse yourself; tools/toolsskybox
lets you see the sky.
To use the skybox texture, simply make a skybox roof over any "outside" areas of the level. If you need them taller, draw skybox brushes on top of your walls and roof them off with another skybox brush.
The skybox texture will not only seal the map, but it will also block visibility. Parts of the level that can be seen behind a skybox brush will render improperly. The skybox texture will block physics objects, players, NPCs, and bullets from passing through. If a light_environment
entity is placed in the map, not only will it itself give off light, but its ambient lighting value will emit from every single skybox brush.
There is an additional skybox texture, tools/tools2dskybox
, but if you don't know what it does, you don't need it. It's not necessary for 2D skyboxes, and if you mix it and the normal skybox texture improperly, it can create rendering errors.
tools/toolsclip
Along with the skybox texture, the tools/toolsclip
texture is the oldest of the tool textures, dating back to the Quake engine. It's an invisible texture that prevents the player or NPCs from passing through it. The normal red clip texture will not block physics objects, bullets, cast shadows, block visibility, or block NPCs from seeing through it.
The clip texture is best used around pillars and places where the player can get caught up on tiny details, such as fuse boxes, pipes, or cave walls. Other, more specific clip textures are available depending on the game. tools/toolsnpcclip
will block only NPCs from passing through it, but no more; tools/toolsplayerclip
blocks only players, but no more; Counter-Strike: Global Offensive mappers also have a special grenade clip available to them. Though this isn't usually called a clip texture, the tools/toolsblockbullets
texture will block most enemy projectiles, as well as bullets, NPCs, players, and physics objects.
You cannot use a clip texture to seal a map. Clip brushes have no effect in Portal.
tools/toolsnodraw
tools/toolsnodraw
prevents the face of the brush it's placed on from being rendered. It will be solid to players, NPCs, physics objects, bullets, it blocks visibility, and will seal the world. In addition, nodraw will prevent a lightmap from being generated for the face of the brush it's placed on. This will reduce map size, and Valve often uses it for the tops of roofs and surfaces invisible to the player during gameplay.
Nodraw is especially important when paired with displacements. As displacements don't block visibility and don't seal the map, placing a nodraw brush underneath every one is extremely recommended.
There are a few special nodraw brushes available, depending on the game: Counter-Strike: Source has nodraw "roof" and "wood" textures, identical to the regular one aside from the name and the sounds it makes, respectively. Portal 2 also has a "nodraw portalable" texture, which portals can be placed on. (In Portal, portals can be placed on normal nodraw brushes.)
tools/toolstrigger
The tools/toolstrigger
texture has to be tied to a brush entity in order to function. A brush with the trigger texture simply defines the volume in which that brush entity will take effect. Often, this takes the form of a trigger_once
or trigger_multiple
entity, which will perform an action when a specific entity is inside of it. Triggers will not block visibility, players, NPCs, bullets, cast shadows, or seal the world.
The tools/toolstrigger
texture can be used on non-trigger entities as well, such as func_viscluster
in Orange Box and later-era Source games and func_buyzone
in Counter-Strike: Source and Counter-Strike: Global Offensive.
tools/toolsskip
tools/toolsskip
is the easiest tool texture to understand; any face it's applied to will not get compiled. It gets cut out and skipped altogether. Obviously, this means it won't seal a map, block visibility, or block entities from passing through.
So if it doesn't get compiled, what's its use? Simply enough, skips are useful for things that stay in the editor. Grouping objects from a prefab together and placeholding things that'll get modeled in later are two examples. Additionally, the skip texture can be used with hint brushes (too advanced to be discussed here) to cut only one visleaf plane, instead of six, if the hint texture were applied to all faces of the brush.
This is an overview of tool textures, but a few things have been left out. Textures with more specific applications, such as tools/toolsblocklos
, tools/toolsladderladder
, and tools/toolsblocklight
aren't used often enough to be worth discussing here. Some tool textures, such as tools/toolsfog
and tools/toolsskyfog
, simply don't exist or are nonfunctional in most, if not all, Source games. For a full reference listing of tool textures, see the corresponding Valve Developer Community article.
In addition, there are two visibility blocking tool textures important enough to warrant their own guide. tools/toolsareaportal
and tools/toolsoccluder
, which prevent objects and geometry behind doors and windows from being rendered when not in view, have their own use cases and quirks that would make them too unwieldy to discuss here. You can read up about them in our "Controlling Visibility With Areaportals and Occluders" guide.