Using PagedGeometry for terrain mesh patches


29-11-2007 05:19:59

I've thought about taking patches of Ogre meshes which are meant to be used as terrain and loading them into PagedGeometry and making paging mesh terrain (not using impostors, of course). I was wondering how efficient this would be. By the way, my reason for not wanting to use terrain heightmaps with Simple Paged Terrain or PLSM2 or something is because it would require additional tools to be made, as opposed to using an already existing tool such as dotScene + Blender to load everything in. Any suggestions would be greatly appreciated.



29-11-2007 15:55:42

It's possible to do this, but if you plan on implementing terrain LOD you won't be able to do any stitching very easily (PagedGeometry really wasn't designed for terrains).

I'm suggest you look into creating your own PageLoader class if you want to try implementing terrain in PagedGeometry. A custom PageLoader (you can call it TerrainLoader) will make it much easier to manage this - you'll have full control over how your terrain patches are loaded and unloaded. You can learn how to write your own PageLoader in Tutorial 4 and in the API Documentation under "PageLoader".

As you know, don't use ImpostorPage to render the terrain - that would look bad and actually reduce performance. Also, if you only use one terrain patch mesh per page of PagedGeometry, using BatchPage will only spend unnecessary time trying to optimize an optimal batch - instead, you can actually use GrassPage (found in GrassLoader.cpp/.h), which was designed for large chunks of prebatched geometry.


30-11-2007 17:40:43

Thanks for the information :)