Custom Grating Texture
Quote from albian on July 1, 2015, 4:19 pmI'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?
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?
Quote from josepezdj on July 1, 2015, 4:28 pmEasy: check out other already existing grate materials and copy what you find there
Example:
- Code: Select all
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 1Test it...
Easy: check out other already existing grate materials and copy what you find there
Example:
- Code: Select all
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...
Quote from albian on July 1, 2015, 10:24 pmThat works thanks - and the $translucent 1 does work instead of:
$AlphaTest 1
$AlphaTestReference "0.3"
$AllowAlphaToCoverage 1
That works thanks - and the $translucent 1 does work instead of:
$AlphaTest 1
$AlphaTestReference "0.3"
$AllowAlphaToCoverage 1
Quote from CamBen on July 2, 2015, 2:28 amTranslucent 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.
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.
Aperture Science: We do our science asbestos we can!