Interactive rendering of large terrain data. More...
Classes | |
class | SoTViz |
![]() | |
class | SoTVizDataPreprocessor |
![]() | |
class | SoTVizPreprocessor |
![]() | |
class | SoTVizRender |
![]() | |
class | SoTVizTexturePreprocessor |
![]() | |
class | SbTVizColorScale |
![]() | |
class | SbTVizData |
![]() | |
class | SbTVizRegularGridData |
![]() | |
class | SbTVizTexture |
![]() | |
class | SbTVizTextureList |
![]() | |
class | SoTVizAltimeterSpeedometer |
![]() | |
class | SoTVizCameraManager |
![]() | |
class | SoTVizCompass |
![]() | |
class | SoTVizControls |
![]() | |
class | SoTVizControlsMenu |
![]() | |
class | SoTVizNavigationToolBase |
![]() | |
class | SoTVizNavigationTools |
![]() | |
class | SoTVizViewer |
![]() |
Interactive rendering of large terrain data.
DEPRECATED: TerrainViz is deprecated and no longer supported since OIV 9.5.
NOTE: The classes in this extension do not exist in Open Inventor 10.0 and later.The TerrainViz extension provides a powerful tool for GIS, geoscience, and military simulation applications by allowing interactive rendering of large textured terrain.
NOTE: TerrainViz is a not separately licensed extension. You must have an OpenInventor license string.
The TerrainViz extension performs terrain visualization using an auto-adaptive mesh technique and a quadtree of textures.
It uses a multi-resolution technique that re-meshes the terrain at every frame with a constant number of triangles. The local mesh accuracy depends on the point of view and the altitude gradient. The texture level depends on the point of view only.
The module renders the terrain at an approximately constant frame rate.
Controls are provided for adjusting quality versus performance.
The TerrainViz implementation is based on the ROAM (Real-time optimally adapting meshes) algorithm:
Here are the basic steps for using TerrainViz.
SoTViz::init();
dtmRender = new SoTVizRender(); root->addChild(dtmRender);
dtmRender->loadFromXML("data/africa.xml");
data = new SbTVizRegularGridData(); data->loadDataFile("data/africa_binary.dat", SbVec3d(1./4097., 1./2500., 1./4097.), SbVec3d(0., 0., 0.)); dtmRender->setData(data); texList = new SbTVizTextureList(); texList->addTexture("data/africa_1_1.jpg", 0, SbVec2s(0, 0)); texList->addTexture("data/africa_1_4.jpg", 1, SbVec2s(0, 0)); texList->addTexture("data/africa_2_4.jpg", 1, SbVec2s(0, 1)); texList->addTexture("data/africa_3_4.jpg", 1, SbVec2s(1, 0)); texList->addTexture("data/africa_4_4.jpg", 1, SbVec2s(1, 1)); texList->addTexture("data/africa_01_16.jpg", 2, SbVec2s(0, 0)); texList->addTexture("data/africa_02_16.jpg", 2, SbVec2s(0, 1)); texList->addTexture("data/africa_03_16.jpg", 2, SbVec2s(0, 2)); texList->addTexture("data/africa_04_16.jpg", 2, SbVec2s(0, 3)); texList->addTexture("data/africa_05_16.jpg", 2, SbVec2s(1, 0)); texList->addTexture("data/africa_06_16.jpg", 2, SbVec2s(1, 1)); texList->addTexture("data/africa_07_16.jpg", 2, SbVec2s(1, 2)); texList->addTexture("data/africa_08_16.jpg", 2, SbVec2s(1, 3)); texList->addTexture("data/africa_09_16.jpg", 2, SbVec2s(2, 0)); texList->addTexture("data/africa_10_16.jpg", 2, SbVec2s(2, 1)); texList->addTexture("data/africa_11_16.jpg", 2, SbVec2s(2, 2)); texList->addTexture("data/africa_12_16.jpg", 2, SbVec2s(2, 3)); texList->addTexture("data/africa_13_16.jpg", 2, SbVec2s(3, 0)); texList->addTexture("data/africa_14_16.jpg", 2, SbVec2s(3, 1)); texList->addTexture("data/africa_15_16.jpg", 2, SbVec2s(3, 2)); texList->addTexture("data/africa_16_16.jpg", 2, SbVec2s(3, 3)); dtmRender->setTextureList(texList);
dtmRender->maxRenderedTriangles = 3500; dtmRender->triangleSizeAttenuation = 3.2; dtmRender->distanceAttenuation = 3.15;
An example program is available in $OIVHOME/examples/source/TerrainViz.