views:

190

answers:

4

I have a project where I am looking to render a large number of meshes over a 16 square mile landscape. While the meshes are not all unique, there are a lot of them (Probably only 1000 meshes but several million usages of them)

I was wondering if there were any papers or (good) resources covering the topic. I have found loads of papers about terrain/landscape rendering, but somehow have failed to find any on rendering of large amounts meshes.

EDIT By meshes I mean objects on the landscape, buildings trees etc

A: 

By "meshes", do you mean objects in the landscape, e.g. buildings, vehicles, trees, bushes and so on? That is, you're not talking about meshes making up the ground itself?

If so, I think you need to look into general visibility-checking, so that when you have your terrain rendering, you are able to query if a given mesh would be visible, or hidden behind a hill/valley wall.

Further, you of course need to look into "instancing", so you only keep a single dataset for each unique mesh, and re-use that by transforming it into each position it appears in, once that position has been determined visible of course.

Looking at papers like this might also be instructive, if you've missed it.

unwind
+1  A: 

The solution is called octree. A Google image search will make you understand the concept in a glance :)

Basically, an octree will allow you to quickly eliminate meshes which can't be visible during rendering (either because they are behind you or too far away).

For meshes that are far away, you can precalculate a similar mesh with a reduced resolution so you can still have a horizon and attach that to a node of the tree. If the part of the tree has a certain distance, you just use the reduced mesh instead of the one with the high detail.

Aaron Digulla
+1  A: 

I am not sure if this is your case, but what about impostors? As far as I remember, one can use 3D texture or something like that to fake a very large amount of geometry data. This can be just your case.
It is used for rendering of the forests and the stuff like that.

avp
+2  A: 

There's two important areas to consider for efficient rendering of large landscapes with lots of objects. One is to minimize redundant work by only drawing what is visible from the current camera angle and the other is to maximize the efficiency of rendering what is visible.

There are two main ways to minimize redundant rendering work. First you want to avoid drawing anything that is outside the field of view of the camera. This visibility culling can be accelerated using a variety of data structures: octrees, quadtrees, sphere trees, bsp trees (generally more suited to less open environments rather than landscapes), etc. Some kind of hierarchical scene arrangement is also useful in accelerating this kind of culling. The same data structures can also be used to skip rendering of objects below a certain size threshold on screen.

Second you want to avoid rendering objects that are occluded by nearer objects. There are many different techniques for occlusion culling, some using GPU acceleration through occlusion queries and others operating entirely on the CPU. The value of occlusion culling will depend somewhat on your typical camera angles, terrain roughness and the size of objects on the terrain. A relatively flat, open terrain with only small objects or a camera that looks mostly down at the ground rather than out towards the horizon will reduce opportunities for occlusion culling. Some hierarchical organization of your scene will again help with occlusion culling as if a parent object is occluded you can skip tests for it's children.

Once you've minimized the set of objects that need to be rendered you can turn your attention to maximizing rendering efficiency for the objects that are visible. Level of detail techniques are useful here (lower poly meshes for distant objects). The impostor technique mentioned in another answer is another approach that can be useful, replacing complex geometry with simple billboards. Various approaches to instancing geometry are also worth pursuing - modern graphics hardware can render many copies of the same geometry with different positions and other variations with a single call to the graphics API. Finally all the standard techniques for efficient use of graphics hardware apply here: sorting for maximum rendering efficiency (somewhat hardware dependent), minimizing redundant work per frame, packing geometry efficiently, optimizing vertex and pixel shaders, etc.

Each of the areas mentioned are quite complex in themselves and there are many papers, books and articles elaborating on the details. Hopefully the techniques mentioned here are enough to point you in the right direction for some google research.

mattnewport