Create Mesh from Terrain
The Create Mesh from Terrain tool will convert gridded elevation data into a 3D mesh made up of nodes, faces and edges. While Global Mapper can dynamically show terrain datasets in the 3D viewer, including with draped imagery, this tool will create a new 3D model layer to the same effect that is also supported in other 3D viewer applications when exported to a 3D model format.
The generated 3D model can also have a texture image associated with it that will drape on the top of mesh surface, using either a selected image or the terrain shader.
This tool is available in the Layer menu as Create Mesh Feature from Raster/Terrain. It can also be accessed from the Overlay Control center. Right-click on a terrain layer(s) and navigate to the Layer sub-menu to find this option.
This option will triangulate the terrain grid into a mesh feature. Each pixel specified will be converted to two triangles. It is recommended to also specify a simplification in order to collapse edges that are not necessary to representing the structure of the terrain.
In the layer selection dialog be sure to also include imagery layers if it is intended to create a texture from the imagery or other raster layer.
Vertical Units
Select from the following options:
- Meters
- Decimeters
- Centimeters
- Millimeters
- Feet
- Decifeet
- Inches
- Centifeet
- Millifeet
It is recommended to keep the units as Meters to load the model correctly in Global Mapper.
- Nearest Neighbor - simply uses the value of the sample/pixel that a sample location is in. When resampling an image this can result in a stair-step effect, but will maintain exactly the original color values of the source image.
- Bilinear Interpolation - determines the value of a new pixel based on a weighted average of the 4 pixels in the nearest 2 x 2 neighborhood of the pixel in the original image. The averaging has an anti-aliasing effect and therefore produces relatively smooth edges with less stair-step effect.
- Bicubic Interpolation - a more sophisticated method that produces smoother edges than bilinear interpolation. Here, a new pixel is a bicubic function using 16 pixels in the nearest 4 x 4 neighborhood of the pixel in the original image. This is the method most commonly used by image editing software, printer drivers and many digital cameras for resampling images.
- Box Average (3x3, 4x4, 5x5, and 7x7) - the box average methods simply find the average values of the nearest 9 (for 3x3), 16 (for 4x4), 25 (for 5x5), or 49 (for 7x7) pixels and use that as the value of the sample location. These methods are very good for resampling data at lower resolutions. The lower the resolution of your export is as compared to the original, the larger "box" size you should use.
- Filter/Noise/Median (2x2, 3x3, 4x4, 5x5, 6x6 and 7x7) - the Filter/Noise/Median methods simply find the median values of the nearest 4 (for 2x2), 9 (for 3x3), 16 (for 4x4), 25 (for 5x5), 36 (for 6x6) or 49 (for 7x7) pixels and use that as the value of the sample location. This resampling function is useful for noisy rasters, so outlier pixels do not contribute to the kernel value. Some common sources of raster noise are previous compression artifacts or irregularities of a scanned map/image.
- Box Maximum (3x3, 4x4, and 5x5) - the box maximum methods simply find the maximum value of the nearest 9 (for 3x3), 16 (for 4x4), 25 (for 5x5), or 49 (for 7x7) pixels and use that as the value of the sample location. These methods are very good for resampling elevation data at lower resolutions so that the new terrain surface has the maximum elevation value rather than the average (good for terrain avoidance). This method behaves the same as the average on raster/imagery layers. The lower the resolution of the export file is as compared to the original, the larger "box" size that should be used.
Mesh Grid Spacing
Specify the resolution at which to sample the terrain. Each terrain sample at this resolution will be converted to 2 mesh triangles, so with detailed terrain data it is recommended to increase the sample spacing and specify a desired Resampling method.
Texture Options
Enable Create Texture from Selected Layer(s) to create a draped texture image for the mesh. This texture can be generated from other raster layers that were included in the layer selection dialog, such as imagery. Or check the option Only Generate Mesh Texture from Terrain Layer(s) to create a texture that replicates the look of the currently applied terrain shader.
In the X-axis and Y-axis specify the resolution at which to sample the texture image. When a new resolution is calculated, the value at the bottom of the section for pixels per grid cell will update to demonstrate how the texture dimensions will relate to the terrain sampling dimensions.
The maximum texture size value will modify the resolution if the generated texture will exceed this value.
Interpolate to fill small gaps in data
Any small areas with missing data will be filled in by interpolating the surrounding valid data using an IDW method. This is useful for filling small gaps between adjacent tiles or small holes in elevation data.
Simplify Mesh to % of Generated Size
Enable this option to perform a mesh simplification prior to calculating a texture for the mesh. The mesh simplification uses the default Lindstrom- Turk simplification method. For more information on mesh simplification see Simplify Mesh.
Example
This example shows a 3D Model layer created from terrain and an image layer. The mesh was created with the Simplify Mesh option enabled.
To modify the texture image of the generated mesh see Mesh Feature Style