Re: Cubemap on weapons?
Posted by dagonal on
Tue Jan 10th 2006 at 3:26pm
11 posts
1 snarkmarks
Registered:
Jan 10th 2006
Location: Canada
I was just curious as to how to make a weapon that was somewhat reflectve.
I'm using XSI to create the model (which is already done), I've
textured it accordingly and successfully exported it to Hammer and it's
working...
But I have no clue how to make it reflective (obviously with a cubemap), but is it possible to tie it to the weapon? And how?
Or am I going at this all wrong? :sad:
Thanks in advance!
Re: Cubemap on weapons?
Posted by SnarkSephiroth on
Tue Jan 10th 2006 at 3:48pm
206 posts
31 snarkmarks
Registered:
Sep 10th 2003
Occupation: Automotive Tech Student
Location: Phoenix, Arizona
I am very certain it is all in the parameters of the .vmf file for your textures .vtf file. For your texture to use cubemaps from your maps you need to put this in the .vmf:
$env_cubemap
If I remember correctly when I played with textures, this did it. Good luck.
Re: Cubemap on weapons?
Posted by BlisTer on
Tue Jan 10th 2006 at 6:16pm
BlisTer
member
801 posts
1304 snarkmarks
Registered:
Jun 10th 2004
Location: Belgium
what cpt P says is absolutely true for nice equal reflections, which most weapons have (barrel etc).
however, for sake of completeness, here's how to implement "dirty" / unequal reflections (i.e. some parts dont reflect, or reflect to a lesser extent):
{
"$basetexture" "customtex/panel11"
"$envmap" "env_cubemap"
"$envmapmask" "customtex/specmask"
"$envmapcontrast" "1"
"$surfaceprop" "metal"
}
where you draw the "specmask" with black/white variations (more white =more reflective) according to your basetexture. you could also search the .gcf files for a close-matching one. it all takes a lot of time and trial/error, but the result is nice.
if you want to combine this with normalmaps (e.g. for small 3d weapon parts that you dont want to model), you have to use
{
"$basetexture" "customtex/panel12"
"$envmap" "env_cubemap"
"$bumpmap" "customtex/panel12_normal"
"$normalmapalphaenvmapmask" 1
"$envmapcontrast" "1"
"$surfaceprop" "metal"
}
instead, where you put the specmask in the alpha channel of panel12_normal (where the other 3 channels make up the normalmap)
as i said, this is just for the sake of completeness, you probably wont need it - just in case
These words are my diaries screaming out loud
Re: Cubemap on weapons?
Posted by dagonal on
Tue Jan 10th 2006 at 10:05pm
Posted
2006-01-10 10:05pm
11 posts
1 snarkmarks
Registered:
Jan 10th 2006
Location: Canada
Oh my god...
You guys are awesome! That was exactly what I was looking for!! I dunno why I didn't think it would be there!
Thanks so much!!