VMT Opacity

Hey everyone. So, I’m trying to create a weed bush and have some troubles with leafs. In 3DS Max i have an opacity channel

But in gmod:

*So, what should I write in .vmt file to enable this alpha channel?

$translucent 1

Thank You, everything works now.

I have the same problem! I can not get the effect I want. this is the texture that I use as diffuse:http://www.moddb.com/members/dibe91/images/ex
and this is the texture that I use to make opacity: http://www.moddb.com/members/dibe91/images/ex2

now how do I make sure that the black parts are transparent while the white ones leave the base texture?

If you made that leaf texture, you should try to color the background the same color as the leaf instead of white. It removes that little white border when you use transparency.

you should use
$alphatest
$allowalphatocoverage 1
instead

What’s wrong with translucent?

EDIT: Nevermind, Rin filled me in. Try what Ninja said.

I’ll drop a quick explanation in case anybody reading doesn’t know.

Using $translucent means other translucent faces will be drawn over it. Unfortunately, it’s kind of like the layers are reversed. Running in front of glass with transparent hair will display the glass behind your character properly, but over your hair the glass will suddenly overlap.

Using $alphatest means can fix this at the cost of sacrificing most of the quality in being able to use opacities that are between 0 and 100. It doesn’t look great but it works perfectly fine on basic world props such as grass and plants.

I found out what the problem is. for some strange reason, is unable to read the second texture. I do not know how to do it then I write the material that I use so you can tell me what’s missing:

“VertexLitGeneric”
{

 $basetexture "Marcus/COG_Marcus_NEWHAIR"
 $bumpmap "Marcus/COG_Marcus_Cine_U_Hair_A"
     $alpha "1"

}

$alpha is wrong - the right thing is $alphatest

I looked at the wiki of the valve and it was written that! however, even so the problem remains …

show pictures?

If you’re using $alphatest 1 then it should work fine as long as your alpha mask exists. The VTF for the hair texture does have the proper alpha mask, right?

but it should not be the same! if you want to step the model so maybe you can solve my problem!

If by step you mean download, sure, go ahead and send it. On a side note, fury_161 already ported a Gears of War 1 Marcus Fenix here.

I already got that model, but it’s not like I want to! here is the link: fileom.com
Here is the model of 3d studio max both on gmod

Your diffuse texture doesn’t have an alpha channel. That black and white version of the hair needs to be in the alpha channel, then exported as a DDS, TGA, or VTF.

there is a black and white version! is what is called COG_Marcus_Cine_U_Hair_A

Yeah, but it needs to be in the alpha channel of the diffuse map texture. Not as a seperate texture by itself.