Terrain 3D

This tutorial will explain how to add a 3D terrain layer.

Terrain 3D

Terrain 3D

Altus supports a wide variety of map types, including digital elevation data. This tutorial shows adding a terrain layer where height data is encoded in gray-scale PNG tiles. The tiles are not treated as images, but rather the 16 values for each pixel are treated as a height. Then, Altus creates a 3D mesh based on those height values.

AltusTerrain

AltusTerrain is a component of the AltusServer tools that are specially designed programs to convert and optimize a wide range of data for the Altus Mapping Engine. This tutorial uses data that was produced by AltusTerrain. A world-wide data set is processed to create terrain tiles. You can learn more about how these tiles are created by referring to the AltusTerrain documentation.

Raster maps can be overlaid onto 3D terrain maps to create scenic landscapes as you see in this tutorial.

/**Loads a 3D terrain layer using height data encoded as gray scale pngs.*/
function add3DTerrainLayer() {
    //Create the tile provider
    var internetTileProvider = new AltusUnified.InternetTileProvider.createFromURLWithSubdomainsAndFormat(
    "baseMapHeight",
    terrain2BytePNGUrlTemplate,
    "",
    true,
    AltusUnified.MapFormat.TERRAIN_HEIGHT);
    
    //Create the terrain map object
    var baseDesc = AltusUnified.VirtualMap.defaultTerrainMapDesc();
    var terrainMap = new AltusUnified.VirtualMap("terrain3D", baseDesc, internetTileProvider);
    
    //Add the terrain map
    AltusUnified.scene.addMap(terrainMap);
    
    //Disable tile biasing (to minimize the amount of data loaded)
    AltusUnified.scene.screen().setTileLevelBias(0);
    
    //Clean up
    terrainMap.delete();
    baseDesc.delete();
    internetTileProvider.delete();
}

AltusMappingEngine Web v2.0.ut.2084.g47ffcd3 master

COPYRIGHT (C) 2017, BA3, LLC ALL RIGHTS RESERVED