Jump to content
  • Advertisement
Sign in to follow this  
Woodchuck

Parallax mapping and tangent space vector

This topic is 4273 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

Hello, I'm confused. I do a lots of research (of code mainly) but I really don't find what I need. My problem is : to calculate the new texture coordinates in the parallax mapping, I need the "tangent space view vector". But not any tangent space, the tangent space of the texture mapping precisely affected. I'm maybe wrong somewhere, but for me, for one vertex and for example, one bunch of texture coordinates, there is a lots of tangent space due to the number of face that use this vertex. Then, for me, there is one tangent space for one face. I think the texture coordinates derivatives instructions may help (ddx, ddy) for this problem, but these are available only on ps_2_a and greater... So, what to do ? EDIT: note that i'm using indexed primitive. Is this possible to think about not using it just for the needs of the parallax mapping ? [Edited by - Woodchuck on October 7, 2006 9:02:29 AM]

Share this post


Link to post
Share on other sites
Advertisement
Am I clear or not ? :p I know my english is very bad...
Or is this just obvious (parallax need unindexed primitive) ?

Thanks.

Share this post


Link to post
Share on other sites
You're correct in assuming that you calculate the tangent space basis vectors per face, and not per vertex, but what you have to do is simply add up the vectors from each face that uses any given vertex, and then normalize them, giving you set of basis vectors per vertex!

Hope that helps!

Share this post


Link to post
Share on other sites
Mmmh interresting...

Correct me if i'm wrong, but this is like approximate a continuous basis thanx to the rasterizer interpolation.
In other word, near a given vertex, the parallax will be strange if the continuity is bad, but in the middle of the faces it will be perfect.

Assuming parallax mapping is usefull generally in large plate face(like cube's one), it might work, I will test it.

( In fact, I didn't see that basis discontinuities are generaly rare, and that parallax are not used in very curved and strange surfaces. )

Thank you a lot !

Share this post


Link to post
Share on other sites
Ok, I worked on the problem. You put your finger exactly where it must. I just realize that the texture coordinate surfaces must be C1 (first degree derivatives exist )for the needs of normal mapping.
That's generally not the case, but with the tricks you explain, it tend to.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!