on-the-fly procedural terrain

Started by
13 comments, last by marijnh 20 years, 11 months ago
quote:Original post by Anonymous Poster
Unless you''re making some sort of a simulator and use actual DEM data to have your earth resemble the real thing...


Using actual DEM data is as far as it gets from procedural generation.

Advertisement
In my current project, I use Bezier patches to define the general shape of the terrain over a 32m x 32m patch in only 16 floats. To give it a rougher shape I then overlay a few octaves of Perlin noise.

By manipulating bezier patch points you can get almost any shape terrain you want, and you can tessellate it to whatever detail you desire.

Performance wise it''s not too bad: the Bezier patch evaluation can be simplified to 4x4 matrix-vector multiplication with a couple of additional mults. With general shape defined by the bezier, you don''t need that many octaves of noise: I currently use 3 iirc, so thats not much of an issue either.

The problem is, as somebody mentioned, that a fast moving viewpoint causes bucketloads of new verts to be generated. This drives the framerate down, which in turn means the camera moves further between frames, leading to *even more* vert calculations next frame: It''s a horrible negative feedback loop. I''ll have look into the priority idea mentioned above.
quote:
Terrain the size of a country (or planet) with meter-resolution is again within the "nice tech demo" realm, not a game.


It''s not common, but i wouldn''t go as far as saying it''s not possible in a game. Granted, DEM data is not procedural generation, but nothing prevents you from mixing DEM data for high-level data (kilometer data) and procedural data for smaller details.

Elite 2: Frontier and First Encounters had a procedural universe, with complete planets on which you can land, back in 1993. Ten years have elapsed since, why isn''t there more games with such a scale ? Games like Freelancer, or Earth & Beyond, just look so ridiculous with their sphere-like planets !

Y.
assen: Never say never
The adequacy of random terrain varies for different types of game. I admit that at the moment my project is in the ''funny demo'' state, but i have a vague idea of a game in a more or less completely randomized world. I''ll experiment with tweaking the generator, and when i have something i like i''ll place a few settlements and other entities on top of the random world. The hugeness of the world will be an important aspect of the game. There will an area that i have inspected and slightly modified where most of the game takes place, but it will be situated in an effectively infinite world, and this huge ''wilderness'' will be used in the game.
Does anyone have any information on how the terrain for Delta Force I was generated? That was infinite, and i think they used the method i descrbed above (although i plan to make trees part of the randomness, while their trees were all hand-placed).

Marijn
Assen, I think you need to be careful when making such sweeping statements. Obviously, whether an entirely computer generated terrain is useful or not will depend on the type of game you''re making. Even if you didn''t need huge (and by huge I mean virtually infinite) terrains, for example in a standard large-scale online FPS like Battlefield 1942, I''d still consider computer generated maps a valuable feature.

With computer generated terrain, you''ll lose direct control over the details, of course, and time and energy spent on creating and configuring the terrain generator, but you''ll gain so much more, in my opinion, not least of which the *freedom* of *not* having direct control over the details. That *should* appeal to hobbyists. Personally, I''m glad to be rid of another burden that threatens the completion of my game. If I need a "mountain here, and lakes there, and some rollings hills around," I''ll simply go find them. They''re bound to be somewhere this side of infinity.

Personally, I have found my own computer generated terrains perfectly adequate. What I lose in quality in the details I gain in quantity, and quantity can be quality if your game needs it. Besides, real world terrain tends to be quantity rather than quality. Pick a random spot on Earth; it''ll probably be pretty dull.

oo

This topic is closed to new replies.

Advertisement