How to make the Terrain larger

Apr 29, 2008 at 6:11 AM
The Terrain was so small ,how to make terrain larger ,I change the terrain.bmp to 800X600 but the game run so slowly .
Apr 29, 2008 at 12:35 PM
Edited Apr 29, 2008 at 12:36 PM
You should probably implement some kind of spatial partioning scheme in your application for handling larger terrains.

Few to get you started: QuadTree, Octree etc. QuadTree can be also used to limit the detail by using the distance to viewer as an base value.
Coordinator
Apr 30, 2008 at 12:37 PM

one1two2 wrote:
The Terrain was so small ,how to make terrain larger ,I change the terrain.bmp to 800X600 but the game run so slowly .

Okay first off, JiglibX isn't a renderer and as such its implementation of the heightmap object in the demo is very simple. A 800x600 bmp will generate 960,000 triangles per frame, now the physics side of it should be largely inviolate with regards the height field size.

If not (you sure its not the rendering slowing you down), then i'll happily take a look. I'd be surprised tho, I've regularly throw a 300,000+ K triangle mesh (which is probably the slowest of all the primitives) at mine and its still runs quite well.

There are certainly so improvements to be made to physics heightfield implementation, but its current implementation should be fairly fast for spheres, box and capsules.
May 7, 2008 at 7:16 PM
We're using JigLibX in our engine right now, and the physics mesh isn't the thing slowing you down. We have a 1024x1024 mesh and we're running at 100-200fps, with 100 cubes in the scene as well. You need to implement a quad-tree algorithm for your terrain, at the very least. An LOD system would be a good idea as well. Something like GeoMipMapping works fairly well from what I've seen.