Texture w/2 alpha channels


Hintzmann
06-14-2006, 04:22 PM
We can't figure this out, please help :-)

We want to use 2 alpha channels in one texture, one for shining-effekt (Alpha 2) and one for translucency (Alpha 1).
What we have in mind was combining the translucent from the "wood/woodtrack001a" and the shining-effekt from "nature/gravelfloor002b".

This is our vmt:
"LightmappedGeneric"
{
"$basetexture" "ludendorff/luden_gravelfloor002b"
"$surfaceprop" "metal"
"$envmap" "env_cubemap"
"$basealphaenvmapmask" 1
"$envmapcontrast" 1
"$envmapsaturation" 1
"$envmaptint" "[ .9 .9 .9]"
"$translucent" 1
}

And here is a screenshoot form photoshop for illustration.
http://files.langal.dk/extern/2alphas.gif

- Is this even possible ?

Furyo
06-14-2006, 04:47 PM
I'm a complete noob when it comes to textures (except the very basic, non tileable crap) but my guess would be to use a _spec.vtf on top of the two "generic" ones. From my experience browsing the gcf, it's how Valve does it.

Ca-Chicken-Soup
06-14-2006, 06:13 PM
Originally posted by Hintzmann
We can't figure this out, please help :-)

We want to use 2 alpha channels in one texture, one for shining-effekt (Alpha 2) and one for translucency (Alpha 1).

Check out this wiki page (http://developer.valvesoftware.com/wiki/Reflective_Materials) which talks about exactly this. There is only one alpha channel used in textures for transparencies, I think the second alpha channel you are refering to is used as a bump map which is a seperate file

Watchtower
06-14-2006, 08:26 PM
As far as I remember you dont need 2 different maps for this. Its been awhile so I may be wrong.

However, this technique applies to windows actually. My suggestion is to browse the HL2 window textures and .vmt's and see how they do it. Because they use both glass shaders for shine and transparancy effects.

Hintzmann
06-15-2006, 02:45 AM
We will be browsing the GCF-files and see if we can figure out how Valve did it. And the article was realy good for understanding the vmt-properties.

Thanks :-D

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.