Advertisement

Graph to terrain conversion

Started by October 14, 2017 07:41 PM
1 comment, last by frob 7 years, 3 months ago

Hey all, this is mostly a thinking problem.

I have terrains, all of which are placed on an N-dimensional graph/system which determines their wetness, temperature etc. The conversion from a biome coordinate/point to a terrain is done by simply  finding the closest terrain point/coordinate in the system. Think voronoi diagram. Given that there are very few terrains (lets say 20), shouldn't I just be iterating over each point and determine which is closest? What would you prefer?

I have implemented uniform voronoi cells myself for creating simple zones, but I feel like using a Voronoi diagram just for this is overcomplicating it.

What do you need in a terrain?  Do you want a regular grid, as those are used in many engines, or do you want an irregular mesh? A TIN may work better for some purposes as they can potentially be smaller and easier to work with than a full grid mesh.

 

If you're looking to merge them into a regular grid, are you able render each area as a polygon on a plane? That kind of rasterization is probably easier than iterating over every point with each point requiring a new search of the graph.  Even if you had to render each of your twenty or so layers individually as polygon meshes and then merge them as a single linear pass, that would still likely be less processing work than searching the graph for every pixel in the image.

This topic is closed to new replies.

Advertisement