Custom Grating Texture
Posted Jul 01, 2015
I've made a custom texture with a grating. Contains alpha channel etc so you can see through it ("$translucent" 1 in the vmt file). Have also added "%noportal" 1. Trouble is, I want to be able to fire a portal through the grating like the built in gratings and this doesn't work (the brush just blocks portals).
What do I have to put into the vmt file to make it behave like the built in gratings?
Registered users don’t see ads!
Register now!
Posted Jul 01, 2015
Replied
8 minutes
later
Easy: check out other already existing grate materials and copy what you find there
Example:
LightmappedGeneric
{
$basetexture "Metal/metalgrate018"
"%compilepassbullets" 1
$surfaceprop metalgrate
"%keywords" portal
$AlphaTest 1
$AlphaTestReference "0.3"
$AllowAlphaToCoverage 1
"%nopaint" 1
}
I think the most important params are:
"%compilepassbullets" 1
$surfaceprop metalgrate
... and I think you could use the $translucent 1 instead of all this:
$AlphaTest 1
$AlphaTestReference "0.3"
$AllowAlphaToCoverage 1
Test it...
Posted Jul 01, 2015
Replied
5 hours
later
That works thanks - and the $translucent 1 does work instead of:
$AlphaTest 1
$AlphaTestReference "0.3"
$AllowAlphaToCoverage 1
Registered users don’t see ads!
Register now!
Posted Jul 02, 2015
Replied
4 hours
later
Translucent is for partially transparent stuff like glass or other semi see through surfaces. Alpha test is used when part of the texture is completely opaque and the alpha denotes the places that are fully invisible.