Jump to content
  • Advertisement
Sign in to follow this  
Zwigby

Displacement Map from Normal Map

This topic is 4460 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

I was wondering if anyone knew how to create a displacement map from a normal map? Any and all help is appreciated. Thanks, Chuck

Share this post


Link to post
Share on other sites
Advertisement
well I really just looking for the theory behind it then I can take it use it where I need it. but I can use HLSL easily in the context of the program.

Share this post


Link to post
Share on other sites
Please don't assume my post to be correct - what I'm about to say is based on my limited knowledge of what displacement and normal maps are, and as such isn't necassarily correct.

Anyway...
A normal map can be used to determine the slope of the 'surface' compared to a flat surace (normals are perpendicular to the surface they represent). A displacement map is simply a measure of the distance from the surface (a map of 'heights').

By picking a displacement to start at, you could calculate and use the slope at between points to get the displacement of each point (point 1 is at height 4, the slope between 1 and 2 is -2, so point to is at height 2 - just do the same basic idea on a 2D plane...).

A normal map wouldn't be able to give the actual height of each point though - just their height relative to each other.

Share this post


Link to post
Share on other sites
Correct, you could only do this in a relative since, so it would not be an absolute displacement. But I think that this is really all that you need. I have a few ideas on how to do this from other sources but wanted to see what other people could come up with.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!