Sign in to follow this  
Kaptein

Graph to terrain conversion

Recommended Posts

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.

Edited by Kaptein

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this