Jump to content
  • Advertisement
Sign in to follow this  

Heightmap creation

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

Hello! I want to write a system to create a terrain heightmap by combining several heightmaps. For example: The user specifies 2 heightmaps (one created from Noise, the other created with a fault algorithm) and then the user should be able to combine both heightmaps with a mathemtical operation like Add or Multiply. Add is no problem, I just iterate over both heightmaps (h1 and h2) points and add them (for all (x,y): (x,y)_h3 = (x,y)_h2 + (x,y)_h1). But I have some problems implementing the operation Multiply. My multipliy operator should basically do this: The first input is a heightmap h1 and the second input should be a weighting heightmap h2, whose height values are in the range [0,1]. If I want to compute a height value of the resulting heightmap h3: (x,y)_h3 = (x,y)_h2 * (x,y)_h3). For example if vertex (x,y) of heightmap h3 is 1, then the full height of h1 at this point should be in the resulting heightmap. If the height at (x,y) in heightmap h3 is 0.3f, then the resulting height value should be 0.3 * (height at heightmap h2 at (x,y)). I think you know what I mean. But my problem: When I create the input heightmaps the values can be in any range. I could create them in the height range [0,200] or [0,1000] or whatever. Should I create every heightmap with a specified height range and a "weighting heightmap" only in range [0,1]? Or should I create all heightmaps in range [0,N] and just devide a weightening heightmap by N? Thanks for any ideas!

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!