material with alpha-channel + bumpmap
BlueRideR
12-08-2005, 11:42 AM
so i have this texture of a forest that i want to use on the edge of my map.
looks like this (only bigger :P):
http://home.iae.nl/users/magician/guido/forest_1.jpg
it has alpha-channel so the black stuff on top is masked.
it works ok sofar, but now i'm trying to add a bumpmap as well so it looks less flat.
the bumpmap does work, as i can see the difference and it looks much better, but now the transparency from the alpha-channel is gone, so i have a bumped forest with black at the top.
.vmt looks like this:
"LightmappedGeneric"
{
"$basetexture" "forest/forest_background"
"$alphatest" 1
"$bumpmap" "forest/forest_background_normal"
}
can anyone tell me what i'm doing wrong here? valve's material-tutorial sure couldn't :(
mahhag
12-08-2005, 05:04 PM
Although I don't know how to fix the problem, but that would look kinda weird with bumpmapping.
BlueRideR
12-08-2005, 06:36 PM
not really, actually it looks a lot better.
it's only used on the edge of the map so players won't be able to get right up close to it, but the bumpmap added a little depth because i made it so the front trees stood out from the background.
oh well it's not really a big deal, i just have it without bumpmap now. but it would be nice to know anyway :P.
Neutrino
12-08-2005, 06:42 PM
can we get an ingame picture of how it looks with the bumpmap? :)
also. try this. replace your alphatest line with...
"$translucent" 1
Watchtower
12-08-2005, 07:49 PM
does your bumpmap have an alpha channel? Check and double check your .vmt's too.
Someth|ngW|cked
12-09-2005, 02:06 AM
Set you VMT up to look like this, Alpha masked material with a normalmap only work in DX9 so u need to use aproxy or ur material will look odd in non dx9 modes
And your normal map does not need an alpha mask if your basetexture has one
"lightmappedGeneric"
{
"$baseTexture" "cs_italy/ivy06"
"$translucent" 1
"$surfaceprop" "foliage"
"$nocull" 1
"LightmappedGeneric_DX9"
{
"$bumpmap" "wicked_custom/ivy_1_normal"
"$normalmapalphaenvmapmask" 1
"$envmapcontrast" 1
"$envmapsaturation" 1
"$envmaptint" "[0.5 0.5 0.5]"
"$envmap" "env_cubemap"
}
}
BlueRideR
12-09-2005, 02:47 AM
Originally posted by Someth|ngW|cked
Alpha masked material with a normalmap only work in DX9
ai, pity.. so even if i had done it right, my radeon8500 would never display it correctly as it's dx8 :(. It still does look bumped in dx8 though, or well more like it cast shadow onto itself.
i'll set it up like you said Wicked, thanks a lot for your help.
Someth|ngW|cked
12-09-2005, 05:15 PM
Actually, i correct myself
I believe that normal maped materials with an alpha channel work in DX8 but when you apply an env map to them they don't render correctly, just test this using the text i posted
change the DX9 proxy to DX8.1 and remove the perams for the envmap and see what happens
Use the flashlight to see if the normalmap is actually rendering properly and you can also use the mat_normalmaps 1 command to make sure your normalmap is applied properly
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.