Procedural Terrain Generation with Unity
4.5 (577 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
6,108 students enrolled

Procedural Terrain Generation with Unity

Programming realistic environments with C# through the algorithmic manipulation of mesh and vegetation data.
4.5 (577 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
6,108 students enrolled
Last updated 12/2019
English
English [Auto], Indonesian [Auto], 3 more
  • Polish [Auto]
  • Romanian [Auto]
  • Thai [Auto]
Current price: $13.99 Original price: $19.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 15 hours on-demand video
  • 17 articles
  • 23 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Use various algorithmic approaches to create procedurally generated content.
  • Manipulated terrain meshes with code to create realistic looking landscapes.
  • Texture terrain meshes procedurally.
  • Discuss the design principles involved in producing aesthetically pleasing terrains.
  • Manipulate the render settings in Unity to produce better looking camera results.
  • Create custom Unity windows and graphical user interface elements for use inside the Editor.
Course content
Expand all 85 lectures 15:07:51
+ Introduction
4 lectures 04:24
How to Study This Course
00:37

H3D has a bustling online student community.  Here's how to get involved.

Preview 01:15

This video is a short introduction to the course content.

Preview 02:06

This article addresses common general questions about my courses.

FAQs
00:25
+ The Unity Terrain Object
10 lectures 02:02:41

This lecture examines the data structures involved in the storage of a terrain and then gives an overview of the Unity Terrain object.

Preview 05:04

In this two part lecture we will step through all the existing terrain creation tools implemented in Unity to give you a better feel for what's possible.

Manual Terrain Creation Part 1
18:27

In the second half of this two part lecture we will examine the adding of details to a terrain and finalise our discussion on the terrain object.

Manual Terrain Creation Part 2
13:31

In this lecture we will examine some of the design principles that will help you take your terrain design skills to the next level.

Design Principles for Terrain Aesthetics
09:38

For this challenge you should recreate your favourite vista as a Unity Terrain. 

Landscape Reproduction Challenge
03:34

Test your knowledge about Unity Terrain Object.

Quiz 1
10 questions

In this lecture we will begin by getting the Unity environment ready for creating a custom editor that will be used to control the terrain settings.

Getting Ready to Create a Custom Editor
16:30

In this lecture we will create the code for our first customised part of the editor and hook it up ready to implement a random height creation algorithm.

Generating Random Heights Part 1
19:56

This lecture continues the development of the first custom editor for the terrain and now concentrates on your very first procedural algorithm for modifying height values.

Generating Random Heights Part 2
19:24

In this lecture we'll use height data from real world geography and load it in as an image to set the heights on a terrain.

Loading Height Map Data from an Image
16:31

Test your knowledge of the Unity Terrain Object

Quiz 2
18 questions

Completed code developed to this point.

Solution Code
00:05
+ Perlin Noise
6 lectures 01:05:23

In this lecture we will take a look at the theory behind one of the most popular algorithms used for creating terrain.

Noise Theory
05:58

In this lecture we will implement a simple version of Perlin Noise and use it to adjust the height map for a terrain.

Implementing Simple Perlin Noise
19:09

This lecture builds on the last introducing the idea of adding several Perlin Noise functions together in another popular algorithm called fractal Brownian motion.

Brownian Motion
18:00

This is a short lecture explaining how to pad out the area around the GUITable if you run into troubles later on.

A Quick Note About GUITable Code
02:14

In this lecture we will create a table of Perlin Noise parameters in the inspector and pass them to a new method for adding multiple curves to a terrain.

Multiple Perlin Noise
19:57

Completed code developed to this point.

Solution Code
00:05
+ Voronoi Tessellation
6 lectures 01:05:53

This lecture provides a quick introduction to Voronoi Tessellation and explains how the phenomena can be replicated to create mountainous landscapes.

Preview 02:48

In this lecture we will create a procedurally generated peak with surrounding sloped terrain inspired by Voronoi tessellation.

Creating Mountain Peaks
19:25

In this lecture we will examine the use of mathematical functions to alter the slope types created on the side of mountains.

Modifying Mountain Slopes
19:29

This lecture begins with a challenge to see if you can complete the functionality of the Voronoi component by yourself.  It then continues by providing a solution and suggesting ways to integrate Voronoi peaks into terrain creation.

Multiple Random Peaks
13:32

This lecture will take you through the process of integrating multiple functions into the code to use with the voronoi peaks.

Adding a Choice of Function Types
10:34

Completed code developed to this point.

Solution Code
00:05
+ Midpoint Displacement
6 lectures 01:02:10

In this lecture we will begin looking at a popular terrain generating algorithm called Midpoint Displacement.

Preview 01:58

In this lecture we will start building the Midpoint Displacement algorithm and concentrate on the Diamond Step.

The Diamond Step
18:54

This lecture continues the development of the Midpoint Displacement Algorithm by adding in the Square Step.

The Square Step
19:58

This lecture will discuss the creation of a smoothing algorithm to rid your terrain of sharp peaks.

Smoothing Part 1
15:18

In the second part of the smoothing lecture we will examine how to add a smooth amount to the algorithm.

Smoothing Part 2
05:57

Completed code developed to this point.

Solution Code
00:05
+ Texturing
12 lectures 02:15:21

This article will explain how to update the code in this section to deal with changes made to the terrain structure in Unity V.2018.3

New Splatmap format for Unity V.2018.3
00:11

In this video we will start exploring the use of textures for colouring the terrain and develop code to add them for use by splatmaps.

Splatmaps
19:30

In this lecture we will add the logic to our code to develop the blending functionality of the splatmap to draw different textures at different terrain heights.

Specifying Texture Heights
12:52

In this lecture we will look at how to feather and blend the edges where two textures meet on the terrain.

Blending Texture Overlaps
19:51

In this short lecture I will show you how to expand the available space in the inspector editor by adding a scrollbar.

Running out of Room in the Inspector Editor?
04:28

In this lecture we will extend the splat map functionality to restrict certain textures to be placed on terrain based on the steepness.

Texturing on Steep Terrain
19:59

In this video we will create an editor window and give it the functionality to display a procedurally generated texture.

Creating a Procedural Texture
19:37

In this lecture we will modify the noise algorithm being used to develop a seamless texture.

Making a Seamless Texture
12:37

In this lecture we will add saving functionality to the editor window to save the generated image to a png file in the Asset folder.

Saving a Texture into the Assets Folder
04:23

Sometimes the resolution of the final image isn't quite what you'd like.  In this lecture we will add extra features to improve the image quality.

Modifying Global Pixel Values
13:35

Completed code developed to this point.

Preview 00:05

This exercise will challenge your knowledge of height maps and editor coding.

Displaying Heightmap Challenge
08:13
+ Vegetation
7 lectures 01:20:14

In this lecture we will start working with the data structure that holds the information about trees and other vegetation.

Working with Tree Prototypes Part 1
15:16

In this second part of this lecture we will start placing trees on the terrain with code.

Working with Tree Prototypes Part 2
17:06

In this lecture we will create an automatic layer adding method to assign the terrain object to a physics layer for later raycasting.

Working With Layers
12:12

In this lecture we will use ray casting to locate the true height of the terrain below vegetation objects for accurate positioning.

Setting Tree Heights
14:30

This lecture starts by presenting a challenge to produce and interface that will allow full customisation of the vegetation on the surface of a terrain.

Setting Tree Properties
19:59

This article will explain how to adjust your code to deal with resizing the terrain in the Inspector.

Fixing Tree Positions for Differing Terrain Scale Sizes
01:06
Solution Code
00:05
+ Details
4 lectures 46:42

In this lecture we will examine the detail map system and start populating the terrain with grass and rocks.

Adding Detail
19:59

In this lecture we will examine how to add in height and slope ranges to the placement of detail as well as modify the visibility distance.

Detail Settings
19:06

In this lecture extra properties will be set to modify the appearance of the surface details.

Preview 07:32

Completed code developed to this point.

Solution Code
00:05
+ Water
4 lectures 50:08

In this lecture we will add a water object to the terrain through code.

Adding Water
13:05
In this lecture we will start building a procedural mesh to follow the shoreline of a terrain.
Shoreline Creation Part 1
19:59

In this lecture we will continue building the shoreline by combining the quads into a mesh and adding an animated texture.

Shoreline Creation Part 2
16:59

Completed code developed to this point.

Solution Code
00:05
+ Natural Exposure
9 lectures 01:27:37

This lecture introduces the types of erosion that will be implemented as algorithms in this section.

Erosion
01:40

In this lecture we will setup the inspector editor with erosion parameters and then create the most simplest of the erosion algorithms, rain.

Rain
13:36

In this lecture we will add the functionality to simulate thermal erosion on our terrain.

Thermal
11:22

In this lecture we will examine areas where the water plane is added and create an algorithm to erode away shorelines.

Tidal
05:06

In this lecture we will examine one of the more complex erosions systems that can be simulated on a terrain; running water.

River
14:55

In this lecture we will add in the functionality to erode the height map of a terrain by simulating wind.

Wind
15:33

In this lecture we will extend the wind algorithm to allow for the specification of a wind direction to cause the ripples to form in different ways across the terrain.

Wind Direction
09:38

In this video you will be challenged to create a canyon that makes its way across the terrain.

Canyon Challenge
15:42

Completed code developed to this point.

Solution Code
00:05
Requirements
  • You should be familiar with C# and the Unity Game Development Engine.
  • You should have a healthy respect for mathematics.
  • You should be fascinated by procedural generation and what it can accomplish.
Description

The creation of beautiful virtual terrains isn't just the domain of the artist, but also of the programmer. What if you could use your programming skills in C# to manipulate a mesh to create realistic landscapes, using algorithms developed by researchers studying landscape formation and erosion? Well now you can.

In this course, Penny introduces procedural terrain generation techniques using her internationally acclaimed holistic teaching style and expertise from over 25 years of teaching, research and work in games and computer graphics. Throughout the course you will follow along with hands-on workshops, designed to teach you the fundamental techniques used for generating realistic virtual landscapes.

Learn how to program and work with:

  • Voronoi Tessellation

  • Midpoint Displacement

  • Perlin Noise

  • Splat Maps

  • Trees and Vegetation

  • Clouds

  • Weather

  • Erosion

  • ...and water

Contents and Overview
The course begins by examining the nature of a landscape and the design considerations you should include in making decisions on structure, colour and vegetation. You'll learn what makes for a natural looking terrain, so you can replicate this in Unity.

Following on, we will examine some of the most popular algorithms used in generating terrains (including many fractal and tessellation techniques) that can be used together, to form random and yet convincing mountainous vistas.

Once you are confident with landscape formation, we'll move onto texturing the terrain with a variety of images that can be placed via splatmaps onto differing heights and gradients. Then, continue to decorate the terrain with trees, rocks and grass placed with an algorithmic approach before investigating erosion methods, that will add that extra level of realism.

The course concludes with the development of a cloud generation system and an exploration of particle systems for adding rain, snow and other atmospheric effects to the finalised landscape.

Throughout, we'll be developing our own custom Unity editor code that will allow you to build extra functionality and structure into the Unity Inspector, as well as create Editor Windows of your very own.

What students are saying about Penny's courses:

  • Penny is an excellent instructor and she does a great job of breaking down complex concepts into smaller, easy-to-understand topics.

  • Penny's teaching style is exceptionally well-motivated and illustrated.

  • This course is awesome. The lecturer explains everything you need to know and encourages you to experiment and challenge yourself.

Who this course is for:
  • Anyone interested in learning the algorithms used in procedural generation.
  • Those wanting to develop code to manipulate meshes, to produce realistic landscapes.
  • Anyone keen to find out how to write custom Unity inspector editors.