How can I find (nearly) flat regions in the map?
Posted: Fri Jan 27, 2017 11:37
Really flat regions are rare, but there are areas with really low hills. I need an algorithm to find these areas.
I can parse the heightmap of a chunk and calculate the average height and store the maximum and minimum height. Better would be if I do this for each mapblock. But both methods have advantages and disadvantages
Maybe I can create some kind of slope map. But I'm not sure how I can do this
I can parse the heightmap of a chunk and calculate the average height and store the maximum and minimum height. Better would be if I do this for each mapblock. But both methods have advantages and disadvantages
Maybe I can create some kind of slope map. But I'm not sure how I can do this