Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Jun 2013
Offline Last Active Aug 12 2015 12:23 PM

Topics I've Started

Land/Sea ratio from a Heightmap

01 August 2015 - 03:28 AM

I have implemented in the Perlin's Simplex Noise which generates a Heightmap. This part is no problem.

It provides me a 2D array of numbers between 0 and 255 (values barely go over 100 in fact, but it's not a big issue).


From this Heightmap, I've predefined four constant ranges of altitude telling me if a point is a tile of:

  • Deep Water (dark blue)
  • Coastal Water (light blue)
  • Flat terrain (green)
  • Mountain (gray)


The problem with this method is it gives me some maps with water or land only.





So, I would like to be able to define a land/sea ratio from which I can deduce which range belongs to land tiles, and which range belong to water tiles.

I was thinking of using the heightmap's histogram without being really sure how I could use it (in the case this could work).


Thank you for your advice if any ;)