View Full Version : Blending displacement = no bump mapping?
06-02-2008, 12:12 PM
Ok, so, for my map (http://forums.tf2maps.net/showthread.php?t=1607), I decided to go with blending for the snowy tops on the cliffs, since I can control the snow better that way. The problem is, the blending texture does not preserve the bump-mapping of the rock texture, as you can see in the screenshots in that thread (they're all with BM enabled). Any hints on how to fix that? Or am I going to have to go through the pain of creating an actual rock/snow texture and replacing it everywhere?
06-02-2008, 12:24 PM
You need to edit the VMF of the blend and add the Normalmap texture from the rock to the second blend material as well.
06-02-2008, 12:28 PM
If this works, I'll kiss you. Well, not literally, but, you know...
Edit: did you mean VMT by the way?
Edit 2: Ok, in the rock's original VMT, I found this:
I reckon I should change something before adding it to the blend texture's VMT, but what? In the blending texture, the rock is the first texture, and the snow is the second one (so the rock is $basetexture and the snow is $basetexture2).
06-02-2008, 12:35 PM
06-02-2008, 12:36 PM
But won't that apply bump-mapping to the snow as well? Sorry for posting idiotic questions, but I can't test it for myself right now. I guess I'll try with just $bumpmap at first, $bumpmap2 if that fails, and both if that fails too :) Again, thanks for your help mate, appreciated.
06-02-2008, 12:41 PM
Oh, Ithought that you wanted the rocks shape to follow as if a thin coat of snow covered it, yes that will apply the bumpmap to the snow as well.
Try looking at the valve wiki for $ssbump and see what it is.
06-02-2008, 02:03 PM
Hm, I just had a look through TF2's stock blending textures, and it appears most of them use bump mapping as well:
I'll have to give that a go, it seems it should work fine like you said.
Edit: bleh, it didn't work. Here's what I did:
I'm getting annoyed by this bloody thing... :)
Edit 2: Examining the texture from the line "$blendmodulatetexture" "Nature/dirtground002_blendmask", I'm starting to think it needs such a mask to blend bumpmapped textures... sigh.
Edit 3: Aaaaand I finally discovered that blending bump mapped textures requires DX9. Bummer.
Edit 4: DX9, no dice. This is becoming one hell of an issue. I need to sleep on it.
06-02-2008, 11:10 PM
Bump after all the edits and just getting up :)
06-03-2008, 12:13 AM
Heres what I would do. Create a new .vtf file for your texture, copying an existing blend's .vtf and then just changing the names in some things.
"$bumpmap2" "(Whatever your snow bumpmap is, just find a smooth one already in game)"
"$blendmodulatetexture" "Nature/dirtground002_blendmask" *****Not sure about this line, goes with your rock texture
06-05-2008, 09:21 AM
I finally got it to work!
I did some testing and found out that even on most of Valve's own blending textures, bumpmapping doesn't work! So I compared the ones that work to the ones that don't and quickly found the cause of the problem - apparently, the game doesn't like ssbump on blending displacements. All of the working textures used a normal map - that is, "texturename_normal". So, I removed the $ssbump parameter from my blending textures, I replaced the bumpmap with a "normal" one (since the rock I'm using doesn't have one, I just used the one from some other rock), and it worked like a charm! Now all I have to do is create my own normal map for the rock I'm using, but that's a piece of cake now that I've gotten this issue out of my way.
Thanks to everyone who helped!
vBulletin® v3.8.2, Copyright ©2000-2013, Jelsoft Enterprises Ltd.