Terrains with overhangs?

Started by
19 comments, last by s_p_oneil 18 years, 10 months ago
I've been reading about a bunch of different terrain algorithnms (geomipmapping, roam, etc) but none of them seem to be able to do terrain with overhangs. Are there any algorithms that can handle this?
//------------------------------------------------------------------------------------------------------The great logician Bertrand Russell once claimed that he could prove anything if given that 1+1=1. So one day, some fool asked him, "Ok. Prove that you're the Pope." He thought for a while and proclaimed, "I am one. The Pope is one. Therefore, the Pope and I are one."
Advertisement
I've seen some games use heightfield terrain and then supplement it with 3D models of overhangs on top of the terrain. I suppose if you were careful enough, this wouldn't even be detectable.

- Josh Yelon
-- Distribution Maintainer, Panda3D
- Josh Yelon-- Distribution Maintainer, Panda3D Engine
Voxels, or spline patches. Saga of Ryzom uses the latter, while the older Delta Force games uses the former.

AFAIK spline patches is more suited for today's hardware, but both require translation into tris. But then, so does ROAM and other heightmap based terrain algos (but cheaper I think).
I did this once, using three "layers" of terrain, where the bottom and top layer was facing up, while the middle layer was facing down
most of the terrain only used the first layer, but using the other two layers i could make caves etc.
the terrain still cant be completely vertical ofc, but i could make pretty nice caves and overhangs with it
i had my terrain made up of squares, and each square had like 16x16 vertices iirc
i also made it possible to specify wether a triangle(for every triangle in the mesh) would be rendered
when i then rendered it in its finished state i put everything in vertex arrays so there's no real slowdown to this, as u just remove vertices etc.
can be easily combined with geomipmapping etc, though u might have to edit cave-openings etc. manually for every mipmap level, or disable LOD for those parts of the map, as less and larger triangles wont allow for the same shape of the opening
i did this by putting an option on every square in the mesh of which was the least detailed version allowed of that square
it doesnt really matter if u use the highest detail level for only a small part of the map no matter the distance

it was many years ago and i can't find any screens of a map that actually has a cave in it, but heres a screen of the editor
http://www.rufelt.pp.se/gosu_sc/editor2.jpeg
same image in new window
I use a Catmull-Clark (quad-based) subdivision surface to get arbitrary topology for terrain. It's basically b-splines extended to arbitrary topology.
I then impose a few extra constraints to make it a little easier to generate - basically starts out as a heightfield mesh with a sample spacing of 4 metres - then only allow extrude quads, join quads, etc to get cliffs, overhangs, arches, tunnels, etc but no subdividing of quads into more control points as this can introduce control triangles and also complicates texturing and terrain LOD - however this does limit how fine you can create structures to about 4 metres.

Because it's quad-based you can adapt quad-type terrain LOD algorithms to it. Eg, something like quad-tree chunked LOD need to change quad-tree to something like an ABT tree.
I don't quite understand how you would use spline patches to create overhangs over a heightmapped surface.
//------------------------------------------------------------------------------------------------------The great logician Bertrand Russell once claimed that he could prove anything if given that 1+1=1. So one day, some fool asked him, "Ok. Prove that you're the Pope." He thought for a while and proclaimed, "I am one. The Pope is one. Therefore, the Pope and I are one."
the most simple thing is to not use a heightmapped landscape. just model it as you normally do. and thats exactly where the splines come in:

normally, a landscape is rather smooth, ergo you only need few big spline patches to describe it. and then, you can tesselate them according to distance to screen, and thus have good lod of your landscape. but the landscape can be anything, even a halo :D

the only reason why heightmaps are such muchloved is because of their simplicity: anyone can create one with mspaint.exe to get something up and working.

but if you have real meshes anyways for buildings and such, and use an editor like 3dsmax or maya or something else, that has spline support, bether take them and let the artist model real worlds, not only heightmaps.

it will look more natural anyways in the end.
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Eeek, heightmaps ! I see that the anti-heightmap propaganda I used to cover these forums in is starting to wear off... Time for a reinforcement sometime, I guess [grin]

Seriously though, you should consider replacing the heightmap by a high order surface approach. The results are very pleasing, and you can do whatever you want with the topography.
It is usually best to simply let the artists use polysoups for your levels. They can of course start with a height field to generate the basic geometry and tweak the mesh in maya/max to create overhands, caves etc. You can still optimize the mesh offline and even generate different LODs for use in geomipmapping.
I'm assumming that by high-order you mean Bezier patches?
//------------------------------------------------------------------------------------------------------The great logician Bertrand Russell once claimed that he could prove anything if given that 1+1=1. So one day, some fool asked him, "Ok. Prove that you're the Pope." He thought for a while and proclaimed, "I am one. The Pope is one. Therefore, the Pope and I are one."

This topic is closed to new replies.

Advertisement