Flokey82 / genworldvoronoi

Generates a planet with basic climate simulation, city placement, Wavefront OBJ/SVG/PNG export, leaflet server, etc. WIP!
Apache License 2.0
4 stars 1 forks source link

Engine: Heightmap - Distance field vs Quad tree #14

Closed Flokey82 closed 1 year ago

Flokey82 commented 1 year ago

In order to calculate elevation we use a combination of noise and distance fields (graph distance from mountain, ocean, and coastline seed points). https://www.redblobgames.com/x/1728-elevation-control/

It might make sense to look into using a quadtree for these seed points to find the closest seed to an arbitrary lat/lon and use the great arc distance to each closest seed point for calculating elevation. Of course this will not include any filling of sinks though. Not sure how useful this idea will be in the long run.

Flokey82 commented 1 year ago

Well, I tried it, and bfs is just way faster than using the octree, so let's close this for now.