Ogre terrain notes

Source: Internet
Author: User


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 ();

 


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.