Sign in to follow this  

Psuedo-Random Landscapes

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

For those of you unfamiliar with the concept, Psuedo-Randomness can be used in games to create just about anything, so long as a specific game element can be described with a unique serial number. Basically, if you can define some area in your game uniquely, based on longitude, latitude, whatever, you can use psuedo-random generation techniques to create anything from plains to rivers to even cities. I'm wondering on how difficult it would be to use pseudo-random techniques to create different kinds of flora and fauna in an area on the fly. Plants have a certain kind of symmetry to them, especially older forms, such as ferns or coniferns. How difficult would it be to produce different random plants in an area based on an indealized model. How far can you deviate from that model before it begins breaking down? Animals I imagine would be harder. For my game, I was thinking of defining animals perhaps in the same way that Sim Life did, that is piecemeal. How difficult would it be to create an idealized form of some animal, and how extreme could variations on that model be made before it begins to breakdown? For animals, this would apply to their behavior as well. I'm sure it's possible to do just about anything using models and mutating them for different individuals or new species, etc. but how difficult is it to do? The book I have on it uses things like fractals for landforms and iterative methods for simple plants. What kind of technique would you need for something like this? And in the end, will the player even care? I was planning on having the character be able to explore various worlds in a generated galaxy, similar to the game Noctis. That Noctis is using the same models over and over with very little deviation becomes apparent before too long, but even then it's still playable to a point. At what level of detail do you need to reach before the player can suspend disbelief? How many different kinds of animals do you need before you get the sense of a complex ecosystem?

Share this post


Link to post
Share on other sites
Generally this sort of thing is called procedural content as the content comes from a fixed procedure rather than being hand-made. Using a pseudo-random number generator is just one way of doing it, as technically all you're doing is hashing an input value to several output values. In practice though, a random number generator is probably the easiest way of doing this.

Regarding flora... Bionatics already have a commercial library for this. So it's obviously possible given the right knowledge. To be honest though you'll probably run into problems with rendering that degree of detail long before players start noticing any problem with diversity or whatever.

As for animals, well I'd say it depends on what you mean by 'breakdown', because you don't specify what the problem is. The hardest part in my mind would be the graphical representation. After all, there's only so far you can stretch the vertices of a mesh before it looks ridiculous, and changing the texturing might be non trivial, especially when the underlying mesh is not constant.

Share this post


Link to post
Share on other sites
Quote:
How difficult would it be to produce different random plants


do you mean fractal plants, or randomly placed plants?

something nice you can do to have a realistic environment is to only generate the terrain randomly, then compute erosion (includes rivers/lakes), flora population, and fauna too perhaps, by simulation, not randomness.
it would have to be precomputed of course, as the simulation steps would take too much time to be done on the fly, but the storage can be quite low.
for flora, you can cut the world into cells (or reuse terrain patches), have vegetation cover maps that indicate in each cell the density of each possible plant in the area, and then randomly place each plant on the fly inside each cell according to the plant density in that cell.
this method can produce highly realistic large scale vegetation population, and you leave procedurality for low scale. (and keep the ability to have manually placed plants if it's needed).

Share this post


Link to post
Share on other sites
Quote:
Original post by sBibi
Quote:
How difficult would it be to produce different random plants


do you mean fractal plants, or randomly placed plants?



Both, I think. I haven't decided the level of detail I want to achieve visually, but the more complex I go, the more the overhead seems to increase much faster.

The placement of terrain in random but sensible arrangements is mildly difficult at best. Games have been doing it for quite some time. It's the make up and view of different constituent elements which become more daunting.

Kylotan, thanks for the link, it's very interesting. I don't imagine my game would be that advanced, but it's nice to know what's possible.

As far as the degree of randomness I want, I was hoping to make it all random. What it is, where it is, the whole nine yards. I was thinking that changing the texture would probably be the easiest to accomplish. And I agree that trying to warp the base models would become silly rather fast. Scaling would be trivial...

How practical would something like this be: (I don't have much experience with this sort of thing.)

Animals: Have several models for torsos, legs, heads, upper-bodies, etc. Define the animal as being quadrepedal, herbivore, etc. and match up these traits to a specific model piece. You'd have a collection of parts. Meld these parts together into a finished model, which can then be used for this species of animal. How processor-intensive would something like this be? Would it look like a whole animal or some odd colony of moving parts?

Plants: Define a kind of iterative growth method for the plants, resulting in plants which look mildly like ferns or pine trees. More complex structures, like decidous trees, would require more complex functions, but probably (?) can be handled the same way. Different plant species are represented by small mutations in their iterative growth pattern. I haven't even experimented with this yet for effects, but I imagine it wouldn't be too difficult to stretch and shrink plant forms in odd ways for interesting results.

I imagine maybe a dozen plants and three or four animals per area (rough idea), where each area's constituent parts are generated on entry with a 'loading...' screen. This isn't hard to do, since the only way to reach an area which you can free explore is through some kind of ground to orbit shuttle. Once the base models are created, they can be subtly manipulated to create different 'sub-species'.

I think something like this could work, but like I said, I don't have much experience in this kind of area.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
If you're looking for randomly generated plants then doing a little research into L-Systems would probably be a good place to start.

We use SpeedTree at work but it requires art asset generation and isn't totally random, i.e. you can't just feed it parameters and get something completely random/procedural.
However it is quite flexible (it's expensive though).

For animals... what you're talking about is probably possible, but erm, i think you're talking about quite a hefty (large) research project... maybe a year or so(?). Not trivial at all.

..um, no i've been thinking about it whilst typing and i've deleted 5 or 6 versions of this post, im sure it's possible but it having done some procedural content generation at Uni i can't see it being a simple task.

Go for it by all means, i just can't personally seeing it being easy (but hey i'm thick!).

Andy

PS: to Kylotan:: good to see you back online dude (Andy@Climax)

Share this post


Link to post
Share on other sites
I made a little system that created random plants and trees a while back. You basically fed it a bunch of parameters and a hand-drawn leaf texture to make a plant 'species', and then you could generate different random plant models of that species. It was not perfect though, many parameter combinations looked awful, and the models were very very inefficient (polygon-wise), my usually-quite-efficient engine slowed down to a crawl when more than 5 randomly generated trees were in view.

The basic idea was that it would create a branching model, with the branches growing shorter and thinner as it went up. You could set the amount of branches, the rate at which they became thinner, whether they kept pointing up or became horizontal, the average thickness of the base branch (trunk), the amount of leaves etc with parameters. A proportion of the final branches (the ones with no child branches) got assigned a bunch of leaves (3 or 4 transparent textured quads generating the illusion of a mess of leaves).

Share this post


Link to post
Share on other sites
Quote:
Original post by marijnh
I made a little system that created random plants and trees a while back. You basically fed it a bunch of parameters and a hand-drawn leaf texture to make a plant 'species', and then you could generate different random plant models of that species. It was not perfect though, many parameter combinations looked awful, and the models were very very inefficient (polygon-wise), my usually-quite-efficient engine slowed down to a crawl when more than 5 randomly generated trees were in view.


Do you think it would be possible to take the randomly created plants you made and 'polygonize' them? By that I mean: It's possible to represent a 2D picture as pixels, with decreasing resolution to improve rendering at the cost of resolution and clarity. Could you create a complex polygon from a set of random values, and then simplify it using some 'polygonilization' technique? Would you lose too much of the detail you're trying to make?

The way you said you did it is very similar to the examples I was going to follow to do it myself. How difficult was it to implement in your experience?

Andy:
Assuming that I pre-created all the subsections of torsos, heads, etc. and stored them as models somewhere, would that decrease it's difficulty enough to make it more feasible?

I'm willing to accept a certain degree of clunkiness to improve speed and performance, so long as the player can tell a difference between regions on a planet and different planets.

Share this post


Link to post
Share on other sites
Quote:
Original post by Numsgil
Do you think it would be possible to take the randomly created plants you made and 'polygonize' them? By that I mean: It's possible to represent a 2D picture as pixels, with decreasing resolution to improve rendering at the cost of resolution and clarity. Could you create a complex polygon from a set of random values, and then simplify it using some 'polygonilization' technique? Would you lose too much of the detail you're trying to make?

This is usually called using different levels of detail (lod). You can get away with quite oversimplified models when rendering things at a distance. I suppose it is possible to create simpler models from existing models automatically, but I have never tangled with that stuff.

Share this post


Link to post
Share on other sites

This topic is 4858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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