Clip texture: Difference between revisions
m (links to list of clip textures) |
SirYodaJedi (talk | contribs) |
||
| (5 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{LanguageBar}} | {{LanguageBar}} | ||
''For a list of clip textures, | ''For a list of clip textures, see [[Tool textures (Source)#Clips]].'' | ||
'' | '''Clip textures''' are invisible [[tool texture]]s that limit movement, typically of the player(s). A [[brush]] used with a '''clip texture''' is generally termed a ''clip brush''. However, any unrendered brush or model can fill this role. | ||
== Impacts on player experience == | |||
There are good techniques and there are bad techniques when it comes to using clip brushes to limit the player's movement. | There are good techniques and there are bad techniques when it comes to using clip brushes to limit the player's movement. | ||
''Good'' techniques are the ones that keep the player away from possibly getting entangled and stuck in complicated brushwork such as in between a tree and a hill, or amidst the cracks of several rocks, forcing the player to restart. However, wedge-shaped clip brushes can also be used to prevent the player from getting stuck on small detail brushes like window sills or buttons while trying to run somewhere, and to prevent the player from jumping up on top of an all too narrow fence or window sill. | ''Good'' techniques are the ones that keep the player away from possibly getting entangled and stuck in complicated brushwork such as in between a tree and a hill, or amidst the cracks of several rocks, forcing the player to restart. However, wedge-shaped clip brushes can also be used to prevent the player from getting stuck on small detail brushes like window sills or buttons while trying to run somewhere, and to prevent the player from jumping up on top of an all too narrow fence or window sill. | ||
''Bad'' techniques are known as [[Wikipedia:invisible wall|invisible walls]], that block the player from heading into a corridor that they are not "supposed" to enter. Apart from frustrating the player, this breaks down the illusion of an immersive world and reminds the player this is just a game. Instead, try designing visible blocks like furniture, rubble or locked doors. If this is necessary, use a visible warning to indicate to the player that this is not the correct way ahead. In {{l4d2|4}}, there is a | ''Bad'' techniques are known as [[Wikipedia:invisible wall|invisible walls]], that block the player from heading into a corridor that they are not "supposed" to enter. Apart from frustrating the player, this breaks down the illusion of an immersive world and reminds the player this is just a game. Instead, try designing visible blocks like furniture, rubble or locked doors. If this is necessary, use a visible warning to indicate to the player that this is not the correct way ahead. In {{l4d2|4}}, there is a texture named <code>[[Tool textures (Source)#wrongway|wrongway_sign01]]</code> that is used in ''Dark Carnival'' to stop players from entering a small room where infected spawn. | ||
[[File:PlayerClip use example.png|thumb|right|200px|A fence surrounded by both a <code>playerclip</code> and <code>[[Line of sight|blocklos]]</code> brush]] | |||
[[File:PlayerClip use example.png|right|200px]] | The fence in the image is enveloped by a ''toolsplayerclip'' tool texture for two reasons: First of all it prevents the player from getting caught on the brushwork when running alongside it, and second of all it prevents the player from jumping over something that would be at least cumbersome to climb over in real life. Be aware that the player could acquire physics objects and pile them up against the fence, and through this jump over the brush. If this is the case, you could consider extending this clip brush all the way to the roof of the map, but as this would create an ''invisible wall'', it would perhaps be better to replace the entire fence with a solid wall instead. | ||
== Available clip textures and entities== | |||
===Clip world brushes=== | |||
In the {{src|4}} engine, the general dedicated clip texture is ''Clip'', but alternatives are ''Player Clip'' and ''NPC Clip''. | |||
''Clip'' is the most general clip texture to use, for example to clip level bounds with vertical walls or to simplify the collisions of props, floors or other complex geometry. The other two have different use cases since they are more specific. | |||
These textures are generally intended to be used on all sides of a [[world brush]] and get their properties through their {{cmd|%compileclip}} compile flag. They do ''not'' need to be tied to an entity and are ''not'' subject to optimization with {{ent|func_detail}} because they do ''not'' cut [[visleaf]]s. | |||
== | In Hammer, these textures share the same "Clips" [[VisGroup]] category. | ||
These materials use the <code>default</code> surface property, yielding concrete footstep sounds on it. To get other sounds, see [[#Clips with Surfaceprop|below]]. | |||
{| cellpadding="5" style="border:1px solid #555; background:#2D2D2D;" | |||
|- style="background:#444; color:#DDD" | |||
! rowspan=2 | Texture<br>on [[world brush|world<br>brush]] | |||
! rowspan=2 | Visible<br>in-game | |||
! rowspan=2 | Solid to<br>bullets,<br>physics | |||
! rowspan=2 | Solid to<br>[[player]]s | |||
! rowspan=2 | Solid to<br>[[NPC]]s | |||
! rowspan=2 | Solid to<br>[[bot]]s | |||
! rowspan=2 | Solid for<br>[[Nav Mesh]] | |||
! colspan=2 | {{css}}{{csgo}} | |||
! colspan=2 | {{l4ds}} | |||
|- style="background:#333; color:#DDD" | |||
! Solid to<br>[[weapon_c4|C4]] | |||
! Solid to<br>[[hostage_entity|hostages]] | |||
! Solid to<br>survivors | |||
! Solid to<br>[[infected]] | |||
|- id="clip" | |||
| style="text-align:center; font-family:monospace, monospace" | [[File:Toolsclip.gif|64px|toolsclip]] | |||
| {{No}} | |||
| {{No}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
| {{Both|{{css}} Yes<br>{{csgo}} No}} | |||
| {{Yes}} | |||
| {{Yes}} | |||
|- id="playerclip" | |||
| style="text-align:center; font-family:monospace, monospace" | [[File:Toolsplayerclip.gif|64px|toolsplayerclip]] | |||
| {{No}} | |||
| {{No}} | |||
| {{Yes}} | |||
| {{No}} | |||
| {{Yes}} | |||
| {{N/A|?<br>{{csgo}} No}} | |||
| {{Yes}} | |||
| {{Both|{{css}} Yes<br>{{csgo}} No}} | |||
| {{Yes}} | |||
| {{No}} | |||
|- id="npcclip" | |||
| style="text-align:center; font-family:monospace, monospace" | [[File:Toolsnpcclip.gif|64px|toolsnpcclip]] | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| {{Yes}} | |||
| {{Both|{{css}}{{csgo}}{{cs2}} Yes<br>{{l4ds}}{{tf2}} No}} | |||
| {{N/A|?<br>{{csgo}} Yes}} | |||
| {{No}} | |||
| {{No}} | |||
| {{No}} | |||
| {{Yes}} | |||
|} | |||
{{warning|Brushes that are not solid to the [[Nav Mesh|nav mesh]] (i. e. when the cursor in {{cmd|nav_edit|1}} passes through them) are not suitable for blocking out the level or for clipping floors or props because the game's {{cmd|nav_generate}} is prone to generate areas that are unreachable, malformed or simply missing wherever they are used.}} | |||
===Clip brush entities=== | |||
Apart from tool textures, there are also brush entities acting as clips. Create a nodraw or clip brush, tie it to an entity using {{key|Ctrl|T}} and change the class to one of the following. | |||
If you require the properties of two brushes, use two brushes inside each other, for example ''Clip'' and <code>func_clip_vphysics</code>. | |||
{| class=wikitable | |||
! Entity classname | |||
! Solid to? | |||
|- | |||
| {{ent|func_clip_vphysics}} | |||
| rowspan=2 | Physics objects like dropped weapons etc. | |||
|- | |||
| {{ent|script_clip_vphysics}} {{l4d2|only}} | |||
|- | |||
| {{ent|func_vehicleclip}} | |||
| Vehicles. | |||
|- | |||
| {{ent|func_playerinfected_clip}} {{l4ds|only}} | |||
| Special Infected controlled by players during Versus. AI Controlled Special infected and Common infected may still pass. | |||
|- | |||
| {{ent|func_playerghostinfected_clip}} {{l4ds|only}} | |||
| Player ghost infected | |||
|- | |||
| {{ent|func_team_wall}} {{dods|only}} | |||
| rowspan=2 | Specified [[team]]. | |||
|- | |||
| {{ent|func_teamblocker}} {{only|{{dods}}{{insurgency}}{{doi}}}} | |||
|- | |||
| {{ent|func_respawnroomvisualizer}} {{tf2|only}} | |||
| [[Team]] that doesn't own the linked {{ent|team_control_point}}. | |||
|- | |||
| {{ent|func_forcefield}} {{tf2|only}} | |||
| Teams that it doesn't belong to. | |||
|- | |||
|} | |||
==Clipping techniques in Hammer== | |||
===Invisible Displacement=== | ===Invisible Displacement=== | ||
[[File:L4d1_displacement_clip_alternative.png|right|200px|thumb|Alternative invisible displacement, for when clip brushes are too difficult to create.]] | [[File:L4d1_displacement_clip_alternative.png|right|200px|thumb|Alternative invisible displacement, for when clip brushes are too difficult to create.]] | ||
| Line 27: | Line 126: | ||
===Clips with Surfaceprop=== | ===Clips with Surfaceprop=== | ||
[[File:Hammer++_gmod_clip_textures.png|thumb|{{csgo}}{{gmod}} Red clip textures with different surface properties for footstep sounds]] | |||
This allows the clips to sound different when stepping upon and also make use of the | One issue with the generic red clip texture is that it inherits the default {{cmd|$surfaceprop}} which plays concrete footsteps when walked on. This is why some games, like {{csgo|1}} and {{Gmod|1}}, have multiple red clip tool textures that use specific [[material surface properties]], such as concrete, dirt, glass, etc. This allows the clips to sound different when stepping upon and also make use of the surface properties, like the very low friction of <code>SlipperySlide</code>. Example uses of this is utilizing glass clips when working on glass catwalks, which would allow you to still hear glass noises when stepping onto the clip, whereas the generic clip texture would otherwise play a default concrete sound which would be out of place. | ||
Example uses of this is utilizing clips | |||
For games that do not have these clip textures, you could create your own or copy them from a game that has them. But that may not work in some games, as it will cause every single clip to use the surfaceprop of whichever clip your first interacted with. {{l4d2| | For games that do not have these clip textures, you could create your own or copy them from a game that has them. But that may not work in some games, as it will cause every single clip to use the surfaceprop of whichever clip your first interacted with. {{l4d2|1}} for example causes this sound bug to occur. | ||
Alternatively, you can ([[expensive|with more overhead]]) use the following workaround to avoid creating new material files: | Alternatively, you can ([[expensive|with more overhead]]) use the following workaround to avoid creating new material files: Build your brushwork for the clip using any texture that possesses the material properties you require. For example, <code>glass/glasswindow007a</code>, simply because it is glass. Turn the brushwork into a {{ent|func_brush}} that is set to "Don't Render", "Always Solid", and "Solid BSP". This stops your brush from cutting [[Visleaf|Vis Leaves]] and becomes invisible, just like a clip brush would. However, depending on thickness, it will also block bullets and also [[prop physics|physical props]] and projectile weapons, such as grenades, or [[tf projectile arrow|arrows]], because it is merely invisible brushwork. | ||
{{ | You can also create your own material. For example, to get a wooden clip material, create a new text file {{path|<game>/materials/tools/toolsclip_wood|vmt}}, reuse the clip texture (or create your own to be able to distinguish clips in the editor) and set the <code>$surfaceprop</code> appropriately. | ||
<syntaxhighlight lang=php> | |||
LightmappedGeneric | |||
{ | |||
$translucent 1 // use texture transparency in Hammer (texture is invisible in-game) | |||
$basetexture "tools/toolsclip" // image for 3D view and texture browser, good if it has transparency | |||
%compileclip 1 // correct clip properties (invisible, solid to..., not solid to...) | |||
$surfaceprop wood // surface properties, affecting footstep sound | |||
%keywords clip // search keywords in texture browser, optional | |||
} | |||
</syntaxhighlight> | |||
==See also== | ==See also== | ||
Latest revision as of 07:49, 11 November 2025
For a list of clip textures, see Tool textures (Source)#Clips.
Clip textures are invisible tool textures that limit movement, typically of the player(s). A brush used with a clip texture is generally termed a clip brush. However, any unrendered brush or model can fill this role.
Impacts on player experience
There are good techniques and there are bad techniques when it comes to using clip brushes to limit the player's movement.
Good techniques are the ones that keep the player away from possibly getting entangled and stuck in complicated brushwork such as in between a tree and a hill, or amidst the cracks of several rocks, forcing the player to restart. However, wedge-shaped clip brushes can also be used to prevent the player from getting stuck on small detail brushes like window sills or buttons while trying to run somewhere, and to prevent the player from jumping up on top of an all too narrow fence or window sill.
Bad techniques are known as invisible walls, that block the player from heading into a corridor that they are not "supposed" to enter. Apart from frustrating the player, this breaks down the illusion of an immersive world and reminds the player this is just a game. Instead, try designing visible blocks like furniture, rubble or locked doors. If this is necessary, use a visible warning to indicate to the player that this is not the correct way ahead. In
Left 4 Dead 2, there is a texture named wrongway_sign01 that is used in Dark Carnival to stop players from entering a small room where infected spawn.
The fence in the image is enveloped by a toolsplayerclip tool texture for two reasons: First of all it prevents the player from getting caught on the brushwork when running alongside it, and second of all it prevents the player from jumping over something that would be at least cumbersome to climb over in real life. Be aware that the player could acquire physics objects and pile them up against the fence, and through this jump over the brush. If this is the case, you could consider extending this clip brush all the way to the roof of the map, but as this would create an invisible wall, it would perhaps be better to replace the entire fence with a solid wall instead.
Available clip textures and entities
Clip world brushes
In the
Source engine, the general dedicated clip texture is Clip, but alternatives are Player Clip and NPC Clip.
Clip is the most general clip texture to use, for example to clip level bounds with vertical walls or to simplify the collisions of props, floors or other complex geometry. The other two have different use cases since they are more specific.
These textures are generally intended to be used on all sides of a world brush and get their properties through their %compileclip compile flag. They do not need to be tied to an entity and are not subject to optimization with func_detail because they do not cut visleafs.
In Hammer, these textures share the same "Clips" VisGroup category.
These materials use the default surface property, yielding concrete footstep sounds on it. To get other sounds, see below.
| Texture on world brush |
Visible in-game |
Solid to bullets, physics |
Solid to players |
Solid to NPCs |
Solid to bots |
Solid for Nav Mesh |
||||
|---|---|---|---|---|---|---|---|---|---|---|
| Solid to C4 |
Solid to hostages |
Solid to survivors |
Solid to infected | |||||||
|
No | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
|
No | No | Yes | No | Yes | ? |
Yes | Yes | No | |
|
No | No | No | Yes | ? |
No | No | No | Yes | |
nav_edit 1 passes through them) are not suitable for blocking out the level or for clipping floors or props because the game's nav_generate is prone to generate areas that are unreachable, malformed or simply missing wherever they are used.Clip brush entities
Apart from tool textures, there are also brush entities acting as clips. Create a nodraw or clip brush, tie it to an entity using Ctrl+T and change the class to one of the following.
If you require the properties of two brushes, use two brushes inside each other, for example Clip and func_clip_vphysics.
| Entity classname | Solid to? |
|---|---|
| func_clip_vphysics | Physics objects like dropped weapons etc. |
| script_clip_vphysics (only in | |
| func_vehicleclip | Vehicles. |
| func_playerinfected_clip (only in |
Special Infected controlled by players during Versus. AI Controlled Special infected and Common infected may still pass. |
| func_playerghostinfected_clip (only in |
Player ghost infected |
| func_team_wall (only in |
Specified team. |
| func_teamblocker (only in | |
| func_respawnroomvisualizer (only in |
Team that doesn't own the linked team_control_point. |
| func_forcefield (only in |
Teams that it doesn't belong to. |
Clipping techniques in Hammer
Invisible Displacement
In some cases, clip brushes are not an option, or too difficult to make an accurate clip brush around props.
For example, Left 4 Dead often used displacement brushes using invisible textures to make something like a clip, which covers rubble props.
Env_Player_Blocker
Another useful, but very limited alternative are env player blocker entities. These are rectangular point entities that block players in it's volume. This entity is mostly used in "Cleanup" activities via the Commentary System or LMP file edits after a map has been compiled already.
Clips with Surfaceprop
One issue with the generic red clip texture is that it inherits the default $surfaceprop which plays concrete footsteps when walked on. This is why some games, like Counter-Strike: Global Offensive and Garry's Mod, have multiple red clip tool textures that use specific material surface properties, such as concrete, dirt, glass, etc. This allows the clips to sound different when stepping upon and also make use of the surface properties, like the very low friction of SlipperySlide. Example uses of this is utilizing glass clips when working on glass catwalks, which would allow you to still hear glass noises when stepping onto the clip, whereas the generic clip texture would otherwise play a default concrete sound which would be out of place.
For games that do not have these clip textures, you could create your own or copy them from a game that has them. But that may not work in some games, as it will cause every single clip to use the surfaceprop of whichever clip your first interacted with. Left 4 Dead 2 for example causes this sound bug to occur.
Alternatively, you can (with more overhead) use the following workaround to avoid creating new material files: Build your brushwork for the clip using any texture that possesses the material properties you require. For example, glass/glasswindow007a, simply because it is glass. Turn the brushwork into a func_brush that is set to "Don't Render", "Always Solid", and "Solid BSP". This stops your brush from cutting Vis Leaves and becomes invisible, just like a clip brush would. However, depending on thickness, it will also block bullets and also physical props and projectile weapons, such as grenades, or arrows, because it is merely invisible brushwork.
You can also create your own material. For example, to get a wooden clip material, create a new text file ![]()
<game>/materials/tools/toolsclip_wood.vmt, reuse the clip texture (or create your own to be able to distinguish clips in the editor) and set the $surfaceprop appropriately.
LightmappedGeneric
{
$translucent 1 // use texture transparency in Hammer (texture is invisible in-game)
$basetexture "tools/toolsclip" // image for 3D view and texture browser, good if it has transparency
%compileclip 1 // correct clip properties (invisible, solid to..., not solid to...)
$surfaceprop wood // surface properties, affecting footstep sound
%keywords clip // search keywords in texture browser, optional
}


