Terrain View

GUI component

High-level terrains can be rendered through one or more views, each having its own properties and settings.

The Terrain View GUI component display the settings of a terrain view and allows the user to modify some properties.

TerrainView.1

Texturing

The Texturing fields display the current status of unique terrain texturing.

The first field shows the overall status:

  • busy

    Some more work needs to be done for unique texturing until the terrain is textured with the desired quality.

  • done

    Unique texturing has finished, the terrain is textured with the desired quality (approximately).

The second field shows the relative progress, in percent. The progress will be 100% if and only if the displayed textual status is done.

The third field shows the current ratio between screen pixels and texture samples. Unique texturing strives to reach a ratio of approximately one, unless a mipmap offset is specified (see Terrain Layer List GUI component).

Chunks

The Chunks slider controls the overall screen-space size that a terrain mesh sector is allowed to reach until terrain processing is stopped, which effectively defines the granularity of mesh traversal.

Displacement / Tessellation

The Displacement slider can be used to scale displacement-mapping by a percentage between 0% and 300%. Displacement-mapping is disabled when set to 0%.

The Tessellation slider controls the threshold that drives dynamic subdivision on the GPU, in order to generate triangles for displacement-mapping. It is given as an error threshold in screen-space.

GPU feature Level / Triangulation mode

The first choice is used to select the GPU feature level. The terrain render effect implementation for a certain graphics context is not required to support all GPU feature levels. Feature levels are described using Direct3D nomenclature, but their meaning can easily be translated to OpenGL or Vulkan.

  • DX9

    Used shaders: vertex, pixel
    Texture arrays: no
    Displacement mapping: none
    GPU triangulation: none

  • DX10

    Used shaders: vertex, geometry, pixel
    Texture arrays: yes
    Displacement mapping: triangle subdivision with geometry shader
    GPU triangulation: no

  • DX11

    Used shaders: vertex, hull, domain, pixel, compute
    Texture arrays: yes
    Displacement mapping: triangle subdivision with hull/domain shader
    GPU triangulation: triangle list expansion with compute shader

  • DX12

    Used shaders: amplification, mesh, pixel
    Texture arrays: yes
    Displacement mapping: triangle subdivision with mesh shader
    GPU triangulation: triangle list expansion with amplification/mesh shader

The second choice selects the CPU triangulation mode. In all modes, the CPU generates indices (i.e. 32-bit integers) that describe the graphics primitives for rendering. The generated indices are uploaded to the GPU for each frame.

  • Strip

    CPU triangulation generates a triangle-strip for each terrain mesh sector.
    Overhead: ~1.61 indices / triangle

  • List

    CPU triangulation generates a triangle-list for each terrain mesh sector.
    Overhead: 3 indices / triangle

  • List

    CPU triangulation generates a terminal-triangle-list for each terrain mesh sector.
    Overhead: ~0.25 indices / triangle

  • Sector

    CPU triangulation generates a sector-list for each terrain mesh sector.
    Overhead: < 0.01 indices / triangle

The third component describes the mode of operation that results from the current GPU feature level and CPU triangulation mode.

  • 'Rendering triangulation on GPU'

    The CPU generates triangle-strips or triangle-lists, which are uploaded to and rendered on the GPU, using the fixed-function input assembler stage.

  • 'Decoding triangulation on CPU'

    The CPU generates triangle-strips, terminal-triangle-lists or sector-lists and converts them to triangle-lists, before uploading them to the GPU.

  • 'Decoding triangulation on GPU'

    The CPU generates terminal-triangle-lists or sector-lists and uploads them to the GPU. The GPU expands them to triangle-lists in a separate compute step, which are then used for rendering.

  • 'Performing triangulation on GPU'

    The CPU generates terminal-triangle-lists or sector-lists and uploads them to the GPU. The GPU generates triangles on-the-fly, using amplification and mesh shaders.

    This feature is not available yet.

TerrainView.2

Wireframe

The Wireframe checkbox enables or disables wireframe rendering.

Decals

The Decals checkbox shows or hides the terrain decals.

See the TerrainDecal API for details.

Models / Bounds

The Model checkbox shows or hides the 3D models.

The Bounds checkbox toggles rendering of the box soup that contains the bounding boxes of all 3D models.

See the TerrainModel API for details.

Planted / Bounds

The Planted checkbox shows or hides the dynamically planted 3D models.

The Bounds checkbox toggles rendering of the box soup that contains the bounding boxes of all dynamically planted 3D models.

See the TerrainPlanting API for details.

Lock View

The Lock View checkbox can be used to lock all view-dependent computations to the current camera position. Use this to inspect the result of frustum culling or shadow mapping, for example.

Cascades

The Cascades checkbox toggles rendering of the box soup that represents the shadow-mapping cascades. The near, mid and far cascades are rendered with white, blue and red colors, respectively.

TerrainView.3

Frustum

The Frustum checkbox enables or disables frustum culling.

See the FrustumCulling API for details.

Cone

The Cone checkbox enables or disables cone culling.

See the ConeCulling API for details.

Horizon

The Horizon checkbox enables or disables horizon culling.

See the HorizonCulling API for details.

Distance

The Distance checkbox enables or disables distance culling.

See the DistanceCulling API for details.