Terrain Height

Finds local and global peaks and valleys of terrain meshes, colours a vertex heatmap by elevation and outputs Dashboard Data (elevation legend).

Site Analysis Nickname: TerrainHeight

Overview

Analyzes mesh extremes, unrolls sections bi-directionally, and generates 3D/2D metadata labels.

Inputs (8)

  • TargetMeshes (Mesh): The meshes to analyze.
  • SearchRings (Integer): Topological radius in rings.
  • ProminenceLimit (Number): Minimum Z-delta to be considered a peak/valley.
  • CustomColors (Colour): Custom colormap list.
  • CullGlobals (Boolean): Toggle to remove the absolute highest/lowest points.
  • AvoidBoundaries (Boolean): Toggle to ignore naked edge vertices.
  • EnableHeatmap (Boolean): Toggle to compute and output the vertex heatmap mesh.
  • Run (Boolean): Optional. False = skip the analysis and keep showing the last results (cached). Share one toggle with the Analysis Dashboard to switch everything on/off together.

Outputs (12)

  • Instructions (Text): Component documentation and usage manual.
  • LocalPeaks (Point): Output points for local highs.
  • PeakElevations (Number): Z-values for local highs.
  • GlobalMaxPoint (Point): Absolute highest point on the mesh.
  • GlobalMaxElevation (Number): Absolute highest Z-value.
  • LocalValleys (Point): Output points for local lows.
  • ValleyElevations (Number): Z-values for local lows.
  • GlobalMinPoint (Point): Absolute lowest point on the mesh.
  • GlobalMinElevation (Number): Absolute lowest Z-value.
  • HeatmapMeshes (Mesh): The vertex-colored duplicate mesh.
  • Dashboard Data (Text): JSON Legend Data
  • Info (Text): Component information and interpretation

Method, assumptions and simplifications

The same notes appear in the component's Info output.

Method

  1. Works on mesh topology vertices, branch by branch of TargetMeshes.
  2. A vertex is a candidate peak if no direct neighbour is higher by more than 0.0001, and a candidate valley if none is lower.
  3. Candidates are then checked against all vertices within SearchRings topological rings (default 5): a peak must still be the highest and stand at least ProminenceLimit (default 0.5) above the lowest vertex in that neighbourhood; a valley the reverse.
  4. The mesh's absolute highest and lowest vertices are always added to peaks and valleys unless CullGlobals is on; AvoidBoundaries skips naked-edge vertices.
  5. The heatmap colours each mesh vertex by (z - zMin) / (zMax - zMin), with zMin and zMax taken over all input meshes (the same range as the legend), either along CustomColors or with a built-in cyan-yellow-red ramp; a single custom colour paints the whole mesh.
  6. The status shows total 3D mesh area, relief, mean vertex elevation (unweighted), extremes and counts; elevations are rounded to 0.01.

Assumptions

  • Meshes are terrain-like and welded, so topology neighbours reflect real adjacency.
  • ProminenceLimit is in model units; ring count stands in for a search radius, so its real size depends on mesh density.

Simplifications and limits

  • Prominence is local relief within the ring neighbourhood, not true topographic prominence.
  • Flat plateaus produce no peak or valley unless they stand above or below their surroundings by ProminenceLimit.
  • Area is surface area, not plan area.

Workflow

  • Site Fetch terrain or any terrain mesh -> TargetMeshes. Dashboard Data -> Analysis Dashboard.