O'Reilly logo

Irrlicht 1.7 Realtime 3D Engine by Aung Sithu Kyaw, Johannes Stein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - adding a camera scene node

Copy the terrain height map and the terrain texture files, to somewhere your application could find preferable, from the folder the executable will be run. We use our new template as the base for this exercise.

  1. Define terrain of the type ITerrainSceneNode and initialize this with smgr->addTerrainSceneNode(irr_heightmap.bmp);. irr_heightmap.bmp is the name of the height map, we exported through ScapeMaker.
  2. Call terrain->setScale(vector3df(1.0f, 0.25f, 1.0f));.
  3. Set the material flag EMF_LIGHTING from terrain to false.
  4. Apply the terrain texture to the height map with the line terrain->setMaterialTexture(0, driver->getTexture(terraintexture0.bmp));. Feel free to apply the texture that you see fit.
  5. Add a camera ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required