in this video we're going to take a look
at building terrains with the unity
terrain tools package
and the universal render pipeline the
terrain tools are a great way to create
high performance worlds for many
platforms with exceptional flexibility
and creative freedom it works in concert
with the rest of the systems in unity
as an entry point to creating many types
of games and simulations
once you have some familiarity with the
terrain tools you'll find they are a
great way to build worlds
define your project's style and that it
offers a number of features that allow
you to create
highly polished scenes to get started
with the latest terrain tools in unity
2020.1
you'll need to make sure that the
package manager is set to
enable preview packages under project
settings
package manager advanced settings
for this demo we are also installing a
few other free terrain assets from the
asset store
you can find a list of those packages in
the description
with terrain tools installed we can now
start
building our terrain choose window
terrain
terrain toolbox dock the terrain toolbox
and go to
create new terrain tab in the tab you'll
see
options for size height starting
position
among other settings let's create one
terrain with all of the default settings
down at the bottom of the window click
create
and you'll see the new terrain in your
scene
raising and lowering your terrain is the
most essential component of editing your
terrain mesh
with your terrain mesh selected in the
hierarchy window
make sure your inspector is visible and
you'll see a number of icons at the top
of your terrain component
the brush icon is where you will perform
most direct edits to the terrain
geometry
and textures under the row of icons
click on the drop down
and select raise or lower terrain select
a simple
round brush mask and you are now ready
to modify your mesh
let's create some basic hills and raised
areas
to create more detailed terrain without
obvious staircasing
the terrain tool supports brushes with
16-bit depth
a number of them are included with the
terrain tools
sample asset pack which we have linked
to in the description
here are some examples of the brushes in
action
holding a on the keyboard adjusts the
strength of a sculpting brush
s alters the size of the brush and d
rotates the brush holding the shift key
alters the brush behavior to smoothing
and holding the control key inverts the
brush lowering terrain with a brush mask
instead of raising it if you'd like to
modify these key bindings
they can be rebound using unity's
shortcut manager
the noise brush can be used to create
many high frequency details across your
terrain
adding a bit of randomness to the
terrain mesh
the latest terrain tools also include
erosion brushes
that can simulate the effects of wind
water and thermal changes to the mesh
used in conjunction with other brush
parameters they can create
many highly realistic effects
delving even further into our tools we
have brush mask filters
these powerful brush filters can
parameterize your strokes
creating multi-layered inputs that make
creating dynamic effects
a breeze
once you have your terrain feeling like
it has a good rough placement of
features
you can move on to texturing one of the
great parts of the unity terrain
workflow
is that you have the ability to easily
iterate refine and
improve any part of the mesh at any
point with a solid understanding of the
texture system
you can then start refining and bringing
your scene to life
building a palette of terrain materials
in the layers tab
greatly simplifies terrain painting a
word to the wise
though it's important to understand that
the order of textures is easy to change
but you can easily cause potential
visual issues with the terrain mesh
changing the order after you've started
to texture
working out your palette beforehand will
make it easy to put your materials back
in order
should an accident occur with the order
of materials in mind
you should understand that when you
paint textures you are actually painting
a weighted index
into a splat map the terrain shader in
urp
can mix between an unlimited number of
terrain layers
however with height-based blending
enabled unity supports
four terrain layers and one splat map
you can save your texture palettes into
presets to easily set up terrain meshes
with similar
biomes and features terrain materials
themselves are a custom material type
that supports albedo
normal mapping and a special mask
texture with multiple features
the mask texture supports a metallic
value in the red channel
an ambient occlusion value in the green
channel
a height value which greatly enhances
material blending
in the blue channel and a smoothness
value
in the alpha channel if you opt not to
include the mask
channel you have metallic and smoothness
overrides for the whole material
the height value will only affect the
material if height based blending is
enabled
crucial to the look of any material are
the tiling settings
which include the size of the texture
and offset which will offset based on a
scalar quantity
relative to your texture size with your
basic setup complete
you can begin to define features in our
example
we are constructing a temperate forest
set on rolling hills
with clearly defined footpaths we have
green washes to define primarily wooded
areas
we also have mossy areas for the darkest
dampest portions of our scene
we have rocky patches that would collect
at the bottom of basin areas
cliff patches for more vertical sections
of the terrain where grass and moss
would be less likely to collect
and a couple of dirt materials for
sections that would get more foot
traffic
from people and wildlife more damp and
pock marked on the edges
more dried and cracked near the middle
whatever type of scene you're making
you want to try to think like nature and
factor how basic elements would interact
with your terrain
ask yourself where the sun hits where
water flows to
and where rocks would roll down to
coupled with
quality reference materials you can
really start to work out a logical
and harmonious relationship of your
scene elements
with your terrain coming together with
underlying textures
the next step towards making our scene
more believable
is to add trees and other vegetation to
the terrain
in the terrain component we now move on
from the brush palette
to the tree palette first you'll want to
hit edit trees
and we'll add a couple of the speed tree
trees that we have linked in the
description
since i'm building this scene for
desktop i'll be choosing
broadleaf desktop and conifer desktop
as my source models before we place any
trees
let's raise the random sizing range and
uncheck
lock width to height to get some extra
variation to the silhouettes of the
trees
just make sure you keep the numbers in a
reasonable range so you don't start to
notice
awkward deformation of the trunk and
branches
then select the broadleaf prefab from
the tree palette
click the mass place trees button to
rapidly populate the terrain
you'll see a dialogue with a tree count
for our quarter million cubic meter zone
fifteen hundred to two thousand trees is
about the correct number for a healthy
forest on this much land
with your first tree type populated
you'll notice that with a primary
directional light you have very harsh
black shadows
on the trees this is usually visually
undesirable
and happens because urp does not support
global illumination or reflection probes
for trees
you can mitigate this by adding a couple
of directional bounce lights
as children of your primary directional
light these can help reduce
obvious harsh shadows and even enhance
the underlying
shapes of your trees just make sure you
have a low
overall value of light toned to match
the overall color of the terrain
make some modifications to your tree
brushes size
and density and you can then move around
the terrain mesh
altering the placement of trees control
clicking to remove trees from
undesirable locations
and using regular click strokes to add
trees where they weren't previously
once you like the placement of your
broadleaf trees you can choose the
conifer trees
and begin to add some variety to the
forest with this mixture of shapes
in your own creations you'll want to
experiment with a mix of trees at
various stages of maturity but we can
still get some nice looks with just
these two variants
with trees down and shaped nicely around
our paths we can move on to the
finishing touches
with grass systems for our demo we're
going to keep things simple
and just use some grass and flower
texture billboards
add them to your palette
and with that done the workflow is
similar to painting tree placements
variety is key as is not making any
section
too dense you want to have enough
vegetation to break up the trunks of
trees
and make your hill shapes come to life
pops of color with flowers and even
drier colored grass
will make the whole scene much more
vivid without a lot of overhead
this is where reference either from
photos or even paintings
can inform your placement and help you
to find the sweet spot with the density
of billboards
unity also supports detail meshes so you
can add fully
3d foliage rocks and other items to your
terrain
in a very dynamic way with all of your
setup done and basic forms down now you
can spend the time
really moving around your scene using
the full spectrum of tools we've shown
to polish your scene to a high level
and even start testing some potential
gameplay
with your world set up you can quickly
add a wind zone that will bring the
trees to life
keep the settings on the lower end
otherwise it will look like a hurricane
simulation
subtlety can be very nice after all
let's add in some equally subtle
post-processing to enhance our final
image quality
and nail the desired mood take some time
to wander around your creation in play
mode
and appreciate what you were able to
build with the terrain tools
for more information about the terrain
tools follow the link below
thanks for watching
you