Terrain 1.9 LOD Issue

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Posts: 2
Joined: Sat Jun 27, 2015 5:16 pm

Terrain 1.9 LOD Issue

Post by lipwiq »

Hello! I'm having a bit of a problem with the terrain for v1.9 rev7866: The LOD is almost always at a lower setting even for nearby meshes. Sometimes it changes drastically as the camera moves. Here's a video of this:


Has anyone encountered this problem? It wasn't like this for v1.8. I'd greatly appreciate any help or pointers on how to fix this - been stuck with this for a month not knowing even where/how to begin!

User avatar
Crystal Hammer
Posts: 131
Joined: Sat Jun 23, 2007 5:16 pm
Location: Poland
x 29

Re: Terrain 1.9 LOD Issue

Post by Crystal Hammer »

Wireframe would've been nice to see too.
And probably without code nobody can guess what's wrong.

What values do you have in terrain setup code here:

Code: Select all

	//Ogre::TerrainGlobalOptions* mTerrainGlobals;  // in class
	//Ogre::TerrainGroup* mTerrainGroup;

	mTerrainGlobals->setMaxPixelError(3.f);  // 1.7 - 20
	Terrain::ImportData& di = mTerrainGroup->getDefaultImportSettings();
	di.terrainSize = 1025;
	di.worldSize = 1024.f;
	di.minBatchSize = 65;  // 17 33 65 129
	di.maxBatchSize = Terrain::TERRAIN_MAX_BATCH_SIZE;  // 129, verts
I've put mine, which work well. You can read the comments in declarations of those parameters to get more info on what they do.
You can change setMaxPixelError value to 1.f (or even 0), this way it will be on highest and this shouldn't happen at all, then tweak it to higher value.

Post Reply