Version: 2021.1
Working with Heightmaps
Using Terrain at runtime

Terrain settings

The final tool on the five-icon toolbarA row of buttons and basic controls at the top of the Unity Editor that allows you to interact with the Editor in various ways (e.g. scaling, translation). More info
See in Glossary
is for settings. In the InspectorA Unity window that displays information about the currently selected GameObject, asset or project settings, allowing you to inspect and edit the values. More info
See in Glossary
, click the gear icon to reveal the Terrain settings.

Basic Terrain

Property Function
Grouping ID The grouping ID for the Auto connect feature.
Auto Connect Check this box to automatically connect the current TerrainThe landscape in your scene. A Terrain GameObject adds a large flat plane to your scene and you can use the Terrain’s Inspector window to create a detailed landscape. More info
See in Glossary
tile to to neighboring tiles sharing the same Grouping ID.
Reconnect On rare occasions, you might lose connections between Terrain tiles if you change the Grouping ID, or disable Auto connect for one or more tiles. To recreate connections between 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.
Draw Check this box to enable rendering of the Terrain.
Draw Instanced Check this box to enable instanced rendering.
Pixel Error The accuracy of the mapping between Terrain maps (such as heightmaps and Textures) and generated Terrain. Higher values indicate lower accuracy, but with lower rendering overhead.
Base Map Dist. The maximum distance at which Unity displays Terrain Textures at full resolution. Beyond this distance, the system uses a lower resolution composite image for efficiency.
Cast Shadows Use this to define how the Terrain casts shadows onto other objects in the SceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
. Rendering.ShadowCastingMode controls how the Terrain shadow interacts with Scene objects.
Off The Terrain does not cast shadows.
On The Terrain casts shadows.
Two Sided Casts two-sided shadows from either side of the Terrain. Enlighten and Progressive LightmapperA tool in Unity that bakes lightmaps according to the arrangement of lights and geometry in your scene. More info
See in Glossary
do not support two-sided shadows.
Shadows Only Shadows from the Terrain are visible, but the Terrain itself is not.
Reflection ProbesA rendering component that captures a spherical view of its surroundings in all directions, rather like a camera. The captured image is then stored as a Cubemap that can be used by objects with reflective materials. More info
See in Glossary
Use this to set how Unity uses Reflection Probes on Terrain. This setting only has an effect when MaterialAn asset that defines how a surface should be rendered. More info
See in Glossary
is set to Built In Standard, or if you use a custom Material (with Material set to Custom) that supports rendering with reflection.
Off Disables Reflection Probes, and uses a skyboxA special type of Material used to represent skies. Usually six-sided. More info
See in Glossary
for reflection.
Blend Probes Enables Reflection Probes. Blending occurs only between probes. Uses default reflection if there are no Reflection Probes nearby, but no blending between default reflection and probe.
Blend Probes And Skybox Enables Reflection probes. Blending occurs between probes, or between probes and default reflection.
Simple Enables Reflection probes, but no blending occurs between probes when there are two overlapping volumes.
Material Lets you specify the Material to use for rendering Terrain.
Create The Create button only appears when you select a default Terrain Material. It does not appear when you select a custom Material. When you click Create, Unity creates a copy of the Material in your Project folder, which you can modify, and then automatically selects this new copy.

Tree and Detail Objects

Property Function
Draw Check this box to draw trees, grass, and details.
Bake Light Probes For Trees If you check this box, Unity creates internal Light Probes at the position of each tree, and applies them to tree renderers for lighting. These probes are internal, and don’t affect other renderers in the Scene.

If you don’t check this box, trees are still affected by Light Probe GroupsA component that enables you to add Light Probes to GameObjects in your scene. More info
See in Glossary
. This option is only effective for trees with Light Probe enabled on their prototype Prefab.
Remove Light Probe Ringing If you check this box, Unity removes visible overshooting, which often appears as ringing on GameObjects that are affected by intense lighting. This setting reduces contrast, and is dependent on Bake Light Probes for Trees. For more information, see Light Probe Groups: Ringing.
Preserve Tree Prototype Layers Check this box if you want your tree instances to take on the layer values of their prototype PrefabsAn asset type that allows you to store a GameObject complete with components and properties. The prefab acts as a template from which you can create new object instances in the scene. More info
See in Glossary
, instead of the Terrain GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
’s layer values.
Detail Distance The distance from the cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
beyond which details are culled.
Detail Density The number of detail/grass objects in a given unit of area. Set this value lower to reduce rendering overhead.
Tree Distance The distance from the camera beyond which trees are culled.
Billboard Start The distance from the camera at which BillboardA textured 2D object that rotates as it, or the Camera, moves so that it always faces the Camera. More info
See in Glossary
images replace 3D Tree objects.
Fade Length The distance over which Trees transition between 3D objectsA 3D GameObject such as a cube, terrain or ragdoll. More info
See in Glossary
and Billboards.
Max Mesh Trees The maximum number of visible Trees that are represented as solid 3D meshes. Beyond this limit, Billboards replace Trees.

Wind Settings for Grass

Property Function
Speed The speed of the wind as it blows across the grass.
Size The size of ripples on grassy areas as the wind blows over them.
Bending The degree to which the wind bends over grass objects.
Grass Tint The overall color tint applied to grass objects. The final color that appears is the Grass Tint multiplied by the Healthy Color and Dry Color settings of each grass object.

Wind Settings for Grass have no connection with Wind ZoneA GameObject that adds the effect of wind to your terrain. For instance, Trees within a wind zone will bend in a realistic animated fashion and the wind itself will move in pulses to create natural patterns of movement among the tree. More info
See in Glossary
components. The two are unrelated.

Mesh Resolution

Property Function
Terrain Width The size of the Terrain GameObject in its X-axis, in world units.
Terrain Length The size of the Terrain GameObject in its Z-axis, in world units.
Terrain Height The difference in Y-coordinate between the lowest possible heightmapA greyscale Texture that stores height data for an object. Each pixel stores the height difference perpendicular to the face that pixel represents.
See in Glossary
value and the highest one, in world units.
Detail Resolution Per Patch The number of cells in a single patch (mesh). This value is squared to form a grid of cells, and must be a divisor of the detail resolution.
Detail Resolution The number of cells available for placing details onto the Terrain tile. This value is squared to make a grid of cells.

Holes Settings

Property Function
Compress Holes Texture If you check this box, Unity compresses the Terrain Holes Texture to the DXT1 graphics format in the Player during runtime. If you don’t check this box, Unity does not compress the Texture.

Texture Resolutions

Property Function
Heightmap Resolution The pixelThe smallest unit in a computer image. Pixel size depends on your screen resolution. Pixel lighting is calculated at every screen pixel. More info
See in Glossary
resolution of the Terrain’s heightmap. This value must be a power of two plus one, for example, 513, which is 512 + 1.
Control Texture Resolution The resolution of the splatmap that controls the blending of the different Terrain Textures.
Base Texture Resolution The resolution of the composite Texture to use on the Terrain when you view it from a distance greater than the Basemap Distance.

Require resampling on change indicates that when you change properties under Texture Resolutions, the Editor resizes the Terrain tile’s content to the new size you specify, which can potentially affect the quality of your content.

Heightmap Import/Export buttons

The Import Raw and Export Raw buttons allow you to set or save the Terrain’s heightmap to an image file in the RAW grayscale format. You can create RAW format files in third-party terrain editing tools (such as Bryce), and you can open, edit, and save them in Photoshop. This allows for sophisticated generation and editing of terrains outside Unity.

Lighting

Property Function
Contribute Global Illumination Enable this check box to indicate to Unity that the Terrain influences Global IlluminationA group of techniques that model both direct and indirect lighting to provide realistic lighting results. Unity has two global illumination systems that combine direct and indirect lighting: Baked Global Illumination and Enlighten Realtime Global Illumination.
See in Glossary
computations. When you enable this property, Lightmapping properties appear.
Receive Global Illumination You can only configure this option if you’ve enabled Contribute Global Illumination above. If you don’t enable Contribute Global Illumination, the Terrain registers as non-static, and receives Global Illumination from Light ProbesLight probes store information about how light passes through space in your scene. A collection of light probes arranged within a given space can improve lighting on moving objects and static LOD scenery within that space. More info
See in Glossary
.

Lightmapping

Property Function
Scale in Lightmap Lets you specify the relative size of an object’s UVs within a lightmapA pre-rendered texture that contains the effects of light sources on static objects in the scene. Lightmaps are overlaid on top of scene geometry to create the effect of lighting. More info
See in Glossary
. If you set this to zero, the object is not lightmapped, but still contributes lighting to other objects in the Scene. A value greater than 1.0 increases the number of pixels (the lightmap resolution) used for this GameObject, while a value less than 1.0 decreases it.
Lightmap Parameters Lets you adjust advanced parameters that affect the process of generating a lightmap for an object using global illumination. See Lightmap Parameters for more information about these settings.
Rendering Layer Mask Determines which rendering layer this Terrain lives on. When you use a scriptable render pipeline, you can specify an additional rendering-specific layer maskA value defining which layers to include or exclude from an operation, such as rendering, collision or your own code. More info
See in Glossary
. This filters the renderers based on the mask the renderer has and the mask passed to the DrawRenderers command.

Terrain Collider

Property Function
Material A reference to the Physic MaterialA physics asset for adjusting the friction and bouncing effects of colliding objects. More info
See in Glossary
that determines how this Terrain’s Collider interacts with other CollidersAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
See in Glossary
in the Scene.
Terrain Data The TerrainData Asset that stores heightmaps, Terrain Textures, detail Meshes, and Trees.
Enable Tree Colliders Check this box to enable Tree Colliders.

  • 2020–01–16 Page amended

  • Updated content to reflect new UI and options

Working with Heightmaps
Using Terrain at runtime