Paged geometry on very large terrain


11-02-2010 17:49:47

I am trying to use paged geometry with the new terrain in a project that is supposed to look something like Gothic (Risen, Fallout 3, etc., i.e big open world).
I will like some pointers/clarifications from some more experienced users.
1) What will be the approach to add trees (rocks, vegetation, etc) to this very big terrain?
2) I see that the trees are added one by one, but it seems to me that adding all the trees for the, lets say, 10*10 kilometers terrain would be overkill and also impractical, even if they are not rendered.
What do you think?
3) I, for one, think I'll need a second paging to the already existing paging, like, when one terrain page is loaded also add the trees for that terrain page to the paged geometry. Then, when the terrain page is removed, remove the trees from the paged geometry (I'm not sure if this will suppose a slowdown due to refreshing of the geometry)
Would this approach work? Or should I perhaps implement a new tree loader or something?


16-02-2010 21:38:19

Any chance someone may have some knowledge about this?
Sorry for the bump, but it seems that with all the projects out there using paged geometry, someone may know the answer.


17-02-2010 19:04:12

For trees, there would probably be no need to associate treeloader with OGRE's paging, it probably can handle your high tree count since it has an internal paging system, but still you may try the approach i will describe for the second phase (grass).

For the paged grass, currently i am thinking of integrating it with OGRE's paging system. So that each terrain page will have its own layers of grass since it yields the highest resolution (one density map per layer/per page instead of 1 for the whole world). During a terrain page's loading process, the grass layers will be loaded with the page, i dont think it would cause much overhead since the pages are loaded when far away and the grass will not be rendered as soon as page is loaded since the page will probably be out of grass rendering range...

My only concern with the treeloader is that its iteration process may take much longer when it has a million trees to iterate from(but only display the ones in range, but even that range checking would be a CPU consuming process), not to mention the memory cost. So, the system for the grass can be used for trees too, that way, each tree loader instance is only created when it's page is loaded and contain far less trees to calculate and display...

Another approach would be to use a different WorldSection for trees, you may want them to be loaded before the terrain page is loaded, or in smaller batches, in which case, you can create another WorldSection for trees which has a smaller/bigger CellSize and shorter load/hold radiuses... (this cant be applied to grass since grass needs terrain below it to calculate its Y POSITION)


18-02-2010 08:13:58

Thanks. I was thinking of something similar. Next step is to find the devil in the details :D


30-05-2010 02:15:24

If you want to procedurally generate and page objects over a practically infinite area, take a look at Example6. It shows an example of a procedural loader.

- Fish