Development Environment
Ogre 1, 1.72
Tutorial
Basic tutorial 3 terrain, Sky, and fog
Discussion
Use Terrain Scene Manager for Terrain Management in versions earlier than 1.71, and then use ogre terrain system.
The relationship between terrain and paging must be understood.
Procedure
1. First, create global terrain options:Ogre_new ogre: terrainglobaloptions ();
2. CreateThe terraingroup object is similar to the window and image in the previous cegui. You all like to use datasets to manage data;
mTerrainGroup = OGRE_NEW Ogre::TerrainGroup(mSceneMgr, Ogre::Terrain::ALIGN_X_Z, 513, 12000.0f);
mTerrainGroup->setFilenameConvention(Ogre::String("BasicTutorial3Terrain"), Ogre::String("dat"));
mTerrainGroup->setOrigin(Ogre::Vector3::ZERO);
3. Set terrain and describe the details later.
4. Define and load terrain
Mterraingroup-> loadallterrains (true)
5. ComputingBlendmaps
6. Clear mterraingroup
Mterraingroup-> freetemporaryresources ();