# Displacement mapping a flat surface?

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

## 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 on other sites
Quote:
 Original post by mltAs 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.

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
15
5. 5
khawk
14

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633737
• Total Posts
3013607
×