Modifying Terrain

Overview

The following tutorial will give you an overview of modifying terrains in Sandbox. A well-modeled terrain is an important base for creating a good level.

The goal of this tutorial is to provide users an overview of the basic functions of the terrain editing tools.

Users also have the option of modifying the heightmap from within the Terrain Editor, however, for making detailed and accurate adjustments you should modify terrain from within the Perspective view.

The Modify Terrain Mode Toolbar

On the RollupBar, click Modify from the tab shown below:

This will display the Brush Settings dialog box.

The type of terrain modification brush used to edit your terrain can be set here. There are three types of brushes that you can use to edit terrain: Flatten, Smooth, and Rise/Lower.

Flatten will flatten the terrain to a given height and diameter, Smooth will smooth over sharp gradients, and Rise/Lower increases or decreases the terrain height.

You can also use the Pick Height tool to select a height from the world to use for the flatten brush.

The various Terrain editing settings on the Rollup Bar include:

Option

Description

Outside Radius

The outer edge of the area of effect of your terrain modification brush.

Sync Radius for all Types

Checking this check box will set the same outer radius across the Flatten, Smooth and Rise/Lower brushes.

Inside Radius

The inner edge of the area of effect of your terrain modification brush.
Within this radius the effect of the brush is at its maximum, between the outer edge of the inner radius and the outer edge of the outer radius the effect decreases.

Hardness

How strong the effect of the brush is, the higher the value, the stronger the effect.

Height

The height at which your brush will modify terrain. For the Flatten brush, this is the height the terrain will be flattened to.
For the Rise/Lower brush, this is the incremental amount the terrain will be raised/lowered by with each paint action.

Enable Noise

Enables/disables random terrain variance effect in the brush.

Scale

The strength of the noise effect, a higher scale will give more noise.

Frequency

How often the noise effect is applied.

Reposition Objects

Checking this check box will re-align objects with any terrain edited, keeping it on the top.

Reposition Vegetation

Checking this check box will re-align vegetation with the terrain as it is edited, keeping the vegetation on top.

Important Brush Options

On the Brush Settings menu, there are several sliders that you can use to modify the brush.

The Outside Radius slider changes the size of the brush.

1m Radius6m Radius

The Hardness slider changes the strength of the brush. A lower value will give a soft effect and a higher value will make it stronger.

The Height slider modifies the height settings of applicable brushes.

  • Flatten - This modifies the height to which the terrain will be flattened. Holding down Ctrl and clicking will set the height value to the height of the terrain that you clicked on.
  • Rise/Lower - This increases or decreases the height to which the Rise/Lower tool will apply. If you have a positive value set as the height, holding down Ctrl and clicking will lower the height of the terrain.

Click Modify again or press Esc to stop editing the terrain.

The Flatten Brush

The Flatten brush will make any piece of terrain completely flat, at a predefined height.

To activate the Flatten brush, in the Brush Settings section, simply select the Flatten button.

To flatten the terrain, you need to select a height with the Height slider in the Modify Terrain panel.

Alternatively, with the Flatten Brush selected, hold the Ctrl key and click anywhere on the terrain to automatically select the height of the terrain at the specified point.

Now, click and hold down the mouse button in the Perspective viewport and move the mouse pointer around.

The terrain will be flattened to the picked height, over where the brush moves.

Terrain height differences shownTerrain height matches after terrain is modified

The Smooth Brush

The Smooth brush makes a sharp terrain smoother and softer. Activate the Smooth brush by selecting the button in the Rollup Bar.

Holding down Shift whilst using the flatten brush will also switch the brush functionality to smoothing.

In the Perspective viewport, click and hold down the mouse button and move the mouse pointer around to smooth an area of terrain.

The tool will attempt to average out the height of the terrain, based on the surrounding terrain areas to provide a smoother surface.

Before smoothingAfter smoothing

Rise/Lower Brush

The Rise/Lower brush will allow you to increase or reduce the height of the terrain, to make natural terrain structures, like hills and mountains.

Activate the Rise/Lower brush by selecting the Rise/Lower button in the Rollup Bar.

Click and hold down the mouse button in the Perspective viewport and move the mouse pointer around.

If you have set a positive height in the Height slider, the terrain will move up whilst a negative number set in the Height slider will move the terrain down.

You can use the difference between the inner and outer radius in the Rise/Lower tool to control the steepness of your hill/mountain.

Soft-edged hill raised with small inner radiusHard-edged hill raised with full inner radius

Importing/Exporting Terrain

For information on this, please see the Terrain Import and Export article.

Resizing the Terrain

Open the terrain resize window from the Terrain menu > Resize Terrain.

Here, you can change the heightmap of the level by modifying the Heightmap Resolution setting and Meters Per Unit setting.

Meters Per Unit represents the distance between two vertices (lying on a perpendicular grid) in meters. Adjusting the Meters Per Unit will change the size of the heightmap.

Changing the Meters Per Unit to 1 will make the terrain more detailed and changing to a higher value will make the terrain less detailed allowing you to create a bigger level with the same base heightmap resolution.

The default setting of 2 means that every 2 meters there is a new point.

The resize operation should be seen more as a canvas size operation not a scale operation, so if you reduce the size of you map, your map will be cropped to the new dimensions starting from 0,0 on the grid.
When using this option only the terrain is changed, and objects and vegetation must either be deleted or moved to the new location.

After selecting the desired Heightmap and Meters Per Unit, click OK, and then select the texture dimensions.

The Holes Tool

The Holes tool is used for making geometrical holes in both the physical and visual mesh of the terrain. It is useful for creating areas beneath, or inside the terrain of the level.

These holes can be "filled" again with geometry from a Digital Content Creation (DCC) Tool, such as rock brushes or vegetation objects. See the Forest sample level Cave area for an example.

  • The Make Hole button allows you to disable areas of geometry from the terrain. The heightmap geometry is not removed however, it is hidden and the physics are disabled for the hole section.
  • The Remove Hole button will restore the physics and rendering for any area of the terrain where a hole has been made.

The Holes tool can be found under RollupBar > Terrain > Holes

Holes Tool Properties

Make Hole tool

Select the Make Hole tool and move the mouse over your terrain.

You can change the size of the hole you wish to make by adjusting the Brush Radius, left click to create a hole.

Before creating a holeAfter creating a hole
Remove Hole tool

Select the Remove Hole tool and move the mouse over your terrain, click to recreate the geometry previously removed.

When removing holes, note that you're limited to one terrain unit adjacent to existing terrain.

Adjacent terrain unit holes removedAll holes removed

Move Area Tool

See Move Area for more information.

Results

As you can see in the image below, with a little practice, it is possible to create realistic and interesting terrain. Creating a nice terrain setup is a good, first step in the creation of a level. Therefore, it is well worth it to take the time and practice a little.