Sign in to follow this  

Displacement mapping a flat surface?

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

Assume that we have: 1) a flat 2D surface. 2) A height map (generated with e.g Perlin noise). 3) A normal map made from 2). I now use a lookup in the height map to displace the vertices along the normal on the surface (they all point in the same direction). Now I want to shade the new displaced surface. For each looked up height in the height map I find the corresponding normal vector in the normal map and use that as the new normal for the displaced point on the new surface. But will this be the correct normal? As long as the orginal surface is flat I assume this would work, but why?

Share this post


Link to post
Share on other sites
Quote:
Original post by mlt
As long as the orginal surface is flat I assume this would work, but why?

Because the tangent space coordinate frame is the same. This has nothing to do with being flat or not, it's about orientation. When you generated the normal map, you were implicitly using a tangent frame that was parallel to the XY plane. As long as you render your surface the exact same way, without changing its orientation, the tangent frame will stay the same and the normals will remain valid. Basically, you'll have what is called an object space normal map.

As soon as you change orientation, you need to adjust for the modified tangent coordinate frame. That would then be a tangent space normal map.

Share this post


Link to post
Share on other sites

This topic is 3295 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this