seamless planetary descent with automaic mesh generation

For collaboration on developing the mod capabilities of VS; request new features, report bugs, or suggest improvements

Moderator: Mod Contributor

chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Actually, the parameters you describe would be the interface of the VS socket where the planetgen package plugs into. The package itself should not know a pebble from a gas giant; it should receive raw data as input, such as a mesh and a height map, and/or a materials map, and/or "roughness map", or whatever other means of conveying planetary specifications we deem necessary. Translating from general type to input files (from image files or generated) would be part of the host's socket layer.
What inputs ARE wanted and/or necessary is a delicate matter, and we'd need to do a lot of research on generative algorithms, such as libnoise; but that is precisely what we don't need to specify, because each type of terrain generation algorithm will need different types of inputs, and the important thing to keep in mind is that there can be many algorithms, so the package should be algorithmically agnostic. So we can throw all such concerns aside, as well.

The package (we need a name for it) only needs to do one thing, and do it well: It needs to figure out what parts of the terrain need to be shown at what level of detail. That is, at a far distance it would show the planet as made up of 6 puffy quads (like an inflated cube), and as you approach, it begins to subdivide quads as necessary.
What the package should NOT do is actually generate terrain. It would instead send terrain generation requests to the generator plug-in. That is, the package shouldn't impose any particular input or algorithm. Input should be an abstract class with a minimum of handles that the package takes blindly and passes it to the algorithm plug-in. The algorithm plugin would also be represented by an abstract class with minimum handles that any plugin must inherit to be compatible. All the package we are trying to specify should do is manage tiling and LOD's and send generation requests, wait for generated meshes and/or textures to come back, and throw them to the videocard.
However, the generator plug-in would have a latency in coming up with terrains, so the package must also be able to predict near-future need and send advanced requests.
Another complication for the package is that it needs to fix up the edges between neighboring tiles of different LOD levels.
Another complication for the package is that the algorithmic plug-in could be CPU-only or CPU/GPU, so the package cannot assume that it will be dealing with just meshes and textures, and a fixed shader. It must allow the plug-in generator to specify its own vertex and fragment programs. And this, in turn, complicates the edge fix up part. Perhaps edge fix-up needs to be a plug-in as well.

The mistake everybody makes, in this business, and which we should avoid, is mixing tile management with terrain generation together. The package we need to specify is JUST the tile manager.

Terrain generation is the fun part. Once we have a tile manager working, in-game, terrain generation hackers will start landing on it like flies.
-REBEL3-
Bounty Hunter
Bounty Hunter
Posts: 132
Joined: Sun Nov 01, 2009 2:43 am
Location: Alaska

Re: seamless planetary descent with automaic mesh generation

Post by -REBEL3- »

What ever happened to this? It just died, I presume? :cry:
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: seamless planetary descent with automaic mesh generation

Post by chuck_starchaser »

-REBEL3- wrote:What ever happened to this? It just died, I presume? :cry:
Isn't it obvious?
Now, unless you are taking up this project yourself, or have some valuable new info, it's not usually good forum etiquette to revive old threads. Look at the date on the last post, and if it's more than a few months old, you should have a very good reason to post a reply.
Red River
Insys Pilot
Insys Pilot
Posts: 2
Joined: Sun Jun 13, 2010 4:04 pm

Re: seamless planetary descent with automaic mesh generation

Post by Red River »

please take note of this open source code over at this page: http://sponeil.net/downloads.htm
Post Reply