Jump to content
  • Advertisement
Sign in to follow this  
Sfpiano

Terrains with overhangs?

This topic is 4831 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

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
I don't quite understand how you would use spline patches to create overhangs over a heightmapped surface.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!