# Parametric/NURBs terrain questions

## Recommended Posts

Apart from Yann's descriptions of his parametric terrain generation, has anyone else experimented with this or know of examples where this has been done? I've done heightmap terrain and am now trying to dive into parametric terrain, for the purpose of modeling a very large outdoor world with irregularities such as overhangs and caves directly from a game terrain editor rather than through the use of models. But I'm having trouble both with the math of NURBs as much as with the concepts of how complex 3d terrain can be controlled by equations and how those equations are stored and used. My biggest question, I guess is, in parametric terrain are you dealing with a single giant equation/mesh/whatever over the entire terrain world, or are you dividing it into a grid and specifying equations for each? I know it could be done in a grid, and I've been reading articles where people have implemented their terrain as a grid of beiser patches, but this doesn't sound like it would have the flexibility to create extreme terrain irregularities like caves (I just can't understand how you'd get a grid of any sort to overlap itself). I have a book and some articles on NURBs and parametric curves and such, but I feel like I'm just glazing over pages of equations without really knowing how it ends up with practical applications. How does a noob like myself get his feet wet in parametric terrain? Any ideas or insight would be welcome.

##### Share on other sites
Quote:
 Original post by NairouBut I'm having trouble both with the math of NURBs as much as with the concepts of how complex 3d terrain can be controlled by equations and how those equations are stored and used.

Yann uses NURBS, but I think if you're going to use parametric terrain start with something simpler like Bezier Patches. SSX uses bezier patches to render its terrain.

Quote:
 Original post by NairouMy biggest question, I guess is, in parametric terrain are you dealing with a single giant equation/mesh/whatever over the entire terrain world, or are you dividing it into a grid and specifying equations for each? I know it could be done in a grid, and I've been reading articles where people have implemented their terrain as a grid of beiser patches, but this doesn't sound like it would have the flexibility to create extreme terrain irregularities like caves (I just can't understand how you'd get a grid of any sort to overlap itself).

Generally you allow some form of localization when you use high order surfaces. In the case of a patch grid, think of a grid in loose terms. Each patch might store adjacency information, but the idea of a strict grid is probably not the best use of patches. Look at how SSX 3's terrain is represented:

##### Share on other sites
Thanks for the screenshot. It certainly makes a lot of sense how they're using a grid of very small, very simple surfaces. But other than that game's need for super-smooth surfaces to simulate snow, it doesn't look like it is worth it. If you're going to use a grid, how much of an advantage are you really getting over a heightmap or some smoothed variant of a heightmap? It still doesn't look like they can create overhangs or caves in that game using grids, which defeats part of the purpose of parametric surfaces in my opinion (the other purpose being scalable detail, not limited to the granularity of a heightmap).

I wish there was some way to find other examples of parametric surfaces being used for terrain, and how they implemented it in regards to grids or world subdivision of some kind. I still don't know enough about parametric surfaces to know whether a single surface can define the entire terrain for a world in every detail, or if that would even be computationally realistic to do.

If not, if the world must be subdivided to limit the scope of each surface, would it perhaps be like texture patching where the terrain consists of overlapping blocks of surfaces that each define a specific characteristic of the terrain? Like one surface for a cave opening, one for the inside of the cave, one for the terrain surrounding the cave, etc. But again this seems very tedious to visualize and create, especially from the perspective of a terrain editor where you're manipulating the terrain as a whole.

Any other ideas? Anyone using surfaces for their terrain and can give me some pointers here?

##### Share on other sites
I worked on a higher order surface terrain editor and renderer a while back. With the right tools, these generally offer a lot more scale and detail than heightmaps, plus they can merge very nicely with other parts of the world.

The tricky bit is to decide how to create the terrain, either letting the artist place surfaces, cut and merge patches, or by filling up a coarse vector representation of a map and then let an artist fine-tune the patches.

Represent the terrain in whatever way fits your uses, the standard types of trees should work well. As long as the patches share exactly the same information along edges, there is no immediate need to store adjacency unless you got something exotic and interesting dynamics going on.

Actually rendering the terrain isn't tricky at all. Generate, cache and keep an eye on subdivision for every patch to be rendered, be sure to match up edges. A decent material system should be able to cope with whatever is in the terrain.

##### Share on other sites
Quote:
 Original post by NairouBut other than that game's need for super-smooth surfaces to simulate snow, it doesn't look like it is worth it.

Yann showed that adding some noise to the terrain eliminates the smoothness problem plagued by such systems, and actually as Yann said this has another benefit: you can separate your low-frequency data from your high-frequency data. In other words, an artist could lay out the general shape of the terrain with bezier patches and then apply different amount of noise to each patch to roughen things out.

Quote:
 Original post by NairouIf you're going to use a grid, how much of an advantage are you really getting over a heightmap or some smoothed variant of a heightmap? It still doesn't look like they can create overhangs or caves in that game using grids, which defeats part of the purpose of parametric surfaces in my opinion (the other purpose being scalable detail, not limited to the granularity of a heightmap).

Grid isn't the correct term at all for the system used in most flexible implementations, including the one in SSX. Basically all you have is a collection of patches probably with some adjacency information (see below). You could organize them spacially using a tree of some sort, but it's not like you're working with a 2d array.

To create terrains (in my editor) you start out with a basic plane of patches and you can move control points and add/extrude/weld selected patches together. With not too much forethought you can create all the overhangs, tunnels and caves you want.

Quote:
 Original post by coelurusAs long as the patches share exactly the same information along edges, there is no immediate need to store adjacency unless you got something exotic and interesting dynamics going on.

I think you'll need some form of adjacency to calculate LOD differences between patches and fix creases if you go that route. It also makes a lot of operations in my editor simpler.

[Edited by - skittleo on March 6, 2007 9:57:36 AM]

##### Share on other sites
Hmm, okay. I'm starting to get the idea. So no matter what, terrain consists of patches of some shape or size. Are there any terrain editors available which do this that I can take a look at? I still don't know how you'd go from starting with a flat surface to ending up with complex terrain details, I'd really like to see an example of it being done. I'm no artist, but moving control points doesn't sound like it would be an ideal way to create realistic terrain features...

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628281
• Total Posts
2981796

• 10
• 11
• 17
• 14
• 9