Jump to content
  • Advertisement
Sign in to follow this  
Alessandro

Convert normal map to bump map

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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]

Share this post


Link to post
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!