Material map compile flags: Difference between revisions
(→Additive Flags: added compileteam) |
(Added notes with exceptions for CS:GO, linked a lot.) |
||
Line 4: | Line 4: | ||
Example: | Example: | ||
LightmappedGeneric | LightmappedGeneric | ||
{ | { | ||
$basetexture developer/custom_clip | |||
'''%compileclip 1''' | |||
} | } | ||
== Exclusive Flags == | == Exclusive Flags == | ||
Only one of | '''Only one''' of the following flags may be set on any given material. | ||
=== %CompileClip (<code>toolsclip</code>) === | |||
[[image:Toolsclip.gif|32px]] Makes the brush block only | [[image:Toolsclip.gif|32px]] Makes the brush block only [[player]]s and [[NPC]]s. This is equivalent to a combination of '''PlayerClip''' and '''NPCClip'''. | ||
=== %CompileNoChop === | === %CompileNoChop === | ||
Line 21: | Line 20: | ||
=== %CompileNPCClip (<code>toolsnpcclip</code>) === | === %CompileNPCClip (<code>toolsnpcclip</code>) === | ||
[[image:Toolsnpcclip.gif|32px]] Makes the brush block only | [[image:Toolsnpcclip.gif|32px]] Makes the brush block only [[NPC]]s. This implies '''NoLight''' and '''NoDraw'''. | ||
{{Note | {{csgo}} Blocks [[bot]]s, even though they are [[player]]s.}} | |||
=== %CompileOrigin (<code>toolsorigin</code>) === | === %CompileOrigin (<code>toolsorigin</code>) === | ||
[[image:Toolsorigin.gif|32px]] Sets the origin of a brush entity. This is deprecated for Source maps, | [[image:Toolsorigin.gif|32px]] Sets the origin of a brush entity. This is deprecated for Source maps. In GoldSource, origin brushes were used to set the rotation origin of rotating entities. | ||
=== %CompileTrigger (<code>toolstrigger</code>) === | === %CompileTrigger (<code>toolstrigger</code>) === | ||
[[image:Toolstrigger.gif|32px]] Makes the brush suitable for [[Trigger | [[image:Toolstrigger.gif|32px]] Makes the brush suitable for [[Trigger]]s. | ||
=== %CompileSkip(toolsskip) === | === %CompileSkip(toolsskip) === | ||
Line 33: | Line 33: | ||
=== %CompileSky (toolsskybox) === | === %CompileSky (toolsskybox) === | ||
[[image:Toolsskybox.gif|32px]] Makes the face render the (2D/3D) [[Skybox]] | [[image:Toolsskybox.gif|32px]] Makes the face render the (2D/3D) [[Skybox]] and emit [[light_environment]] light. | ||
=== %Compile2DSky (toolsskybox2d) === | === %Compile2DSky (toolsskybox2d) === | ||
Line 39: | Line 39: | ||
=== %PlayerClip (<code>tools/toolsplayerclip</code>) === | === %PlayerClip (<code>tools/toolsplayerclip</code>) === | ||
[[image:Toolsplayerclip.gif|32px]] Makes the brush only block | [[image:Toolsplayerclip.gif|32px]] Makes the brush only block [[player]]s. | ||
=== %CompileNoLight (<code>nolight</code>) {{since|{{as}}}}{{also|{{src13}}}} === | === %CompileNoLight (<code>nolight</code>) {{since|{{as}}}}{{also|{{src13}}}} === | ||
Line 45: | Line 45: | ||
== Additive Flags == | == Additive Flags == | ||
Multiple of | Multiple of the following flags may be applied to any given material. | ||
=== %CompileBlockLOS (<code>toolsblocklos</code>) === | === %CompileBlockLOS (<code>toolsblocklos</code>) === | ||
[[image:Toolsblocklos.gif|32px]] Makes the brush block | [[image:Toolsblocklos.gif|32px]] Makes the brush block only the [[line of sight]] for [[NPC]]s. | ||
{{Note | Also works for [[bot]]s in {{csgo}}.}} | |||
=== %CompileDetail === | === %CompileDetail === | ||
Forces the brush to no longer cut [[visleaf]]s, similar to [[func_detail]]. | |||
=== %CompileHint(<code>toolshint</code>)=== | === %CompileHint (<code>toolshint</code>)=== | ||
[[image:Toolshint.gif|32px]] Makes the face hint-cut | [[image:Toolshint.gif|32px]] Makes the face hint-cut [[visleaf]]s. This implies '''NoLight''' and '''NoDraw'''. | ||
=== %CompileInvisible (<code>toolsinvisible</code>) === | === %CompileInvisible (<code>toolsinvisible</code>) === | ||
[[image:Toolsinvisible.gif|32px]] Makes a surface behave like NoDraw, but still | [[image:Toolsinvisible.gif|32px]] Makes a surface behave like '''NoDraw''', but still allows bullets to pass through it, except in {{csgo}}. This implies '''NoLight''' also. | ||
=== %CompileLadder === | === %CompileLadder === | ||
Line 69: | Line 70: | ||
=== %CompileNoShadows === | === %CompileNoShadows === | ||
Prevents shadows from being cast onto the texture. | Prevents [[shadows]] from being cast onto the texture. | ||
=== %CompilePassBullets=== | === %CompilePassBullets=== | ||
Makes the brush | Makes the brush behave like a grating, allowing bullets to pass through but blocking other objects. Useful for foliage or metal grates. | ||
{{bug| Non-functional in {{csgo}} and {{css}}.}} | {{bug| Non-functional in {{csgo}} and {{css}}.}} | ||
Line 79: | Line 80: | ||
*See [[%25compileteam]] for more info. | *See [[%25compileteam]] for more info. | ||
=== %CompileWater, CompileSlime === | === %CompileWater, %CompileSlime === | ||
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. | 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. | ||
Revision as of 16:31, 17 April 2021
Several special shader parameters exist, starting 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 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.
%CompileClip (toolsclip
)
Makes the brush block only players and NPCs. This is equivalent to a combination of PlayerClip and NPCClip.
%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.
%CompileOrigin (toolsorigin
)
Sets the origin of a brush entity. This is deprecated for Source maps. In GoldSource, origin brushes were used to set the rotation origin of rotating entities.
%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 (tools/toolsplayerclip
)
Makes the brush only block players.
%CompileNoLight (nolight
) (in all games since
)(also in
)
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 Alien Swarm, using it for the black areas you see in the levels.
Additive Flags
Multiple of the following flags may be applied to any given material.
%CompileBlockLOS (toolsblocklos
)
Makes the brush block only the line of sight for NPCs.


%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
. This implies NoLight also.
%CompileLadder
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.
%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.



%CompileTeam
Decides which team should be affected by this tool texture. Seen in climb_versus, a ladder for infected only.
- See %compileteam for more info.
%CompileWater, %CompileSlime
Marks the brush as a water-type material. Makes it non-solid, allows swimming inside, etc. The slime variant switches to green splash particles. If %CompileKeepLight
is also set, the brush will retain its lighting data.
%NoPortal (only in 
)
In Portal and Portal 2, makes the texture non-portalable, unless Conversion Gel is used.
%NoPaint (only in
)
In Portal 2, makes the material unable to be painted by Gel.