Normal map, height map, bump map... are all the same thing?

Started by
6 comments, last by JohnnyCode 8 years, 8 months ago

Hello!

Speaking of 3D and lighting, is it true that 'normal map' is the same as 'height map' or 'bump map'? Why is this map called differently? Is it just because this map does not have a conventional name, or do these things really differ in some specific way? As far as I understand, raising or lowering a point on a lit surface is visually the same as displacing the normal to the surface at that point. Is that correct?

Advertisement
Normal maps and height maps are not the same thing. (Though it could be argued that bump map and height map are the same thing.) You could consider a normal map to instead be the derivative with respect to x (stored in red channel) and y (stored in green channel) of the bump map. Hence the reason that a bump map appears as a greyscale image and a normal map appears as the distinctive bluish-image (due to the blue component always being 1.

nn4w3CK.png
EsrR2il.png

A height map is used to generate terrain. Each pixel of the height map is the elevation of the geometry (multiplied by some game-specific measurement).

It's usually a birds-eye view, with black pixels being the lowest parts of the terrain, and white pixels being the highest parts of the terrain.

Note: height maps don't always have to be birds-eye, or mountain-scale. You can use heightmaps rotated at angles for things like cliff walls or whatever else you want.

I guess the biggest difference between a height map and a normal map is that the normal map can be used to give the illusion of depth through lighting and shadows - but leaving it a 2D polygon, whereas a heightmap actually generates polygons based on the pixels, creating actual depth.

Normal maps are encoding the angle each pixel is facing at, whereas height maps are encoding heights. In that sense, a height map is actually closer to a depth map, IMO.

But the real point is, these textures are just storing data in pixel format. How that data is used, is up to your code. The terms applied just come out of the way some textures are commonly used. People do all kinds of things with pixel data.

There are other ways of manipulating 2D surfaces to either actually make them have depth, or to give the illusion of depth. Parallax mapping is similar to bump mapping, but expands on it by 'stretching' some of the pixels selectively to give an even greater illusion of depth when changing what angle you are viewing the texture from.

Thank you all for clarifications... the difference is much more clear when illustrated )

Most things are already mentioned in the posts above. Well, I think there need perhaps to be a little more accentuation on the difference of a map as a parametrization and the mapping as the applied technique.

A height map is an array of pixels with a single channel (hence it appears as grayscale image), where each of the pixels denote an elevation height w.r.t. a reference surface. It can be used with the bump mapping technique (and hence the map itself is also called a bump map) to simulate bumps and wrinkles on a surface without changing the geometry of the surface, not even temporarily. It can also be used for the displacement mapping technique where geometry is actually changed. Because a height map has only one channel, the displacement is restricted (usually along the normal of the surface onto which the mapping is applied). When applied to terrain (originally a flat horizontal surface), the bump map is sometimes also called an elevation map.

A full displacement map can be used, too, so that 3 channels are available, e.g. one for each of the directions normal, tangent, and bi-tangent to the surface.

A normal map is a map similar to a full displacement map, but instead of an displacement offset there is just a direction stored in the 3 channels. It cannot be used for displacement, because it lacks a distance. It can. however, be used to simulate surface bumps and wrinkles with the normal mapping technique. In fact, when doing bump mapping you need to compute the normal distortion from the gradient of the bump map pixels, and hence more or less convert the bump map into a normal map on the fly.

It is also possible to combine a normal and a displacement map, by using the RGB channels of a texture for the normal vector components, and using the alpha channel for the displacement offset data.

This site has a pretty good overview of the differences between bump, normal and displacement maps http://blog.digitaltutors.com/bump-normal-and-displacement-maps/

Eric Richards

SlimDX tutorials - http://www.richardssoftware.net/

Twitter - @EricRichards22

due to the blue component always being 1.

The blue component is always positive (thought this is not strictly enforced), not necessarily 1 (but usually quite close to 1).

L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid


The blue component is always positive (thought this is not strictly enforced), not necessarily 1 (but usually quite close to 1).

Yet this is true only for tangent normal maps. Object space normal maps are the total RGB shiny mess hall.

My 2 cents:

-Normal maps encode 3d direcitonal unit vectors in RGB three channels, interpreted as direction of the surface normal on the texel

-Height maps encode a single value, usualy in one of the channels ( so are often combined into fourth channel of the normal map). Usualy interpreted as height of the texel

-Bump maps are too usualy grayscale images , since they encode a single value as well, used as a straight factor for light. This is old technique, and today those maps are more interpreted for specularity, to explain parts that are shiny/reflective from less shiny parts (it provides a rather cool effect, without it the specular shader will make entire model look like "laminated").

This topic is closed to new replies.

Advertisement