• Advertisement
Sign in to follow this  

UV distortion using normal and/or dUdV

This topic is 3292 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement