# 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.

## 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!

1. 1
2. 2
3. 3
Rutin
22
4. 4
JoeJ
16
5. 5

• 14
• 29
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631774
• Total Posts
3002292
×