Difficulty with bump and environment maps

Got problems with your models? Struggling with textures? Get help with your custom assets.

Difficulty with bump and environment maps

Postby mrprime on Thu Apr 30, 2009 4:50 pm

Hey guys,

I was wondering if anyone could shed any light on this for me, I'm trying to make a texture with a base, bump (normal map) and specular (envmapmask).

I followed the advice posted here but it simply doesn't work! I've added the specularity map to the alpha of the diffuse and added $basealphaenvmapmask to my VMT but it's not having any of it.

Image
Here's how it looks with the envmap and bump map turned on + $normalmapalphaenvmapmask, I increased the map saturation to show it clearer - obviously the map isn't working.

I exported the specular map as its own VTF to take a picture to make sure I wasn't going mad - this is what it should look like:

Image
That's with the $envmapmask enabled and pointing to the specular map, but now the $bump doesn't work !

Infuriating.

My VMT is:
Code: Select all
"VertexlitGeneric"
{
   "$basetexture" "models/lifering/Ring Tex"
   "$envmap"      env_cubemap
   $envmapsaturation 1
   "$normalmapalphaenvmapmask"  "models/lifering/Ring Tex_NRM"
   "$normalmap" "models/lifering/Ring Tex_NRM"
   "$surfaceprop" "Plastic"
   $phong   1
   $bumpmap   "models/lifering/Ring Tex_NRM"
   $phongexponent       5   
   $phongboost      100
   $phongfresnelranges   "[0 0 100]"
   $halflambert 1
}


I can't think why it isn't working! to get the Spec map on to the normalmap (in Photoshop CS4) I just cut it, create a new channel on the normalmap and paste the spec in, then I untick the eye so, I export it as a Normal with Alpha.

Anyone have any ideas? thanks!
mrprime
Dumpling
Dumpling
 
Joined: Tue Apr 28, 2009 2:06 pm

Re: Difficulty with bump and environment maps

Postby ankhsethamon on Thu Apr 30, 2009 9:05 pm

have you tested it ingame? As far as I know, hlmv has some issues with specular maps.. But your model in a map and test it!... maybe is a model viewer problem..
Image
User avatar
ankhsethamon
Been Here A While
Been Here A While
 
Joined: Sat Aug 09, 2008 8:28 pm
Location: Mexico

Re: Difficulty with bump and environment maps

Postby dissonance on Thu Apr 30, 2009 9:13 pm

HLMV is utterly fucked when it comes to envmaps. Like ankhsethamon said, try it in-game.
i had fun once, and it was awful.
User avatar
dissonance
Veteran
Veteran
 
Joined: Wed Oct 10, 2007 12:35 am
Location: usa

Re: Difficulty with bump and environment maps

Postby mrprime on Thu Apr 30, 2009 9:49 pm

It has none of it in game either :(

Image

Does anyone have an example of an normalmapalphaenvmapmask and bump living happily together? I'm starting to think it's impossible! :(
mrprime
Dumpling
Dumpling
 
Joined: Tue Apr 28, 2009 2:06 pm

Re: Difficulty with bump and environment maps

Postby dissonance on Thu Apr 30, 2009 10:09 pm

"$basetexture" "models/lifering/Ring Tex"
"$envmap" env_cubemap
$envmapsaturation 1
"$normalmapalphaenvmapmask" "models/lifering/Ring Tex_NRM" //this should be $normalmapalphaenvmapmask 1
"$normalmap" "models/lifering/Ring Tex_NRM" //use either $normalmap or $bumpmap, but not both.
"$surfaceprop" "Plastic"
$phong 1
$bumpmap "models/lifering/Ring Tex_NRM"
$phongexponent 5
$phongboost 100
$phongfresnelranges "[0 0 100]"
$halflambert 1
i had fun once, and it was awful.
User avatar
dissonance
Veteran
Veteran
 
Joined: Wed Oct 10, 2007 12:35 am
Location: usa

Re: Difficulty with bump and environment maps

Postby JakeB on Thu Apr 30, 2009 10:10 pm

Code: Select all
    "VertexlitGeneric"
    {
       "$basetexture" "models/lifering/Ring Tex"
       "$envmap"      env_cubemap
       $envmapsaturation 1
       "$normalmapalphaenvmapmask"  "1"
       "$surfaceprop" "Plastic"
       $phong   1
       $bumpmap   "models/lifering/Ring Tex_NRM"
       $phongexponent       5   
       $phongboost      100
       $phongfresnelranges   "[0 0 100]"
       $halflambert 1
    }


That should work..now where's my cookie..
Image
User avatar
JakeB
Regular
Regular
 
Joined: Sun Sep 02, 2007 4:59 am
Location: Canada

Re: Difficulty with bump and environment maps

Postby dissonance on Thu Apr 30, 2009 10:28 pm

Beat ya by like 10 seconds =D
i had fun once, and it was awful.
User avatar
dissonance
Veteran
Veteran
 
Joined: Wed Oct 10, 2007 12:35 am
Location: usa

Re: Difficulty with bump and environment maps

Postby JakeB on Thu Apr 30, 2009 10:31 pm

dissonance wrote:Beat ya by like 10 seconds =D

Well you're a banana >_>
Image
User avatar
JakeB
Regular
Regular
 
Joined: Sun Sep 02, 2007 4:59 am
Location: Canada

Re: Difficulty with bump and environment maps

Postby dissonance on Thu Apr 30, 2009 10:55 pm

A ba... na... what?
i had fun once, and it was awful.
User avatar
dissonance
Veteran
Veteran
 
Joined: Wed Oct 10, 2007 12:35 am
Location: usa

Re: Difficulty with bump and environment maps

Postby mrprime on Thu Apr 30, 2009 11:25 pm

You guys - scholars and gentlemen, thank you!

Out of curiosity what's the difference between $bumpmap and $normalmap? all I seem to get is that $normalmap is for DX9 :| -

Anyway back to the problem!

I went ahead fixed the VMT but it was still having none of it, so I opened my textures in VTFEdit and low and behold - THE ALPHA CHANNEL IS ALL WHITE!! boy is my face red.

Ok but here's the problem - I don't see where I'm going wrong :(

Here's how I've got it set up:

Image

Then I save it straight out of Photoshop as a VTF -

Format: BGRA8888
Mimap filter: Box
Sharpen Filter: Sharpen Soft

Mipmaps and thumb nail.

Trilinear
Normal Map
Eight bit alpha

From what I've read that should be correct but it still seems to lose the alpha along the way :( sad times.
mrprime
Dumpling
Dumpling
 
Joined: Tue Apr 28, 2009 2:06 pm

Re: Difficulty with bump and environment maps

Postby dissonance on Fri May 01, 2009 1:01 am

mrprime wrote:Out of curiosity what's the difference between $bumpmap and $normalmap? all I seem to get is that $normalmap is for DX9 :| -
I have no idea whatsoever. I'm using $bumpmap, and it seems to work just fine for both ssbump and normal maps.

mrprime wrote:From what I've read that should be correct but it still seems to lose the alpha along the way :( sad times.
No idea what's going wrong here.
To be entirely honest, I use Gimp and Paint.net for this, so I'm not entirely sure how you'd get it done in Photoshop.
Lemmie see if I can whip up a tutorial for Gimp; showing you my technique might help.
i had fun once, and it was awful.
User avatar
dissonance
Veteran
Veteran
 
Joined: Wed Oct 10, 2007 12:35 am
Location: usa

Re: Difficulty with bump and environment maps

Postby ankhsethamon on Fri May 01, 2009 1:14 am

try exporting as a TGA and compile the old fashion way (with vtex.exe)
Image
User avatar
ankhsethamon
Been Here A While
Been Here A While
 
Joined: Sat Aug 09, 2008 8:28 pm
Location: Mexico

Re: Difficulty with bump and environment maps

Postby dissonance on Fri May 01, 2009 3:29 am

Image
Attachments
tut.xcf.jpg
(510.05 KiB) Downloaded 64 times
i had fun once, and it was awful.
User avatar
dissonance
Veteran
Veteran
 
Joined: Wed Oct 10, 2007 12:35 am
Location: usa

Re: Difficulty with bump and environment maps

Postby mrprime on Fri May 01, 2009 10:49 am

You guys are beautiful animals, I thank you muchly! here's the final result:

Image

LESSONS LEARNED:

$normalmapalphaenvmapmask is either 0 or 1, it doesn't link to the texture. (THANKS!)

Photoshop is an idiot and cannot be trusted to do even BASIC tasks, if other people have similar issues always check that the alpha has exported correctly using VTFEdit ! I got around it by exporting the image first as a 32 bit TGA, opening that and THEN saving it as a VTF with the previous settings I mentioned.

Phew what a relief - right I've got a huge backlog of models to go and fix now..

Thanks and e-cookies to everyone in the thread.
mrprime
Dumpling
Dumpling
 
Joined: Tue Apr 28, 2009 2:06 pm

Re: Difficulty with bump and environment maps

Postby Sarsour on Sat Aug 24, 2013 5:02 pm

I know this is ancient ...but in my process of learning source compiling for my animation in Source Filmmaker, this really came helpful as when I read that $envmapmask will not work with $bumpmap for my character I panicked, googled and came across this post. I imagine very similar to mrprime's problem. That Gimp tutorial did it for me. Thank you all!
Sarsour
Just Joined
Just Joined
 
Joined: Sat Aug 24, 2013 4:54 pm
Next

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users