Custom Blend material/bump map error transition

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

Custom Blend material/bump map error transition

Postby zzdd on Wed Sep 08, 2010 7:04 pm

Hi guys!
I'm new in this forum.
I have a problem that locks my Counter-Strike:Source map release (cs_newoffice_v1).
This problem was already mentioned here but it's an old thread.
Anyway..I have a custom blend material that is supposed to simulate a wet road.
Here is my vmt:

Code: Select all
"WorldVertexTransition"
{
   "$basetexture" "cs_newoffice/asphalt"
   "$basetexture2" "cs_newoffice/asphalt"
   
   "$bumpmap" "cs_newoffice/asphalt_normal"
   "$envmap" "env_cubemap"
   "$envmaptint" "[ .81 .81 .81]"
   "$envmapcontrast" "1"
   
   "$normalmapalphaenvmapmask" "1"
   
   "%keywords" "cs_newoffice"   
}


As you can see, the blend material uses the same albedo for first and second texture.
Code: Select all
"$basetexture" "cs_newoffice/asphalt"
"$basetexture2" "cs_newoffice/asphalt"


The only difference is that the first material is bump mapped:
Code: Select all
"$bumpmap" "cs_newoffice/asphalt_normal"
"$envmap" "env_cubemap"
"$envmaptint" "[ .81 .81 .81]"
"$envmapcontrast" "1"


In Hammer I painted alpha channel to simulate some puddles (infact the normal map gives to texture a nice wet effect.)

My real problem is that this material only works when I run the game forcing directx8. (-dxlevel 80).
But when I run game in directx9 mode the reflection extends itself along all material surface!
Here are the screenshots:

DX8 - what I expect
Image

DX9 - the error
Image

As you can see the reflection goes all along the displacement!! ¬_¬
What does it happened? Do you also have the same problem with this texture?

Any help will be appreciated!!!
Thanks in advance!



Here are some useful files:
map zip
map source
compilation log
(textures are included in the bsp)

PS: my video card is an ATI MOBILITY RADEON X600 64MB (supports Dx9 and Shader Model 2.0).
CS:S forever
User avatar
zzdd
Member
Member
 
Joined: Thu Sep 02, 2010 10:46 pm
Location: Italy

Re: Custom Blend material/bump map error transition

Postby -=Biohazard=- on Wed Sep 08, 2010 7:37 pm

Try to add '$bumpmap2' (it's actually dx9 only) with a copy of your normalmap, just make the alphachannel completely black for that one.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Custom Blend material/bump map error transition

Postby Major Banter on Wed Sep 08, 2010 7:44 pm

I have this error all the time with custom textures.

Could you explain that a bit better Biohazard?
ImageImageImage
Major Banter
Veteran
Veteran
 
Joined: Tue Apr 01, 2008 10:52 pm
Location: UK

Re: Custom Blend material/bump map error transition

Postby -=Biohazard=- on Wed Sep 08, 2010 7:49 pm

With '$normalmapalphaenvmapmask' the shader reads the specularity amt from the normalmaps alphachannel, so I guess it's a *bug* that this works in dx8, since it should simply use the same normalmap for both albedos. But I would suspect that you can fix the dx9 part by actually defining bumpmap2 in your vmt and link it to a normalmap with a black alphachannel: I didn't try this though...
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Custom Blend material/bump map error transition

Postby zzdd on Wed Sep 08, 2010 7:58 pm

Thanks for your replies!

@Biohazard:
this is my normalmap:
Image

How can I make a black alphachannel?
Sorry but it's the first time I use custom normalmaps..
CS:S forever
User avatar
zzdd
Member
Member
 
Joined: Thu Sep 02, 2010 10:46 pm
Location: Italy

Re: Custom Blend material/bump map error transition

Postby omnicoder on Wed Sep 08, 2010 8:01 pm

You need a second normal map that has no depth to apply to the dry version of the texture.
Image
If only the future implemented IForeseeable...
"whats threading? does it have to do with strings?" - stegarootbeer
User avatar
omnicoder
Been Here A While
Been Here A While
 
Joined: Sun Feb 07, 2010 8:35 am

Re: Custom Blend material/bump map error transition

Postby -=Biohazard=- on Wed Sep 08, 2010 8:09 pm

Even if you make it a flat normal map you need a black alpha channel or it would still reflect. To manipulate the alpha channel you need to import it into your favorite editor and change it, then save it to a 32bit tga file or directly to vtf if you have plugins for that.

Here's one with no alpha for now though.
Attachments
normalmap_noalpha.zip
(127.48 KiB) Downloaded 100 times
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Custom Blend material/bump map error transition

Postby zzdd on Wed Sep 08, 2010 8:19 pm

ok I will try this and see what it happens.
Thank you!
CS:S forever
User avatar
zzdd
Member
Member
 
Joined: Thu Sep 02, 2010 10:46 pm
Location: Italy

Re: Custom Blend material/bump map error transition

Postby zzdd on Thu Sep 09, 2010 8:36 pm

Here I am again..to say NO WAY! :cry:
Also with your texture doesn't work..but I think we are on the right way. :wink:

I've used your texture with black alpha channel and here is the result:
Image

As you can see there is a little difference in blending: here I underline that:
Image

If I come a little close the puddle I can see it shines more than the rest of the ground..kinda some addiction.. :?: ¬_¬

Here are all files:
map
texture with black alpha channel
CS:S forever
User avatar
zzdd
Member
Member
 
Joined: Thu Sep 02, 2010 10:46 pm
Location: Italy

Re: Custom Blend material/bump map error transition

Postby -=Biohazard=- on Fri Sep 10, 2010 4:26 pm

From your pictures it looks like it's working fine, some area has reflections some does not. I don't have anything installed atm to delete the textures from the bsp and those seem to have a higher priority than the ones in my materials dir so I couldn't see what would maybe have to be changed - but it looked fine to me anyways.

Can you elaborate on what you think is wrong on the pictures?
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Custom Blend material/bump map error transition

Postby zzdd on Sat Sep 11, 2010 2:10 pm

The problem is that all areas have some reflections. I simply want to reproduce a puddle with normal maps and blended textures.

Here is the bsp without textures packed.
map
and here are all textures:
asfalto
asfalto_blended
normalmap_noalpha

I really thank you for your support..I really appreciate it! :smt023 :smt045
CS:S forever
User avatar
zzdd
Member
Member
 
Joined: Thu Sep 02, 2010 10:46 pm
Location: Italy

Re: Custom Blend material/bump map error transition

Postby -=Biohazard=- on Sat Sep 11, 2010 3:05 pm

On the screens it looked like the area you marked did not have any reflections, but this behaviour was just caused by my vtf being created w/o mipmaps. I tried lots of stuff but it doesn't seem to work, I also noticed that the shader has those params: $BASETEXTURENOENVMAP and $BASETEXTURE2NOENVMAP; while the first one disables reflections on the whole material under certain circumstances the second one doesn't seem to do anything.

Seems like you can't get it to work this way w/o fixing the shader :(
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Custom Blend material/bump map error transition

Postby Groxkiller585 on Sun Sep 12, 2010 4:50 am

Judging by the pic, you made one bit not reflective and the rest reflective. So why not invert it?
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Custom Blend material/bump map error transition

Postby -=Biohazard=- on Sun Sep 12, 2010 11:07 am

Groxkiller585 wrote:Judging by the pic, you made one bit not reflective and the rest reflective. So why not invert it?


Yeah it does look like that, but the bit that seems to be not reflective is the mipmapped normalmap while the other one is the file w/o mipmaps; getting closer to that spot will make it shine as bright as the rest, the mipmaps simply flatten the normal since they are downscaled.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Custom Blend material/bump map error transition

Postby zzdd on Sun Sep 12, 2010 10:13 pm

I've tried all combinations of shader parameters ($bumpmap, $bumpmap2, $normalmapalphaenvmapmask, $basetexture2noenvmap, ecc ecc) using normals with and without alpha channel, and I had no success.
Now I can't believe that this kind of use of this shader isn't possible! It worked on previous engine (Ep1) and now it doesn't work anymore..this is so frustrating. :smt021
What can we do now? Any other suggestion?
CS:S forever
User avatar
zzdd
Member
Member
 
Joined: Thu Sep 02, 2010 10:46 pm
Location: Italy
Next

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users

cron