Home ShaderMap Legacy

Bump Maps and Displacement Maps

I have a couple of questions about the maps generated in Shadermap. Sorry if they are obvious to most of you, but I'm new to this area.

First of all I'm confused by the use of the term displacement map in Shadermap. From what I know there is a difference between bump maps and displacement maps (simulated vs physical).

But when I choose a sourcemap the options are Color texture, Normal map and Displacement map. So if I want to convert a bump map to a normal map I should choose Displacement map as source?

Regarding displacement maps I believe that some applications stores maps where mid-grey values (127,127,127) are considered no displacement while other programs assume black is no displacement.
How do I factor this in, when creating a normal map from a displacement map in ShaderMap?

Comments

  • sigstan wrote:
    First of all I'm confused by the use of the term displacement map in Shadermap. From what I know there is a difference between bump maps and displacement maps (simulated vs physical).

    But when I choose a sourcemap the options are Color texture, Normal map and Displacement map. So if I want to convert a bump map to a normal map I should choose Displacement map as source?

    If you want to convert a grayscale image to a normal map then yes you should bring the source image in as displacement.

    A bump map is a general term used to describe any texture which provides additional detail (usually the simulation of detail) to a polygonal surface. I have heard both height / displacement maps and normal maps referred to as bump maps.

    Most of the time height / displacement maps describe the surface of the polygon with modifications to the surface occurring up and down along the normal vector of the surface.

    Normal maps contain, for every pixel, a 3d vector encoded as a color which is used to replace the surface normal of the polygon it is applied to. The end result is that the surface has the appearance of complexity where there is none.
    sigstan wrote:
    Regarding displacement maps I believe that some applications stores maps where mid-grey values (127,127,127) are considered no displacement while other programs assume black is no displacement.
    How do I factor this in, when creating a normal map from a displacement map in ShaderMap?

    As a thought experiment, imagine a displacement map that has all values in the range (0-127). Generate a normal map from this map. Now add the integer 128 to each pixel of the displacement map. The normal map generated from this displacement should be identical to the first one.

    A normal map is created from a displacement map by sampling each displacement pixel then looking at its surrounding pixels. A 3d plane is created from these height values. The direction the plane is pointing becomes the surface normal for that pixel.

    When converting displacement to normals all height is removed. Normal vectors don't care about height they simply point in a direction and describe the way light will bounce off of a surface.

    The important thing to consider when generating normal maps from displacement maps is the intensity of the difference in adjacent grayscale pixels rather than thinking about a mid point.
  • Good explanation, Thank you!
Sign In or Register to comment.