Material map compile flags: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎%NoPortal: Portal2series -> Portalseries)
(reformatted long list into a compact table. Also removed images and instead just listed in plain text which vmt they're found in.)
Line 7: Line 7:
  LightmappedGeneric
  LightmappedGeneric
  {
  {
  $basetexture developer/custom_clip
  $basetexture developer/custom_clip
  '''%compileclip 1'''
  '''%compileclip 1'''
  }
  }


== Exclusive Flags ==
== Exclusive Flags ==
'''Only one''' of the following flags may be set on any given material.
'''Only one''' of the following flags may be set on any given material.<br>
 
Every flag is available in all Source Engine branches, unless specifically mentioned in the <code>Availability</code> box
=== %CompileClip (<tt>toolsclip</tt>) ===
{| class="standard-table"
[[image:Toolsclip.gif|32px]] Makes the brush block only [[player]]s and [[NPC]]s. This is equivalent to a combination of <tt>PlayerClip</tt> and <tt>NPCClip</tt>.
! width="150px" | Name
 
! width="100px" | Seen in .vmt
=== %CompileNoChop ===
! width="150px" | Availability
Prevents "subdividing patches" on the surface. This presumably affects how the face is converted to triangles.  
! Effect
 
|- id="%CompileClip"
=== %CompileNPCClip (<tt>toolsnpcclip</tt>) ===
| %CompileClip
[[image:Toolsnpcclip.gif|32px]] Makes the brush block only [[NPC]]s. This implies <tt>NoLight</tt> and </tt>NoDraw</tt>.
| toolsclip
{{Note|{{csgo}} Blocks [[bot]]s, even though they are [[player]]s.}}
|
 
| Makes the brush block only [[player]]s and [[NPC]]s. This is equivalent to a combination of <tt>%PlayerClip</tt> and <tt>%CompileNPCClip</tt>.
=== %CompileOrigin (<tt>toolsorigin</tt>) {{obs}} ===
|- id="%CompileNoChop"
[[image:Toolsorigin.gif|32px]] Sets the origin of a brush entity. This is deprecated in {{Source|2}} and {{source2|2}}. In {{gldsrc|2}}, origin brushes were used to set the rotation origin of rotating entities.
| %CompileNoChop  
 
|
=== %CompileTrigger (<tt>toolstrigger</tt>) ===
|
[[image:Toolstrigger.gif|32px]] Makes the brush suitable for [[Trigger]]s.
| Prevents "subdividing patches" on the surface. This presumably affects how the face is converted to triangles.  
 
|- id="%CompileNPCClip"
=== %CompileSkip(<tt>toolsskip</tt>) ===
| %CompileNPCClip
[[image:Toolsskip.gif|32px]] Removes the face during compilation, making the brush into sets of planes.
| toolsnpcclip  
 
|  
=== %CompileSky (<tt>toolsskybox</tt>) ===
| Makes the brush block only [[NPC]]s. This implies <tt>NoLight</tt> and </tt>NoDraw</tt>.<br>{{Note|{{csgo}} Blocks [[bot]]s, even though they are [[player]]s.}}
[[image:Toolsskybox.gif|32px]] Makes the face render the (2D/3D) [[Skybox]] and emit {{ent|light_environment}} light.
|- id="%CompileOrigin"
 
| %CompileOrigin
=== %Compile2DSky (<tt>toolsskybox2d</tt>) ===
| toolsorigin
[[image:Toolsskybox2d.gif|32px]] Makes the face render the 2D [[Skybox]] only, in addition to emitting <tt>light_environment</tt> light.
| {{gldsrc|only}}
 
| Sets the rotation origin of a brush entity.  
=== %PlayerClip (<tt>toolsplayerclip</tt>) ===
|- id="%CompileTrigger"
[[image:Toolsplayerclip.gif|32px]] Makes the brush only block [[player]]s.
| %CompileTrigger
 
| toolstrigger  
=== %CompileNoLight (<tt>nolight</tt>) ===
|  
[[image:Toolsblack.gif|32px]]{{as|since}}{{src13|also}}<br>
| Makes the brush suitable for [[Trigger]]s.
Disables generating lightmaps for a brush face. Useful for materials that don't need lighting info or are always invisible. This is disabled on water materials. [[Valve]] introduced this parameter with {{as|2}}, using it for the black areas you see in the levels.
|- id="%CompileSkip"
 
| %CompileSkip
| toolsskip  
|  
| Removes the face during compilation, making the brush into sets of planes.
|- id="%CompileSky"
| %CompileSky
| toolsskybox  
|  
| Makes the face render the (2D/3D) [[Skybox]] and emit {{ent|light_environment}} light.
|- id="%Compile2DSky"
| %Compile2DSky
| toolsskybox2d  
|  
| Makes the face render the 2D [[Skybox]] only, in addition to emitting <tt>light_environment</tt> light.
|- id="%PlayerClip"
| %PlayerClip
| toolsplayerclip  
|  
| Makes the brush only block [[player]]s.
|- id="%CompileNoLight"
| %CompileNoLight
| nolight  
| {{as|since}}{{src13|also}}
| Disables generating lightmaps for a brush face. Useful for materials that don't need lighting info or are always invisible. This is disabled on water materials.  
|- id="%CompileGrenadeClip"
| %CompileGrenadeClip
| toolsgrenadeclip
| {{only|{{csgo}}}}
| Makes the brush only block grenades.
|- id="%CompileDroneClip"
| %CompileDroneClip
| toolsdroneclip
| {{only|{{csgo}}}}
| Makes the brush only block drones.
|- id="%CompileFog"
| %CompileFog
| ToolsFog
|
| This may be a deprecated flag that so far has not been seen as being useful.
|}
== Additive Flags ==
== Additive Flags ==
Multiple of the following flags may be applied to any given material.  
Multiple of the following flags may be applied to any given material.<br>
 
Every flag is available in all Source Engine branches, unless specifically mentioned in the <code>Availability</code> box
=== %CompileBlockLOS (<tt>toolsblocklos</tt>) ===
{| class="standard-table"
[[image:Toolsblocklos.gif|32px]] Makes the brush block only the [[line of sight]] for [[NPC]]s.
! width="150px" | Name
{{Note|Also works for [[bot]]s in {{csgo}}.}}
! width="100px" | Seen in .vmt
 
! width="150px" | Availability
=== %CompileDetail ===
! Effect
Forces the brush to no longer cut [[visleaf]]s, similar to {{ent|func_detail}}.  
|- id="%CompileBlockLOS"
 
| %CompileBlockLOS
=== %CompileHint (<tt>toolshint</tt>)===
| toolsblocklos
[[image:Toolshint.gif|32px]] Makes the face hint-cut [[visleaf]]s. This implies <tt>NoLight</tt> and <tt>NoDraw</tt>.
|
 
| Makes the brush block only the [[line of sight]] for [[NPC]]s.<br>{{Note|Also works for [[bot]]s in {{csgo}}.}}
=== %CompileInvisible (<tt>toolsinvisible</tt>) ===
|- id="%CompileDetail"
[[image:Toolsinvisible.gif|32px]] Makes a surface behave like <tt>NoDraw</tt>, but still allows bullets to pass through it, except in {{csgo|2}}. This also implies <tt>NoLight</tt>.
| %CompileDetail  
 
|
=== %CompileLadder (<tt>toolsladder</tt>)===
|
[[image:Toolsladder.gif|32px]] Makes the brush usable as a {{ent|func_ladder}}.
| Forces the brush to no longer cut [[visleaf]]s, similar to {{ent|func_detail}}.  
|- id="%CompileHint"
=== %CompileNoDraw (<tt>toolsnodraw</tt>) ===
| %CompileHint
[[image:Toolsnodraw.gif|32px]] Makes a brush behave like <code>tools/toolsnodraw</code>.
| toolshint  
 
|  
=== %CompileNonSolid ===
| Makes the face hint-cut [[visleaf]]s. This implies <tt>NoLight</tt> and <tt>NoDraw</tt>.
Makes the brush not solid to anything.
|- id="%CompileInvisible"
{{bug|{{l4d2}} Turns brushes non-solid '''and invisible''' but still casts shadows.}}
| %CompileInvisible
 
| toolsinvisible  
=== %CompileNoShadows ===
|  
Prevents [[shadows]] from being cast onto the texture.
| Makes a surface behave like <tt>NoDraw</tt>, but still allows bullets to pass through it, except in {{csgo|2}}. This also implies <tt>NoLight</tt>.
 
|- id="%CompileLadder"
=== %CompilePassBullets===
| %CompileLadder
Makes the brush behave like a grating, allowing bullets to pass through but blocking other objects. Useful for foliage or metal grates.
| toolsladder  
{{bug|Non-functional in {{csgo|2}} and {{css|2}}.}}
|  
 
| Makes the brush usable as a {{ent|func_ladder}}.
===%CompileTeam===
|- id="%CompileNoDraw"
{{Seealso|{{ent|%compileteam}}}}
| %CompileNoDraw  
{{l4d2|only}}<br>Decides which team should be affected by this tool texture. Seen in <tt>climb_versus</tt>, a ladder for infected only.
| toolsnodraw  
 
|  
=== %CompileWater, %CompileSlime ===
| Makes a brush behave like <code>tools/toolsnodraw</code>.
Marks the brush as a [[Water (shader)|water]]-type material. Makes it non-solid, allows swimming inside, etc. The slime variant switches to green splash particles. If <code>%CompileKeepLight</code> is also set, the brush will retain its lighting data.
|- id="%CompileNonSolid"
{{bug|{{l4d2}} <tt>%CompileSlime</tt> uses default water splash particles.}}
| %CompileNonSolid  
 
|
===%NoPortal===
|
{{Portalseries|only}}<br>
| Makes the brush not solid to anything. <br>{{bug|{{l4d2}} Turns brushes non-solid '''and invisible''' but still casts shadows.}}
Makes the texture non-portalable unless [[Gel (Portal 2)|Conversion Gel]] is used.
|- id="%CompileNoShadows"
 
| %CompileNoShadows  
===%NoPaint===
|
{{portal2|only}}<br>
|
Makes the material unable to be painted by [[Gel (Portal 2)|Gel]].  
| Prevents [[shadows]] from being cast onto the texture.
 
|- id="%CompilePassBullets"
=== %CompileStairs ===
| %CompilePassBullets  
{{infra|only}}<br>
|
Makes brushwork traversable up to an angle of 63.4349488, as opposed to the usual 45°.
|
 
| Makes the brush behave like a grating, allowing bullets to pass through but blocking other objects. Useful for foliage or metal grates.<br>{{bug|Non-functional in {{csgo|2}} and {{css|2}}.}}
|- id="%CompileTeam"
| [[%25compileteam]]
| climb_versus
| {{l4d2|only}}
| Decides which team should be affected by this tool texture.
|- id="%CompileWater"
| %CompileWater
|
|
| Marks the brush as a [[Water (shader)|water]]-type material. Makes it non-solid, allows swimming inside, etc. If <code>%CompileKeepLight</code> is also set, the brush will retain its lighting data.
|- id="%CompileSlime"
| %CompileSlime
|
|
| same as %CompileWater, but with green splash particles. <br>{{bug|{{l4d2}} <tt>%CompileSlime</tt> uses default water splash particles.}}
|- id="%NoPortal"
| %NoPortal
| toolsblack_noportal
| {{Portalseries|only}}
| Makes the texture non-portalable unless [[Gel (Portal 2)|Conversion Gel]] is used.
|- id="%NoPaint"
| %NoPaint
|
| {{portal2|only}}
| Makes the material unable to be painted by [[Gel (Portal 2)|Gel]].  
|- id="%CompileStairs"
| %CompileStairs
| toolsstairs
| {{infra|only}}
| Makes brushwork traversable up to an angle of 63.4349488, as opposed to the usual 45°.
|}
[[Category:List of Shader Parameters]]
[[Category:List of Shader Parameters]]

Revision as of 12:57, 15 August 2022

English (en)中文 (zh)Translate (Translate)

Several special shader parameters exist that start with a % sign instead of $. These are read by the compile tools to alter the properties of the face or the brush they are attached to. Most are intended to produce the special tools/ textures, but they may also be used for other materials. All are boolean properties. These cannot be affected by Proxies.

See also Tool Textures for more detail about the propeties of individual materials.

Example:

LightmappedGeneric
{
 $basetexture developer/custom_clip
 %compileclip 1
}

Exclusive Flags

Only one of the following flags may be set on any given material.
Every flag is available in all Source Engine branches, unless specifically mentioned in the Availability box

Name Seen in .vmt Availability Effect
%CompileClip toolsclip Makes the brush block only players and NPCs. This is equivalent to a combination of %PlayerClip and %CompileNPCClip.
%CompileNoChop Prevents "subdividing patches" on the surface. This presumably affects how the face is converted to triangles.
%CompileNPCClip toolsnpcclip Makes the brush block only NPCs. This implies NoLight and NoDraw.
Note.pngNote:Counter-Strike: Global Offensive Blocks bots, even though they are players.
%CompileOrigin toolsorigin (only in GoldSrc) Sets the rotation origin of a brush entity.
%CompileTrigger toolstrigger Makes the brush suitable for Triggers.
%CompileSkip toolsskip Removes the face during compilation, making the brush into sets of planes.
%CompileSky toolsskybox Makes the face render the (2D/3D) Skybox and emit light_environment light.
%Compile2DSky toolsskybox2d Makes the face render the 2D Skybox only, in addition to emitting light_environment light.
%PlayerClip toolsplayerclip Makes the brush only block players.
%CompileNoLight nolight (in all games since Alien Swarm)(also in Source 2013) Disables generating lightmaps for a brush face. Useful for materials that don't need lighting info or are always invisible. This is disabled on water materials.
%CompileGrenadeClip toolsgrenadeclip (only in Counter-Strike: Global Offensive) Makes the brush only block grenades.
%CompileDroneClip toolsdroneclip (only in Counter-Strike: Global Offensive) Makes the brush only block drones.
%CompileFog ToolsFog This may be a deprecated flag that so far has not been seen as being useful.

Additive Flags

Multiple of the following flags may be applied to any given material.
Every flag is available in all Source Engine branches, unless specifically mentioned in the Availability box

Name Seen in .vmt Availability Effect
%CompileBlockLOS toolsblocklos Makes the brush block only the line of sight for NPCs.
Note.pngNote:Also works for bots in Counter-Strike: Global Offensive.
%CompileDetail Forces the brush to no longer cut visleafs, similar to func_detail.
%CompileHint toolshint Makes the face hint-cut visleafs. This implies NoLight and NoDraw.
%CompileInvisible toolsinvisible Makes a surface behave like NoDraw, but still allows bullets to pass through it, except in Counter-Strike: Global Offensive Counter-Strike: Global Offensive. This also implies NoLight.
%CompileLadder toolsladder Makes the brush usable as a func_ladder.
%CompileNoDraw toolsnodraw Makes a brush behave like tools/toolsnodraw.
%CompileNonSolid Makes the brush not solid to anything.
Icon-Bug.pngBug:Left 4 Dead 2 Turns brushes non-solid and invisible but still casts shadows.  [todo tested in ?]
%CompileNoShadows Prevents shadows from being cast onto the texture.
%CompilePassBullets Makes the brush behave like a grating, allowing bullets to pass through but blocking other objects. Useful for foliage or metal grates.
Icon-Bug.pngBug:Non-functional in Counter-Strike: Global Offensive Counter-Strike: Global Offensive and Counter-Strike: Source Counter-Strike: Source.  [todo tested in ?]
%compileteam climb_versus (only in Left 4 Dead 2) Decides which team should be affected by this tool texture.
%CompileWater Marks the brush as a water-type material. Makes it non-solid, allows swimming inside, etc. If %CompileKeepLight is also set, the brush will retain its lighting data.
%CompileSlime same as %CompileWater, but with green splash particles.
Icon-Bug.pngBug:Left 4 Dead 2 %CompileSlime uses default water splash particles.  [todo tested in ?]
%NoPortal toolsblack_noportal (only in Portal series) Makes the texture non-portalable unless Conversion Gel is used.
%NoPaint (only in Portal 2) Makes the material unable to be painted by Gel.
%CompileStairs toolsstairs (only in INFRA) Makes brushwork traversable up to an angle of 63.4349488, as opposed to the usual 45°.