Please or Register to create posts and topics.

Custom Grating Texture

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?

Easy: check out other already existing grate materials and copy what you find there :P

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

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

That works thanks - and the $translucent 1 does work instead of:

$AlphaTest 1
$AlphaTestReference "0.3"
$AllowAlphaToCoverage 1

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.

My YouTube Channel: https://www.youtube.com/user/Camben24
Aperture Science: We do our science asbestos we can!