The last time I checked in on terrain rendering, ROAM was the new hotness. Yes, that was a long time ago. I liked ROAM a lot, though, because it was extremely simple to program, and gave pretty decent results. I imagine that the technology has improved quite a bit now. What are the most popular methods for terrain rendering these days?
-
\$\begingroup\$ Good question! I was pondering this myself recently and figured that a modern terrain renderer would focus more on getting the GPU to do as much of the work as possible rather than on minimizing poly count like ROAM did. The answer would depend on the capabilities of the hardware as well. For example, on DirectX11/OpenGL4 you could generate the geometry on the GPU, but on older GPUs you'd have to provide vertex buffers to draw, but these could be re-used as height displacement could be done in a vertex shader. \$\endgroup\$– U62Jul 14, 2010 at 20:00
5 Answers
You should definitely check out the Halo Wars GDC presentation, "The Terrain of Next-Gen." It discusses using full vector field displacement instead of simple height field displacement.
For something a little less revolutionary, maybe check into geometry clipmaps. There's a good article in GPU Gems 2 here.
-
1
-
\$\begingroup\$ That GDC presentation was very informative on the topic, thanks! \$\endgroup\$ Jan 19, 2011 at 19:30
-
\$\begingroup\$ vector field displacement looks amazing \$\endgroup\$ Jul 25, 2011 at 4:54
-
2\$\begingroup\$ Be warned, geometry clipmapping is patented. This may or may not matter, depending on what you're planning to do with your code. gamedev.net/topic/… \$\endgroup\$ Aug 1, 2012 at 0:15
For one, the geometry pipeline needs to be as simple as possible and just push geometry to the GPU with quite basic LOD management on it.
I did a presentation at Siggraph 2007 titled Terrain Rendering in Frostbite using Procedural Shader Splatting which goes into some detail of how we handle both the geometry LOD and the general texture and shading of the terrain. We use a combination of semi-procedural shaders in multiple layers. This is also covered in some more detail in the course notes for the talk (pdf).
Well, actually the newest trend is to use raytracing into a sparse voxel octree for the terrain in combination with rasterization of triangle meshes for all the rest. id software currently works on this technology to implement it in their upcoming engine.
Just as a friendly warning, any Googling on the subject will no doubt get you 100 000 hits on ROAM and related technologies (ROAM, Geo mip-mapping etc.). Keep well away from them, they are very CPU-bound.
I have read here and there that 'brute force' can actually work; and have personal experience of it working better than any ROAM technologies that I implemented. Simply dividing the landscape and culling out portions of it worked brilliantly; as a proof-of-concept solution.
Simple systems are always the best first implementation. If you don't have an in-house landscape engine make a simple one, continue with the rest of the game and come back to other ideas later. Landscapes are fun to implement (because you get such varied results for very simple changes) and a typical developer will get distracted by this puzzle for far too long.
Once you have your game laid out; Neverender is right on the mark.
As an alternative to geometry clipmapping, chunked LOD is a commonly used technique that efficiently feeds the graphics pipeline and is not patented like geometry clipmapping. It is probably used in most modern virtual globes.
There are more modern techniques that fully utilize today's GPUs by sending only height and color textures to the GPU and building the terrain geometry via shaders (see Bruneton and Neyret 2008), but be warned that while this is fast, it also means you don't have terrain geometry on the CPU for physics and simulation. There's also a modern technique that dynamically switches between rasterization and ray casting depending on what is most efficient (see Dick ea 2010).