UV distortion using normal and/or dUdV

Started by
4 comments, last by yogr 15 years, 3 months ago
Hi guys... I'm trying to create a glass shader like the one in half life2. I used the normal map to add a perturbation to the uv coords of the projected texture (I use a render to texture technique, not an env map). I think the result is quite good, but I read about other methods that use a dudv texture to create the glass refraction (I think that HL2 uses it too). I cannot find any info about dudv, how can I use it to distort the tex coords? Thank you, bye
Advertisement
You can check the tutorial on www.GameTutorials.com named Heightmap6 :D but it's gonna cost you, though.
Thank you for your reply. It's an interesting tutorial (and it's free), but it does not explain how to use the texel to distort the texture... do you know any other source?

(here's a screen of te current shader... I added the two flat spheres to show that the glass is refractin the objects in the scene behind it and not a cubic map)

http://img519.imageshack.us/img519/9113/scr1tk1.jpg


[Edited by - yogr on January 18, 2009 4:59:26 PM]
Quote:Original post by yogr
Thank you for your reply. It's an interesting tutorial (and it's free), but it does not explain how to use the texel to distort the texture... do you know any other source?

(here's a screen of te current shader... I added the two flat spheres to show that the glass is refractin the objects in the scene behind it and not a cubic map)

http://img519.imageshack.us/img519/9113/scr1tk1.jpg


Here's another tutorial found by googling around

http://bonzaisoftware.com/water_tut.html

It seems it has source code too :D.
Why would a dudv map be any better? I've never understood the benefits...just means you need to load another texture to me. What wrong with using the normal map?
Quote:Original post by Matt Aufderheide
Why would a dudv map be any better? I've never understood the benefits...just means you need to load another texture to me. What wrong with using the normal map?


That's the same question I'm asking to myself... I think the result is already good without using a dudv, so I would understand why it is used by source engine and in other tutorials...
thanks for the tutorial, Deliverance... I'll give it a check!

This topic is closed to new replies.

Advertisement