Understanding 3D height maps.
Height maps (which are similar to normal maps) are an image that stores the height data of a surface, which affects how a model’s surface looks when it’s rendered. That said, how a height map functions “under the hood” is quite different from normal maps.
How does height mapping work?
A proper height map is a grayscale image. The whiter an area is, the higher that part of the surface is. Darker areas represent lower areas of the surface. When you properly apply height mapping to an object, each pixel in the map corresponds to a point on the 3D surface. During the rendering process, the graphics engine reads the grayscale values from the texture and interprets them as height information. The engine uses this data to adjust the visual appearance of the surface accordingly.
It’s useful to note that most graphics engines aren’t going to modify the actual geometry of the 3D object. Instead, the renderer is simply going to draw this information on top of the surface.
Height maps are not only used for terrains. They can be used in numerous applications. For instance, in 3D modeling, you can use height maps as a brush and paint the map onto the surface of a model. If you are a woodworker and use CNC, you can incorporate the height map into software programs to get the height values for creating your cutting passes. (See the examples below)
In this first example, you can see that by adding the brick height map into cnc software, you can then create tool paths to cut the height map according to the dimensions set.
This second example shows that you can add your height map into the texture field on the right and use it as a brush while in sculpt mode.
Height maps are not normal maps.
Height mapping as a technique is more complex than normal mapping, which means it can be more computationally expensive in real-time rendering situations. Normal maps modify the lighting across the surface of a model, whereas height maps alter the visible surfaces of a texture. For example, if a surface has pronounced bumps, the parts of the surface visible by the camera get exaggerated while the other sides are occluded or reduced.
Because these two maps function differently, artists often use them in conjunction with each other to achieve the highest results.
Height maps or displacement maps.
Height maps and displacement maps are essentially the same thing just a different name. Some people will call them height maps while others will call them displacement maps but they both mean the same thing.