Jump to content

Displacing an object without stretching Texture Map?


Recommended Posts

Hey guys! Long time :)

I have been racking my brain trying to figure this out. I saw the technique a couple weeks ago here:

I am doing a displacement in object space and then transforming it back to camera space.

The key idea is to find a way to use the displacement delta (DisplacedP - P) to displace the uv coordinate so that when the shader looks up a texture, the texture appears to have no warping at all (my texture wraps so it doesn't matter the lookup is outside [0,1])

I've been asking around and many people have pointed me in the direction of finding the tangents dPdu and dPdv and calculating the dot of those with the displacement vector, then using that to add to my UV coordinates. Long story short, that didn't work out for me quite so well...

If someone could point me in the right direction, I will be eternally grateful!

Cheers,

Jason

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...