Sunday, 14 February 2016

Unreal Engine 4 environment creation

Landscape and terrain


Unreal Engine 4 environment creation playlist -

Landscape painting

Creating Landscape Materials -

RATSGAME UE4 Landscape Materials playlist -

Terrain creation (advanced version of landscape)

Rather than using Unreal Engine's landscape system it is possible to create a terrain which can be thought of as a large geometry mesh which can have materials applied almost like any other mesh. This mesh can be divided up to allow using of techniques such as LOD. World Machine ( is a great tool for creating/generating terrain that can be imported into UE4.

Weight maps can be used to control how materials are applied to the terrain. They are quite low resolution, but in combination of using height maps the materials can be blended together more naturally.

GDC 2015: Creating the Open World Kite Real-Time Demo in Unreal Engine 4 -

Lighting and Shadows (WIP)

Lightmass Global Illumination

Ray Traced Distance Field Soft Shadows

Distance Field Ambient Occlusion

Unreal Engine 4 Twitch Broadcast - Soft Shadows & Subsurface Scattering -

Places to look for important settings/features

Lightmass Settings in World Settings
Static Lighting Level Scale - lower value = more contrast/deeper shading

  • Light and Distance Field Ambient Occlusion tabs
  • sky distance threshold to 1
  • uncheck the low hemisphere is black (to get some fake "bounce light" from the ground)

Foliage (WIP)


When creating foliage it needs to be thought of and split into 2 sets:
  1. Foliage - normally larger objects like tress and rocks that have collision which are manual or procedural placed
  2. Grass/Vegetation - smaller objects like grass, flowers and pebbles that have no collision and placed through material placement
Setup and Creation

My recommend tool is Speedtree for UE4 ( allows semi-automatic generation of foliage such as tress and bushes, but manual creation for grass by simply applying textures to polygon planes.

Creating Models For UE4 (SpeedTree) -

Unreal Engine 4 foliage creation playlist -

Advanced features

To get the best results on foliage I enable Distance Field Ambient Occlusion and update the following settings on the mesh's Build Settings (hidden drop down under each LOD in the asset viewer):
  • Enable Generate Distance Field as if Two Sided
  • Increase Distance Field Resolution Scale to improve AO quality

The slider on the left shows the difference when Generate Distance Field as if Two Sided option is toggled and the left slider shows the difference when Distance Field Resolution Scale is increased which brings back some of the depth lost when enabling the two sided option. I found that values above 5 did not really increase visual quality, but did massively increase the time taken to generate the distance fields.

NOTE: you must enable the option for instanced foliage if you want to paint foliage or use the procedural foliage spawner system. This can be found in the Modes window under the Foliage tab, after selecting a foliage type, scroll down to the Instance Settings rollout and check the option for Affect Distance Field Lighting. This does need to be done for each foliage type which will use DFAO.


UE4 - Forest -

UE4 SpeedTree Forest -

UE4 - SpeedTree - DFAO/GI test -

UE4 SpeedTree dynamic day cycle -

[FREE] Foliage Starter Kit -

Creating roads, paths, fences etc

Landscape Splines -

DokipenTechTutorials Unreal Engine Spline Road Tool Tutorial playlist -


Water Surface Overview in UE4 -

Gaming and Engine Tutorials Water Tutorials Unreal engine 4 playlist -

Level building

Building the Glass Walls (v4.7) -


Creating a quick Unreal Engine 4 desert scene -

Creating a quick Unreal Engine 4 Night/Lake Scene -

Creating a quick Unreal Engine 4 Valley Scene -

Other tips

Adding Atmospheric fog to enable light shafts -

Good examples of environments and levels developed in UE4

Breaking Bad Cabin Environment [UE4] -

Unreal Engine 4 - Ghosts'N Goblins -

UE4 - Trailed - Walkthrough - StudentProject - NAD -

P.T. recreated on Unreal Engine 4 -

UE4 - Snow 2 by koooolalala -

UE4 - Forest by koooolalala -

Understanding and adapting to a Physically Based Rendering (PBR) workflow

So Physically Based Rendering (PBR) is here in a big way with Unreal Engine 4, Unity 5, Quixel Suite 2 and Marmoset Toolbag 2 but a few to name that now use this workflow as standard. It's quite a lot to take in, but not too hard to understand once you get going with it. Rather than try to explain what the differences are and what you need to do to adapt, I think it's more useful to just list the materials I found while learning this new workflow, as there's others out there that have already done that job.

Reading material

Physically Based Rendering Encyclopedia -

The above link covers most of the other materials I have read and listed below but it's also worth reading the rest as it may cover different tools and techniques in your own workflow.

Physically Based Rendering in Substance -

Allegorithmic PBR Guide Playlist -

Texture Maps Explained - PBR Workflow -

Physically Based Texturing -

Tutorial: Physically Based Rendering, And You Can Too! -

Basic Theory of Physically-Based Rendering -

Tutorial: PBR Texture Conversion -

Allegorithmic - The Comprehensive PBR Guide -

Physically Based Materials (Unreal Engine 4 documentation) -

PBR Texturing Techniques -

Offers a library of ready to use maps for use in a PBR workflow. Although not free, at the time of writing they do offer a 14 day free trial which includes 75 or 200 material downloads which is very generous and helps you get started with this new workflow and for $19 and $30 per month after that it seems like a fair deal.

Allows you to take a set of maps from alternative workflows and convert for use in PBR. This is not just a plug everything in and hit convert process though. You will need to provide the required inputs to get good results and spend some time tweaking. drag and drop Substance system -
The website now offers downloads of substances which can be quickly imported into Unreal Engine and Unity via drag and drop.

Need to create extra texture maps?
If you have a normal map then NDo has a built in feature to take a normal map and output a variety of different maps including AO, height, specular and cavity -

For the workflow converter you will also need a gloss map. These are easy enough to produce and this video shows the basic procedure - How to create a gloss map from a diffuse map

Workflow Tips

Albedo map creation

Manual process using Photoshop

How to Make an Albedo Texture from a Diffuse Texture -

Process steps:
  1. open diffuse map
  2. create a duplicate layer of the diffuse map. ensure the new layer is above the original
  3. fully desaturate (CTRL + U or add an adjustment layer) the duplicated layer to create a cavity map
  4. invert (CTRL + I) the duplicated layer, so that dark areas now show as light
  5. change blending mode of the duplicated layer to Soft Light
  6. make any changes to saturation etc of original map (if required)
  7. using the luminosity values chart below select the value most appropriate to the type of material
  8. open the histogram and ensure the expanded view is selected by clicking the arrow and four lines in the top right of the window and set Channel to Luminosity in the drop down
  9. take note of the median value
  10. adjust the levels (CTRL + L or add an adjustment layer) of the original map (or the overall new texture) so that the median level comes close to the luminosity value from the chart
Semi-automated process using ShaderMap

Creating an Albedo Map from a Photographic Texture -

Luminosity value guidelines
Material            Linear value  sRGB value  photoshop    source          
                                              median value
Brushed Metal       0.02          0.16                     [2]
Charcoal            0.04          0.22                     [1]
Fresh asphalt       0.04          0.22                     [1]
Rubber              0.04          0.23                     [2]
Black acrylic paint 0.05          0.25                     [3]
Coal                0.05          0.25                     [2]
Leaves              0.05          0.26                     [2]
Rust                0.06          0.27                     [2]
Plastic (glossy)    0.10          0.36                     [2]
Painted metal       0.12          0.38                     [2]
Rough steel         0.13          0.40                     [2]
Worn asphalt        0.12          0.38                     [1]
                    0.15          0.42                     [3]
African tanned skin 0.15          0.42                     [3]
Bare soil           0.17          0.44        112          [1]
Dirt                0.17          0.45        115          [2]
Plastic (rough)     0.19          0.48                     [2]
Brick/Concrete      0.23          0.51                     [2]
Dry clay soil       0.23          0.51                     [3]
Mud                 0.23          0.52                     [2]
Green grass         0.25          0.53                     [1][3]
Plaster             0.25          0.54                     [2]
Canvas              0.27          0.56                     [2]
Old concrete        0.30          0.57                     [3]
Wood                0.31          0.59                     [2]
Red clay tile       0.33          0.60                     [3]
Rock                0.33          0.61                     [2]
Desert sand         0.40          0.65                     [1][3]
Satin               0.43          0.69                     [2]
New concrete        0.50          0.72                     [3]
New concrete        0.55          0.76                     [1]
Clean cement        0.55          0.76                     [3]
Ceramic             0.57          0.78                     [2]
Ocean Ice           0.50–0.70     0.73-0.85                [1]
White cement        0.70          0.85                     [3]
White acrylic paint 0.80          0.90                     [3]
Fresh snow          0.80–0.90     0.90-0.95                [1][3]
some values converted using