Material map compile flags: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(→‎Additive Flags: swapped "only in l4d2" to "only in l4d and l4d2)
(→‎Exclusive Flags: Added Playercontrolclip and separated clips from the other exclusive flags.)
Line 13: Line 13:
== Exclusive Flags ==
== Exclusive Flags ==
'''Only one''' of the following flags may be set on any given material.<br>
'''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
Every flag is available in all Source Engine branches, unless specifically mentioned in the <code>Availability</code> box<br>
====Clips====
{| class="standard-table"
{| class="standard-table"
! width="150px" | Name
! width="150px" | Name
Line 24: Line 25:
|  
|  
| Makes the brush block only [[player]]s and [[NPC]]s. This is equivalent to a combination of <tt>%PlayerClip</tt> and <tt>%CompileNPCClip</tt>.
| Makes the brush block only [[player]]s and [[NPC]]s. This is equivalent to a combination of <tt>%PlayerClip</tt> and <tt>%CompileNPCClip</tt>.
|- id="%CompileNoChop"
| %CompileNoChop
|
|
| Prevents "subdividing patches" on the surface. This presumably affects how the face is converted to triangles.
|- id="%CompileNPCClip"
|- id="%CompileNPCClip"
| %CompileNPCClip
| %CompileNPCClip
Line 34: Line 30:
|  
|  
| 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.}}
| 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.}}
|- id="%CompileOrigin"
| %CompileOrigin
| toolsorigin 
| {{gldsrc|only}}
| Sets the rotation origin of a brush entity.
|- id="%CompileTrigger"
| %CompileTrigger
| toolstrigger
|
| Makes the brush suitable for [[Trigger]]s.
|- 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"
|- id="%PlayerClip"
| %PlayerClip
| %PlayerClip
Line 64: Line 35:
|  
|  
| Makes the brush only block [[player]]s.
| Makes the brush only block [[player]]s.
|- id="%CompileNoLight"
|- id="%compileplayercontrolclip"
| %CompileNoLight
| %CompilePlayerControlClip
| nolight
| toolscontrolclip
| {{as|since}}{{src13|also}}
| {{hl2ep2|removed}}{{Gmod|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.  
| Unsure as to how this was meant to be used. Usually seen together with {{ent|func_vehicleclip}}.
|- id="%CompileGrenadeClip"
|- id="%CompileGrenadeClip"
| %CompileGrenadeClip
| %CompileGrenadeClip
Line 79: Line 50:
| {{only|{{csgo}}}}
| {{only|{{csgo}}}}
| Makes the brush only block drones.  
| Makes the brush only block drones.  
|}
====Other====
{| class="standard-table"
! width="150px" | Name
! width="100px" | Seen in .vmt
! width="150px" | Availability
! Effect
|- id="%Compile2DSky"
| %Compile2DSky
| toolsskybox2d
|
| Makes the face render the 2D [[Skybox]] only, in addition to emitting <tt>light_environment</tt> light.
|- id="%CompileFog"
|- id="%CompileFog"
| %CompileFog
| %CompileFog
Line 84: Line 67:
|  
|  
| This may be a deprecated flag that so far has not been seen as being useful.
| This may be a deprecated flag that so far has not been seen as being useful.
|- id="%CompileNoChop"
| %CompileNoChop
|
|
| Prevents "subdividing patches" on the surface. This presumably affects how the face is converted to triangles.
|- 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="%CompileOrigin"
| %CompileOrigin
| toolsorigin 
| {{gldsrc|only}}
| Sets the rotation origin of a brush entity.
|- 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="%CompileTrigger"
| %CompileTrigger
| toolstrigger
|
| Makes the brush suitable for [[Trigger]]s.
|}
|}
== Additive Flags ==
== Additive Flags ==
Multiple of the following flags may be applied to any given material.<br>
Multiple of the following flags may be applied to any given material.<br>

Revision as of 09:42, 17 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

Clips

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.
%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.
%PlayerClip toolsplayerclip Makes the brush only block players.
%CompilePlayerControlClip toolscontrolclip (removed since Half-Life 2: Episode Two)(also in Garry's Mod) Unsure as to how this was meant to be used. Usually seen together with func_vehicleclip.
%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.

Other

Name Seen in .vmt Availability Effect
%Compile2DSky toolsskybox2d Makes the face render the 2D Skybox only, in addition to emitting light_environment light.
%CompileFog ToolsFog This may be a deprecated flag that so far has not been seen as being useful.
%CompileNoChop Prevents "subdividing patches" on the surface. This presumably affects how the face is converted to triangles.
%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.
%CompileOrigin toolsorigin (only in GoldSrc) Sets the rotation origin of a brush entity.
%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.
%CompileTrigger toolstrigger Makes the brush suitable for Triggers.

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 and 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°.