Generating 3D models using a seed

I have wondered for a long time if it was possible to generate 3D models using a seed and if so is it practical. I’m wanting to make a randomly generated 3D world (Please hold your criticism) and i understand this would be quite difficult (I’m talking about complex models not like voxel games) but my idea was…

For example: A tree model
I would need something to define the trunk height and width, its color, amount of primary branches, amount of secondary branches, leaves per sq foot, branch positions etc, but compress all this data into a relatively small data size to then be converted back on the client side.

Would this be practical in the sense of a large MMORPG or am I trying to make this game i’m working on too unique?

Do you know what a “seed” is, or seeding a random number generator?

Create a seed for each object you want to create, generate whatever you need based on that seed, and then store the seed. Of course the hard part is actually generating the object, but that’s an entirely different topic. When you get to thinking about it, it’s not that hard. Have some pre-defined meshes/attributes that fit together, and then piece the meshes/attributes together based on the number you get from your seed number generator.

Well that’s answered if it’s possible, but on a large scale is it practical? I’m talking about almost all objects being generated based on a seed number and non of the map saved on the clients computer

Of course it’s possible if you really want to make it work. This isn’t something you can gauge the practicality of because it depends on your implementation. I encourage you to take a look at that link again, seeding a random number generator with the same seed will always produce the same “random” numbers. So theoretically, no, you do not need to store a significant amount of data on a client’s computer. You just store the seeds for each generated object.

I’d gander that the fewer seeds or coefficient values you start with will result in a more geometrically constrained scene. Involving non-random sequences from a single seed value is possible. Take for instance the Hailstone sequence. Eventually it repeats & effectively ends. If you can store several seeds which feed generating functions / sequences that fit what is being modeled (the hard part) or variations of coefficients with constraints that feed into various more specific mathematical models certainly it’s possible; the key being constraints.

One would want to stop at a certain point as speed still trumps uniqueness for real time rendering. IE generate X amount of models for a particular type of object then as things go reuse those models with variation (rotation, scale, texture, etc.) or combine / subdivide multiple models where applicable (easier with geometry shapes of course). For the latter here is a fun video for inspiration: https://vimeo.com/77829968

For natural objects a little digging came up with these resources:


http://mcfns.com/index.php/Journal/article/view/MCFNS.4%3A2
http://www.amazon.com/Branches-Natures-Patterns-Tapestry-Three/dp/0199604886
http://www.amazon.com/Shapes-Natures-Patterns-Tapestry-Three/dp/019960486X
http://www.amazon.com/Flow-Natures-Patterns-Tapestry-Three/dp/0199604878

Good luck… :stuck_out_tongue_winking_eye:

Creating arbitrary long sequences is quite easy. In math-speak the function must be a one-to-one mapping, which is a permutation and the function is invertible. (Not strictly required, but it’s sufficient and easiest). The only question becomes what properties you want: statistically random or low-discrepancy are the most common ones.

Except in cases where the seed comes from a spatial hashing of a fixed objects location or from some simple deterministic unique ID.

Don’t have the time ATM to post a bunch of links, but they’re easy to find. There are techniques for all kinds of generation: Plants, animals, humans, citys, textures of all kinds…pretty much everything. The specific example of “tree” (and plants) is well researched.

The voxel farm creator mentions a fair number of techniques: http://procworld.blogspot.fr/

And to choose a random thing that comes to mind: http://github.prideout.net/coordinate-fields/