Material map compile flags: Difference between revisions
|  (added CompileStairs from infra) | Kestrelguy (talk | contribs)  m (→%NoPortal {{only|{{portal}}{{portal2}}}}:  used the "portals" template instead of separate templates for the funni text color) | ||
| Line 86: | Line 86: | ||
| {{bug|%CompileSlime uses default water splash particles in {{l4d2}}.}} | {{bug|%CompileSlime uses default water splash particles in {{l4d2}}.}} | ||
| === %NoPortal {{only|{{ | === %NoPortal {{only|{{portals}}}} ===   | ||
| In Portal and Portal 2, makes the texture non-portalable, unless [[Gel_(Portal_2)|Conversion Gel]] is used. | In Portal and Portal 2, makes the texture non-portalable, unless [[Gel_(Portal_2)|Conversion Gel]] is used. | ||
Revision as of 19:10, 17 April 2022
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.
 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.
 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.
 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.
 Makes the brush suitable for Triggers.
%CompileSkip(toolsskip)
 Removes the face during compilation, making the brush into sets of planes.
 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.
 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.
 Makes the face render the 2D Skybox only, in addition to emitting light_environment light.
%PlayerClip (tools/toolsplayerclip)
 Makes the brush only block players.
 Makes the brush only block players.
%CompileNoLight (nolight)
(in all games since  )(also in
)(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.
 Makes the brush block only the line of sight for NPCs.
 Note: Also works for bots in
Note: Also works for bots in  .
.%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.
 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
 Makes a surface behave like NoDraw, but still allows bullets to pass through it, except in  . This implies NoLight also.
. This implies NoLight also.
%CompileLadder
 Makes the brush usable as a func_ladder.
 Makes the brush usable as a func_ladder.
%CompileNoDraw (toolsnodraw)
 Makes a brush behave like
 Makes a brush behave like tools/toolsnodraw.
%CompileNonSolid
Makes the brush not solid to anything.
 Bug:
Bug: Turns brushes non-solid and invisible but still casts shadows.  [todo tested in ?]
 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.
 Bug: Non-functional in
Bug: Non-functional in  and
 and  .  [todo tested in ?]
.  [todo tested in ?]%CompileTeam
 Decides which team should be affected by this tool texture. Seen in climb_versus, a ladder for infected only.
 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.
 Bug:%CompileSlime uses default water splash particles in
Bug:%CompileSlime uses default water splash particles in  .  [todo tested in ?]
.  [todo tested in ?]%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.
%CompileStairs (only in  )
)
Makes brushwork traversable up to an angle of 63.4349488, as opposed to the usual 45°.