How do I create an Object-Space normal map from a height map?
NickName:NeomerArcana Ask DateTime:2015-06-11T09:18:18

How do I create an Object-Space normal map from a height map?

I'm able to convert my existing height-map into a normal map by sampling the surrounding pixels, like in this question Generating a normal map from a height map? except I'm doing it on CPU.

I have a sphere that I want to normal map in object-space. How to I apply the above normal-map to the normals on my sphere vertices?

Copyright Notice:Content Author:「NeomerArcana」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30769998/how-do-i-create-an-object-space-normal-map-from-a-height-map

Answers
Joonazan 2015-06-11T22:09:52

Normal maps do not modify vertex normals. They are used for details smaller than vertices.\n\nIn your fragment shader, look up the normal at the fragment's texture coordinates and modify the fragment's normal with it.",


More about “How do I create an Object-Space normal map from a height map?” related questions

How do I create an Object-Space normal map from a height map?

I'm able to convert my existing height-map into a normal map by sampling the surrounding pixels, like in this question Generating a normal map from a height map? except I'm doing it on CPU. I have a

Show Detail

Why Tangent-space normal map is suitable for deforming or animating meshes?

As one of the advantages of Tangent-space normal map (besides few other) is that using Tangent-space NM, normals of animated or deforming mesh can be accurately calculated which cannot be done using

Show Detail

Normal map from height map artifact

I'm baking normal map on the fragment shader from a height map. The height map looks great and looks smooth. However, when I generate the normal map I get very weird result. Here are two rendered ...

Show Detail

Normal map from height map

I am trying to create a normal map from a height map in HLSL. I followed this https://stackoverflow.com/a/5284527/451136 which is for GLSL. Here is how I translated GLSL to HLSL: GLSL: uniform

Show Detail

What is the purpose of a height map when you already have a normal map?

In 3D graphics, many textures have normal- and height maps to create an illusion of 3D features on a flat surface. Looking at the implementation of height maps, I see that it basically just affects...

Show Detail

Generating a normal map from a height map in compute shader?

The problem is that when I tried converting height map to normal map. The results are wrong. For some reason there is 3 light sources that is emitting from top (green), right (red), and left (blue)...

Show Detail

OpenGL: Which shaders for normal map (bump map)?

I could not find a way to generate a normal/bump map in PyOpenGL. Specifically I want a map which I can read with glReadPixels(). I do not know how to get a map of the form: (width, height, normal...

Show Detail

convert a normal map to height map with imagemagick: how to recreate/integrate following algorithm

I'm trying to convert a tangent space normal map to a height/displacement map. For sure this will be not 100% accurate speaking in terms of "exact height" for each pixel. But the relative height from

Show Detail

How to switch back from ImageMapType to normal map

I am not sure how to switch back from ImageMapType to normal map. The problem is described in code as followings (pseudo code): var myMap; var curLabLocation = new google.maps.LatLng(36.41...

Show Detail

Generating a normal map from a height map?

I'm working on procedurally generating patches of dirt using randomized fractals for a video game. I've already generated a height map using the midpoint displacement algorithm and saved it to a te...

Show Detail