PDA

View Full Version : bump, normal, displacement, compare and contrast



xxiii
11-28-2011, 10:21 PM
I'm trying to figure out the difference between these map types.

I think:

bump: a grayscale bitmap that simulates bumps at shader time by using the grayscale value as an altitude.

displacement: like a bump map, but actually deforms the underlying geometry.

normal: like a bump map, but with more direct control of the apparent normal direction (by using multiple color channels?). Basically a superset or more precise version of a bump map?

So I'm wondering, would you ever want to use more than one of these at the same time (and how would they combine and in what order?), and are bump and displacement maps interchangeable? (as in they are really the same map, but whether it controls shading or displacement depends on where I appy it?)

Does displacement actually subdivide and then offset the underlying geometry to whatever level is required?

And have I got one or more of the above wrong?

Also, The bump/normal map versions can look funny from some angles as they only simulate the bumps, but won't actually affect rays passing by (the "bumps" won't cast shadows onto other geometry, or block views, or any other effect that would require real geometry to simulate properly)?

ShadowMystic
11-28-2011, 10:51 PM
http://forums.newtek.com/showthread.php?p=653137#post653137
This is one instance of using a variety of displacement, bump, and normal maps. Normal displace the normal of the polygon and bump adds minor detail. A good combination of all three is makes for really good looking renders.

Sensei
11-28-2011, 10:52 PM
Difference is in render speed and amount of memory needed to store data.

Bump map is converted at render time to normals in fly, but with less precision. 8 bit integer grayscale pixel (and surrounding pixels) is converted to 3 floating point normal vector. Thus it's slower than normal mapping.

To have precision of bump and normal mapping, displacement would have to have polygons with size of 1 pixel. So users are usually using only enough visual precision instead.

Bump mapping can be used together with normal mapping. Because normals from both are joined together, and normalized.

ShadowMystic
11-28-2011, 10:57 PM
displacement maps and normal maps displace actually geometry and require a high render subpatch level that you must set manually.

Sensei
11-28-2011, 11:01 PM
Normal mapping doesn't displace geometry.

xxiii
11-28-2011, 11:38 PM
Where do height maps fit in?

I'm experimenting with allegorithmic's substance player, and it can output
specular, normal, bump, displacement, height, and diffuse.

The height map looks very similar to the bump map to the eye, but the file size says its different somehow.

So, If I use a displacement map, then I would NOT want to use a bump or normal map at the same time?

Sensei
11-28-2011, 11:57 PM
Imagine this- you have flat array of polygons. First you apply normal map to displace geometry to have f.e. bricks, then apply bump mapping to have very little fake bumps (few millimeters) to have rough look.

Already displaced vertex by normal map, has normal vector same as normal map that you used. So, if you will use same normal map for normal mapping, nothing will happen. But normal will be taken from normal map, instead of calculating it from average of polygon's normals vertex belongs to.

ShadowMystic
11-29-2011, 12:06 AM
Normal mapping doesn't displace geometry.


Imagine this- you have flat array of polygons. First you apply normal map to displace geometry to have f.e. bricks, then apply bump mapping to have very little fake bumps (few millimeters) to have rough look.

Already displaced vertex by normal map, has normal vector same as normal map that you used. So, if you will use same normal map for normal mapping, nothing will happen. But normal will be taken from normal map, instead of calculating it from average of polygon's normals vertex belongs to.

You seem to be having a bi-polar moment.
But I did confuse my terms
In a video game a normal map (a multichannel image rather than gray-scale) combined with tessellation creates displaced geometry. In Lightwave, a normal displacement(which is not a true normal map) displaces geometry.

ASCIISkull
11-29-2011, 12:30 AM
Is the heightmap a .raw file?

Sensei
11-29-2011, 12:52 AM
Normal map is image file with RGB values which represents normals. If they're 32 bit RGB then they are converted from 0...255 range to -1.0 ... 1.0 (of course better is to use HDRI formats which have RGB already as floating point numbers, because it will have better quality and precision and not need conversion, but taking more memory)

It can be used either as source for normal mapping (by what I understand plugging image to Normal input in Surface Editor's Node Editor), and for displacing real vertexes (so their position is transformed by equation position = position + normal * scale) in Object Properties's Deform tab.

Normally normal mapping is used to reduce number of polygons, pretending real geometry, by properly directed normals.
Like in this image:
http://www.3dkingdoms.com/nmap.jpg
But if you will use it with heavy sub-divided geometry and offset each vertex by normal, you will get reverse. Going from low polygon to high polygon model.

xxiii
11-29-2011, 01:08 AM
Is the heightmap a .raw file?

They are all jpeg images (or whatever format you choose to export them as) and they are all the same dimensions.

In the case of the wood texture I'm playing with (which is a remarkably fantastic wood texture, unlike nearly every other procedurally generated version of wood that I've seen):

diffuse is the regular texture map (what you would plug into the color channel I presume, as opposed to lightwave's notion of diffuse)

specular, height and bump are all greyscale, specular looks like an inverse of the other two (white and black instead of black and white).

displacement is a flat grey rectangle (which I presume means there is no displacement, but I'm not sure how that relates to bump/height/normal. Shouldn't displacement be an alternative to using those?)

normal is like the greyscale ones, except with blue and purple instead of black and white.

xxiii
11-29-2011, 02:03 AM
In fiddling about (unfortunately the documentation leaves something to be desired) it appears that heightmap and bumpmap are exactly the same, except there is a slider that can be adjusted which will divide up details between the bumpmap and the displacementmap, whereas the heightmap always reflects the result as if this slider was in the all bump no displace position. So that solves that mystery, kind of.

However, now I'm perplexed by why you would want partial displacement and partial bumpmapping. Maybe you can get away with less subdivision that way, so you displace the large bits, but bumpmap the fine details?

dwburman
12-01-2011, 11:08 PM
In LightWave the displacement map does not control the amount of subdivision. You could possibly use the same image with a gradient to set that up in the object's subdivision settings, but I wouldn't think that'd be a helpful thing to do in most situations.

There are plenty times when you might want to use all three kinds of maps.

xxiii
12-02-2011, 12:34 AM
In LightWave the displacement map does not control the amount of subdivision.

But isn't it the opposite? I mean if I have a complex displacement map, I need to make sure the underlying object is divided enough to handle it?

And thats what I meant: If I had a gross displacment map, then perhaps I could get away with mapping it onto a 50x50 grid (or whatever), and use a bumpmap for the finer details? Otherwise maybe I'd need a 250x250 grid?

tudor
12-02-2011, 02:54 AM
As mentioned before.. use both bump and displacement, but for different things.
If I make a character I use displacement for the details that creates a visible profile and/or shadows on the object. Smaller stuff (wrinkles, skin/pores) I do in bump.
This way I dont have to use crazy high displacement to get the detail I need.

I try to stay away from normal maps just because its harder to modify in photoshop (blur, smudge, intensity etc)

Waves of light
12-02-2011, 03:46 AM
When I need to use normal maps, I use 3DCoat, as it allows me to paint detail directly on to the model.