# Convert normal map to bump map

This topic is 2847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Posted this also in the openGL forum without much luck.

Does anybody know an algorithm that would allow me to convert a normal map into a bump map?

Thanks

##### Share on other sites
It depends on how exactly the normal is to be reconstructed from the normal map.

But given how it is constructed, extracting a bumpmap from the normalmap would consist of some numerical integration over the normals (being the gradient of the function f(x,y,z) = y - bumpmap(x,z))

[similarly, given a height-map derived from a bump-map you do a numerical differentiation to get the normals of the terrain whicih you compress into the normal map]

##### Share on other sites
Hidden
So say you have a coordinate system with z pointing up out of the surface and a bump and normal map

bump(x,y) in [0,1]
normal(x,y) in [-1,1]x[-1,1]

so that you construct the height of the 'terrain' by H(x,y) = bump(x,y)*h + y0.
and you construct the normal of the 'terrain' by N(x,y) = unit(normal(x,y) + k)

then N and H are related by [equation] H = \int_A N(x,y)\ dx\ dy[/equation] and [equation]N=unit\left(\Delta H\right)[\equation]

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 16
• 11
• 23
• 42
• 75