IN THIS ARTICLE
The Terrain Gem implements a terrain system, which is a system that defines the geometry, color, and surface types for a ground surface, renders the surface, and provides a physics representation.
The Terrain Gem has the following key features:
- Maps height, color, and surface data to regions of the world.
- Provides gradient-based and shape-based authoring tools and workflows to create and manipulate the terrain data.
- Exposes a queryable API that is usable by both simulation and rendering.
- Renders an efficient, high-quality terrain visualization across the view distance.
- Integrates with physics to provide a “physical” simulation of the terrain in the virtual world.
To enable the Terrain Gem, do the following:
- Use Project Manager or the command line to add the Terrain Gem to your project.
- Build your project using Project Manager, Visual Studio, or CMake.
Refer to the
Create terrain from images tutorial for step-by-step instructions on authoring terrain.
Refer to the Terrain Developer Guide for information on using and extending the terrain system as a developer.
|Terrain World||Enables the terrain system and provides the data required for other terrain components.|
|Terrain World Debugger||Offers a number of terrain debugging features. These visualizations are entirely optional, and can be toggled on or off individually.|
|Terrain World Renderer||Visualizes terrain in the world and controls the global terrain rendering properties.|
|Terrain Layer Spawner||Spawns a terrain region contained within configurable bounds, and allows prioritization of overlapping terrain layers.|
|Terrain Height Gradient List||Provides terrain height data from a list of gradients.|
|Terrain Surface Gradient List||Defines mappings between a gradient and a surface type on a terrain layer.|
|Terrain Macro Material||Provides a macro level method of defining the appearance of a region of terrain.|
|Terrain Surface Materials List||Defines mappings between a surface type and a render material.|
|Terrain Physics Heightfield Collider||Provides terrain data to a physics collider in the form of a heightfield and surface to material mapping.|
The Terrain Gem uses the following Console variables (CVARs) either at runtime via the console, or by placing them in configuration. See the general CVAR guide for more information on configuring CVARs.
|The maximum number of jobs to use when updating a Terrain Physics Collider (|
|Distance for PhysX Heightfield debug visualization in meters.|
|Draw the bounding box used for heightfield debug visualization.|
|Size of a heightfield collider update region in meters, used for partitioning updates for faster cancellation.|
|Turn on clipmap debug rendering on the screen.|
|The clipmap type to render on the screen. |
|The clipmap channel to be rendered on the screen. |
|The clipmap level to be rendered on the screen.|
|The size multiplier of the clipmap texture’s debug display.|
|A multiplier to the final output of the clipmap texture’s debug display.|
|Enable detail material id visualization.|
|Enable visualization of detail material update regions.|
|Enable debug coloring for terrain mesh LODs.|
|Enable visualization of terrain sector AABBs.|