Introduction
Regardless of how you get terrain in your level, there is a good
chance you might want to tweak it before you consider the level
complete. The Terrain Editor can modify a TerrainBlock's surface in
real time using a simple set of brushes.
With the Terrain Editor, you can elevate, excavate, smooth, flatten,
and randomize sections of your terrain as if you were painting the
ground. This is a great way to add the final details and polish to your
level before populating it with objects.
More than just adding hills or holes, you can cut channels for rivers,
generate valleys for a mountainous region, turn a rocky mountain chain
into a series of smooth hills, and other advanced operations.
Setup
This article was written using a newly generated project with the
Full Template, which ships with plenty of free assets for testing and
learning. To save time and focus on this specific section of the
documentation, the World Editor, we are going to bypass asset creation
until later on.
None of the modifications you are about to make are
required for future tutorials, so feel free to create a new level or
use an existing one for testing. As long as you have access to existing
materials, you are good to go. For this article, we are going to be
using a new level.
(If you do not know how to create a new level, click here).If you do not know how to create a new level, click here).
You will want to remove any existing TerrainBlocks since we
will be creating one from scratch for this article. For example, a new
level will start with a fairly standard terrain. From the Scene Tab in
the Scene View panel, select the TerrainBlock object.
Once you have it selected, click on the trash can icon in
the top of the tab to delete it. You should now have plenty of room to
work with.
(click to enlarge)

Next, open the file menu so we can create a blank terrain. Use the 512
resolution, and flat terrain option.
(If you do not know how to do this, click here).If you do not know how to do this, click here).
You should now have a fresh, flat TerrainBlock to work with.
(click to enlarge)

Interface
The Terrain Editor interface is extremely simple to use. While the
tool is on, there are three areas to pay attention to. On the far left
is the tool palette, which is used to select what kind of modification
you wish to make.
(hover over each icon to see a description)
At the top, the Toolbar has updated to show various brush
options. The brush options will change the intensity and pattern of
your terrain modification.
(hover over each section to see a description)
Finally, within your scene view you should see several
colorful squares grouped together. This is your Terrain Editor brush,
and it is controlled by your mouse. You can use this brush to "paint"
your terrain adjustments by left clicking and dragging the cursor.
(click to enlarge)

Brush Settings
Now we will go into deeper explanation of how the brush options can
affect your terrain editing, and how the editor lets you know what you
are doing. In the Brush Settings section, you should see a circular
icon and square icon. Toggling between the two will change the shape of
your brush.
Shape
Circle Brush:
(click to enlarge)

Square Brush:
(click to enlarge)

Size
In the Size section you will find a box with a number in it. When you click on the box, a slider will appear.
This slider goes from 0 to 100, and it changes the size of
your brush allowing it to modify larger sections of the terrain. The
default value is typically 9, which results in a 9x9 grid that makes up
your brush. Increasing the value to 20 will result in a 20x20 grid.
(click to enlarge)

Pressure
The color of each square in the brush represents the intensity of
the modification being applied to the current terrain section. The
color adjusts from green->yellow->orange->red, increasing
intensity respectively. The brush's Pressure, is measured by percentage
(0% to 100%), will change how much of the modified terrain is affected
by the intensity.
Where the pressure is the weakest (green), adjustment will
be next to nothing. The stronger the pressure (red) will result in very
dramatic modifications with minimal clicking required. Like a
paintbrush, the center is typically the strongest and applies the most
pressure.
When you wish to reduce the pressure, making your terrain
edits more exact, simply move the slider to the left or input a lower
percentage. The brush should begin weakening toward the middle.
(click to enlarge)

Softness
The Softness directly affects the intensity of the entire brush's
modification. Like the others, it is represented by a slider. The
number itself is a decimal value ranging between between 0.0 and 1.0,
with 1.0 being the softest and 0.0 the hardest.
As you lower the value, the entire brush will change colors and make the adjustment less smooth.
(click to enlarge)

Brush Softness Curve
The last interface section to describe is the Brush Softness Curve.
If you click the curved line next to the Brush Softness slider, a new
dialog will appear.
The graph contains multiple nodes which can be moved by
clicking and dragging them up or down. Modifying the nodes will
determine which parts of your brush's grid are hard or soft. As the
graph shows, going from left to right will determine where in the grid
you are changing the hardness.
Left nodes are closer to the center of the brush, and each node moving
to the right will move toward the outer edges of the brush. The higher
a node is situated, the harder it is. The following image is a visual
of how this system works:
If you were to shift all of the nodes so that the line is
going reversed, the brush is softer toward the center and harder toward
the edges.
To get an unusual setting, you can create a "wavy" version
of the curve. Alternate the nodes in extremes from top to bottom, which
will result in rings of softness with the brush.
Now that you are familiar with the interface, it is time to edit the terrain.
Adjust Height Tool
Let's start by selecting the Adjust Height tool from the
palette. With the Adjust Height tool, you can move a section of terrain
up or down depending on which direction you are dragging your mouse.
Use the circle brush, size 20, 100% pressure, and 1 softness. Hover
your brush over a section of terrain, hold down the left mouse button,
then move your mouse up. The terrain should dynamically adjust to your
cursor location.
(click to enlarge)

When you are satisfied with the height, let go of the mouse
to see your terrain modification. Pro license owners should note that
the lighting has automatically updated, reflecting the new shadows
projected by the elevated terrain.
(click to enlarge)

Use the mouse to cover part of your new adjustment with the brush.
Notice how the brush clamps to the terrain, maintaining the shape you
are using while still selecting a section.
(click to enlarge)

Despite the elevation of your current selection, the section
under the most intense part of the brush (red) will still adjust more
dramatically. If the center of the brush (with stock values) is just to
the edge of a hill, you can adjust nearby terrain to match elevation.
Terrain under the softer part of the brush (green) will still elevate,
but not as much.
(click to enlarge)

Before moving on to the next tool, we will experiment with
the softness value. Set the softness of your current brush to 0. Your
entire grid should now be red. Move the brush over a flat section of
the terrain.
(click to enlarge)

Click on the terrain and drag your mouse up. Instead of an
elevated hill with a smooth slope, your brush should have created a
flat plateau with completely vertical sides. With 0 softness, your
brush's shape will be used to extrude the terrain in a sharp manner.
(click to enlarge)

Add Dirt Tool
The Add Dirt tool can only elevate the terrain, but it does so
in a very controlled manner. Instead of manually lifting, you can
"paint" the terrain in a sweeping motion by dragging the mouse while
holding the left button. The longer you keep the brush in one location,
the higher that section will be.
Set your brush size to 20, pressure to 40%, and softness to
1. Find a flat section of the terrain and move your mouse cursor to
that location to hover the brush.
(click to enlarge)

When you are ready, click and hold the left mouse button and
begin dragging your brush in a direction. The terrain should elevate
wherever your brush is held. You can use this to create a hill over a
long section of terrain.
(click to enlarge)

Using a lower brush pressure results in less dramatic terrain elevation as you "paint". This allows you to be more exact.
Excavate Tool
The Excavate tool functions completely opposite of the Add Dirt
tool. Instead of elevating, you can dig holes in the terrain with this
tool. Again, use a circular brush with 20 size, 40% pressure, and 1
softness. With the Excavate tool selected, locate a flat section of the
terrain and hover your brush over it.
(click to enlarge)

Click and hold down the left mouse button. As you do so, the
terrain will sink down below the brush. If you sweep your mouse as if
you are painting, you will create a path of lowered terrain. The longer
you hold the mouse in a single location, the deeper the hole will be.
(click to enlarge)

Smooth Tool
The Smooth tool acts similarly to how it sounds. While using
this tool, jagged terrain sections under the brush will erode to a
smoother surface. This tool will only work if you sweep the brush
across a surface. Simply holding down the left mouse button will have
little to no effect.
Keeping the same settings we have been working, locate a
jagged section of terrain. If you have to, create one with the Add Dirt
tool. Make sure it is high in elevation. Select the Smooth tool, then
hover the brush over the applicable terrain.
(click to enlarge)

Click and hold the left mouse button, then make small
circles around the peak of the terrain section. The tip should lower
and have a broader surface. The broader your sweep, the more terrain is
affected by the smoothing process.
(click to enlarge)

Add Noise Tool
The Add Noise tool is used to give your terrain modifications a
more random, defined look. The tool uses a noise algorithm for sporadic
elevation and excavation. Essentially, it fluctuates the amount of
terrain it modifies and how intensely it does so.
Select the Add Noise tool, then set your brush to size 15,
50% pressure, and 1 softness. Locate a large section of flat terrain
and move your camera to a high elevation.
(click to enlarge)

Click and hold the left mouse button, then begin to "paint"
the terrain by dragging it in random patterns. Try by making several
concentric circles, varying spirals, zig-zag motions, etc. You should
eventually see some definition forming.
(click to enlarge)

When you are finished with the tool, fly your camera around
the section of the terrain to see how the terrain was affected. Keep in
mind that most of these changes were random, which can add much needed
detail to your terrain.
(click to enlarge)

You can use this tool on terrain that has already been
modified to remove unrealistic adjustments, such as perfectly smooth or
flat slopes.
Flatten Tool
The final tool we are going to look at is the Flatten Tool. This
should be used sparingly, as the affect it has on terrain is dramatic.
The tool is used to flatten terrain surrounding the brush's starting
point. In other words, this will not lower your terrain to a default
location. It depends on where you start.
Use a circular brush with 15 size, 50% pressure, and 1
softness. Find a section of terrain that is elevated. Position your
brush near it, but on a flatter section of the terrain.

(click to enlarge)
Click and hold your left mouse button, then drag it toward
the elevated terrain until you have swept over most of it. You should
see that the tool has flattened a strip of terrain, based on the
brush's location as it swept. The flattening process became weaker the
further you took the brush into the terrain.
(click to enlarge)

If you make several sweeps in the same direction, from the
same starting point, your terrain will eventually smooth out into a
flat plateau almost level with your original starting point.
(click to enlarge)

This is generally handy for clearing a smooth path from one
elevation to another. However, this is not the optimal approach for
flattening huge sections of terrain. The other tools can perform that
process much faster and more efficiently.
Conclusion
In this article, you learned how to use the Terrain Editor. If
getting terrain into your level is the first thing you should do, the
second step should be modifying the TerrainBlock with this tool. The
power of this tool allows you to make broad, sweeping changes to your
terrain or tiny detail adjustments to get it "just right."
Since we are already dealing with TerrainBlock
modification, we will move onto another brush based tool. Click here to
proceed to the Terrain Painter Guide.
|