Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Terrain Settings reference

Adjust the Terrain settings
Read time 13 minutesLast updated 22 days ago

Each Terrain tile has its own settings. If you're using the built-in Terrain system, you need to change settings for each individual tile. If you're using the Terrain Tools package, you can change all tiles at once.
Tip
When you create a new tile from an existing one, the new tile inherits most of the settings from its parent tile.
To change the settings for a single terrain tile, in both the built-in Terrain system and the Terran Tools package:
  1. In the Hierarchy window, select the tile.
  2. In the
    Inspector

    ?

    window, select Terrain Settings (gear icon).

Basic Settings

Property

Description

Grouping IDThe ID the tile uses for Auto connect. Only tiles with the same grouping ID can connect.
Auto ConnectAutomatically connect to neighboring tiles that have the same Grouping ID.
ReconnectIf you change the Grouping ID of a tile, or disable Auto Connect for one or more tiles, you might lose connections between tiles. To reconnect tiles, click the Reconnect button. Reconnect only connects two adjacent tiles if they have the same Grouping ID and if both tiles have Auto Connect enabled. This option isn't available in the Terrain Toolbox window, which handles multiple tiles at once.
DrawEnable rendering the terrain. Drawing is enabled by default; disable it when you want to focus on other tiles while painting or in Play mode. The only element that isn't drawn is the terrain's height; trees, grass, and other details are still drawn. Note that disabling drawing doesn't prevent actions on the tile. For example, height sculpting over the tile's area still changes its height.
Draw InstancedEnable instanced rendering. For more information, refer to Optimizing draw calls.
Enable Ray Tracing SupportUse ray tracing to draw the terrain. Ray tracing renders a more realistic terrain, but has an impact on performance. This option isn't available in the Terrain Toolbox window, which handles multiple tiles at once.
Pixel ErrorSimplifies the generated terrain to optimize rendering. The lower the value, the more faithful the rendering to the original maps, such as the heightmaps and textures, and the higher the performance needs.
Minimum Detail LimitHigher levels increase the heightmap's complexity.
0
means no limit on how simple the heightmap can be. Minimum Detail Limit and Maximum Complexity Limit have a combined value that is limited by Heightmap Resolution (refer to Texture Resolution below). Because of the limit of their combined value, they limit each other. This option isn't available in the Terrain Toolbox window, which handles multiple tiles at once.
Maximum Complexity LimitHigher levels simplify the heightmap.
0
means no limit on how complex the heightmap can be. Maximum Complexity Limit and Minimum Detail Limit have a combined value that is limited by Heightmap Resolution (refer to Texture Resolution below). Because of the limit of their combined value, they limit each other. This option isn't available in the Terrain Toolbox window, which handles multiple tiles at once.
Base Map Dist.The maximum distance to render textures in full resolution. Beyond this distance, a lower resolution composite image is used.

Cast shadows

Defines how the terrain casts shadows onto other objects. Shadow interactions with other objects rely on Rendering.ShadowCastingMode.

Property

Description

OffThe terrain doesn't cast shadows.
OnThe terrain casts one sided shadows.
Two SidedThe terrain casts a shadow from either side of a surface, ignoring backface culling.
Shadows OnlyRender only the terrain's shadows, not the terrain itself.

Reflection probes

Important
The Built-In Render Pipeline is deprecated and will be made obsolete in a future release.
It remains supported, including bug fixes and maintenance, through the full Unity 6.7 LTS lifecycle.
To control how terrain reflects its environment, set the blend options for adjacent reflection probes and the skybox. Reflection probes create more realistic reflections, but decrease performance. Global environment reflections are controlled from the Lighting window. You can override these reflections for a specific Terrain tile with the Reflection Probes setting. This setting only has an effect when you use the default material or a custom material with a shader that supports rendering with reflections. For more information, refer to Reflection Surface Shader examples in the Built-In Render Pipeline.
Note that HDRP doesn't support skyboxes for environment reflections.

Property

Description

OffDisable reflection probe blending and use only the skybox for reflection.
Blend ProbesBlends only adjacent probes and ignores the skybox. Use this for indoors or overhung areas, such as caves, to prevent sky reflections.
Blend Probes And SkyboxWorks like Blend Probes, but also blends the skybox. Use this for open air areas, where the sky is always visible.
SimpleUse reflection probes, but don't blend adjacent ones.

Material

Replace the terrain's default material. You can select a material you've created earlier, or duplicate the default material. Changes done to any material, including the default material, impact all Terrain tiles using that material.

Property

Description

CreateCreates a new copy of the default material and applies it to the current tile. The new material opens in the Inspector window. The Create button is only available once for each tile; it's removed from the interface after use.
Select MaterialUse a material you've created earlier. In the Material field, select the texture picker (circle).

Tree and Detail Objects

Property

Description

DrawEnable rendering tress, grass, and details. Drawing is enabled by default; disable it when you want to focus on the topography.
Bake Light Probes For TreesCreate internal light probes at the position of each tree, and use their information to render light. These probes don't affect other renderers in the scene.

If you don't check this box, trees are still affected by Light Probe Groups. This option is only effective for trees whose prototype has the Mesh Renderer > Receive Global Illumination > Light Probe property enabled (refer to Mesh Renderer component).
Remove Light Probe RingingRinging is an unwanted light probe behaviour that can happen when there are different light intensities in the scene. It causes light to render where it shouldn't, such as the dark side of an object. Remove Light Probe Ringing removes the ringing, but it also makes the probe less exact, and reduces light contrast. For more information, refer to Light Probe Groups: Ringing. This option is only available when you use Bake Light Probes For Trees.
Preserve Tree Prototype LayersFor ray casting, let tree instances use the layer value of their prototype, instead of the Terrain GameObject’s layer value.
Detail DistanceHow far, in meters, an object (Detail Mesh or Grass Texture) needs to be from the camera to be culled. If the distance is too short, a user moving through the scene might see the change from culling to visible as objects popping in or out of the frame.
Detail Density ScaleA factor applied to the density of all details with the Affected by Density Scaling property enabled.
0
means no details;
1
means the full density defined for each detail. For more information, refer to Grass and other details. This option isn't available in the Terrain Toolbox window, which handles multiple tiles at once.
Tree DistanceHow far, in meters, a tree needs to be from the camera to be culled. If the distance is too short, a user moving through the scene might see the change from culling to visible as objects popping in or out of the frame. For SpeedTree trees, this property has no impact; use the tree's LOD group.
Billboard StartHow far, in meters, a tree needs to be from the camera to change from a 3D object to a billboard. If the distance is too short, a user moving through the scene might see the trees change shape. For SpeedTree trees, this property has no impact; use the tree's LOD group.
Fade LengthThe distance over which trees transition between 3D objects and billboards. A longer distance creates a slower transition, and a user moving through the scene might see the branches move from facing the camera (billboard) to their final 3D positions. For SpeedTree trees, this property has no impact; use the tree's LOD group.
Max Mesh TreesThe maximum number of visible trees that can render as 3D meshes. Beyond this limit, trees are all billboards, even if they're close enough to the camera to be 3D. The Editor prioritises the trees nearest the camera to be 3D. For SpeedTree trees, this property has no impact; use the tree's LOD group.

Tree Motion Vectors

For the animation of trees moving in the wind: Set whether to use motion vectors. Motion vectors track each renderer’s per-pixel, screen-space motion from one frame to the next. You can use this information to apply post-prcessing effects.
Note: Not all platforms support motion vectors. Refer to SystemInfo.supportsMotionVectors for more information.
This property corresponds to the Terrain.treeMotionVectorModeOverride method. This option isn't available in the Terrain Toolbox window, which handles multiple tiles at once.

Property

Description

Camera Motion OnlyUse only camera movement to track motion.
Per Object MotionTrack motion when the camera moves, the GameObject moves, or both move.
Force No MotionDon't track motion.
Inherit From PrototypeUse the Motion Vector property setting of the tree prototype.

Detail Scatter Mode

How to cover an area with details (mesh or grass). This option isn't available in the Terrain Toolbox window, which handles multiple tiles at once.

Property

Description

CoveragePaints based on the detail's Detail Density value (refer to Grass and other details).
Instance CountPaints based on the Detail Resolution and Detail Resolution Per Patch values in the Mesh Resolution properties below.

Wind Settings for Grass

Property

Description

SpeedHow quickly the wind moves the grass from side to side.
SizeThe size of ripples on grassy areas. Lower values create a uniform movement; higher values create waves of motion in different directions.
BendingHow much the grass bends in the wind.
0
stops all movement.
1
moves the grass halfway towards the ground, but doesn't lay it flat.
Grass TintThe color tint applied to all grass objects. The final color for each grass is the Grass Tint multiplied by the grass's Healthy Color and Dry Color values, which you can set for each grass type individually (refer to Grass and other details).
Wind Settings for Grass don't impact trees. To animate tree movement, refer to Animate trees with wind.

Mesh Resolution

With all resolutions, higher values provide more detail but require more memory and processing power.

Property

Description

Terrain WidthThe terrain tile's x-axis value, in world units. The value range is from 1 to 100,000. Changing this value changes the size of anything already on the tile, such as sculpted hills.
Terrain LengthThe terrain tile's z-axis value, in world units. The value range is from 1 to 100,000. Changing this value changes the size of anything already on the tile, such as sculpted hills.
Terrain HeightThe possible difference between the lowest and highest points in the heightmap (y-axis), in world units. The value range is from 1 to 10,000. You can't use negative values; if you need to sculpt below the surface level of your world, raise the terrain's starting point (refer to Sculpt the terrain with a brush). Changing this value changes the size of anything already on the tile, such as sculpted hills.
Detail Resolution Per PatchThe size in pixels of each detail patch, which is a part of the Detail Resolution map. A high value reduces draw calls, but might increase triangle count because detail patches are culled per batch. The recommended value is 16. If your Detail Distance is high and your grass is sparse, use a higher value. The range is from
8
to
128
, and the value is squared to form a grid.
Detail ResolutionThe number of pixels in the detail resolution map. A higher value gives more exact detail painting. The range is
0
to
4048
, and the value is squared to form a grid.

Holes Settings

Compress Holes Texture: Compress the texture used to paint holes to the
DXT1
format in the Player during runtime. This format is widely supported on PC and console platforms. For more information, refer to TextureFormat.DXT1 and Paint holes in the terrain.
This option isn't available in the Terrain Toolbox window.

Texture Resolutions

With all resolutions, higher values provide more detail but require more memory and processing power.

Property

Description

Heightmap ResolutionThe pixel resolution of the terrain tile's heightmap. The higher the resolution, the more detail the terrain contours can include. This value must be a power of two plus one, for example, 513, which is 512 + 1. Changing this value changes the possible values of Minimum Detail Limit and Maximum Complexity Limit: their combined value is the power of the resolution minus 4. If Heightmap Resolution is
33 x 33
, Minimum Detail Limit and Maximum Complexity Limit is locked at
0
.
Control Texture ResolutionThe resolution of the splatmap that controls the blending of the different Terrain Textures.
Base Texture ResolutionThe resolution of the composite texture the terrain uses when you view it from a distance greater than the Basemap Distance (you can set a basemap distance for all terrain tiles in Project Settings > Quality > Terrain Setting Overrides).
The Require resampling on change banner reminds you that when you change properties under Texture Resolutions, the Unity Editor resizes the tile's content to the new size you specify. This can affect the quality of your content.

Heightmap Import and Export

You can import heightmaps to use in your project, or export your existing heightmap. This option isn't available in the Terrain Toolbox window, because you can't export multiple tiles at once.
The heightmap is an image file in the RAW grayscale format.
For more information, refer to Work with heightmaps.

Lighting

These options aren't available in the Terrain Toolbox window, which handles multiple tiles at once.

Property

Description

Contribute Global IlluminationUse the Terrain in Global Illumination computations. When you enable this property, Lightmapping properties become available.
Receive Global IlluminationUse lightmaps or light probes as illumination sources. If you disable Contribute Global Illumination, select Light Probes in this list. If you enable Contribute Global Illumination, you can select Lightmaps. The Lightmapping options are available only if you enable Contribute Global Illumination in the Lighting section, and select Lightmaps from the Receive Global Illumination dropdown.

Lightmapping

These options aren't available in the Terrain Toolbox window, which handles multiple tiles at once.
These options are available only if you enable Contribute Global Illumination in the Lighting section, and select Lightmaps from the Receive Global Illumination dropdown.
Note
When you bake with the Unity Compute Light Baker, Unity ray marches terrains procedurally using the heightfield data instead of using a triangulated version of the terrain. This greatly reduces the memory footprint of terrains and increases performance when many large terrains are present.

Property

Description

Scale in LightmapSpecify the relative size of an object’s UV tile within a lightmap. A value greater than
1.0
increases the number of pixels (the lightmap resolution) used, and creates more exact lighting for important or detailed areas. A value smalle than
1.0
decreases the number of pixels and is better for areas with fewer details. Set the value to
0
to let the object contribute lighting to other objects in the scene without being lightmapped itself.
Lightmap ParametersChoose or create a Lightmap Parameters asset for the tile. Refer to Lightmap Parameters for more information.
Rendering Layer MaskFor the scriptable render pipelines, set the rendering layer for this Terrain tile. For more information, refer to Rendering Layers in URP or Renderings Layer in HDRP.

Quality Settings

Ignore Quality Settings: Set the tile to ignore the Terrain Override Settings set in the Quality settings.
This option isn't available in the Terrain Toolbox window, which handles multiple tiles at once.

Terrain Collider

The Terrain Collider component manages collisions on the terrain. For details about the Terrain Collider component properties, refer to Terrain Collider component reference.
You can't set a collider in the Terrain Toolbox window. You have to set them for each tile.

Additional resources