Create a game environment in Unreal Engine 4

Discover the secrets for constructing, texturing and lighting an effective real-time environment.

Using my Unreal Engine 4 project The Last Stop as an example, I want to show you some important steps to follow when creating real-time environments for video game production. These techniques and my workflow can also be used to create VR scenes.

In the following steps I'll show you how to start with an idea and a concept and then briefly cover the core steps of my 3D art process, such as modelling and texturing. There are some things to keep in mind with real-time engines and I'll share some tips about lighting and materials, too. 

I'll also be sharing some of my insights into blocking out your scene, organising files and handling texturing, both real-time using Substance Designer and in Photoshop CC – and why I like to use both for different reasons. Everyone has their own way of working in engines such as Unreal Engine 4, and many of these techniques can be applied to other apps.

For more details and settings, download my high-resolution step-by-step screens. 

Download the assets for this tutorial here

01. Get the story

When starting a project like this it's a good idea to sit down and think out a story behind it. This will help later on when doing different assets and adding personal touches to the scene. In my case, I want to have a scene that shows what happens when people have left and nature starts to grow unchecked. When thinking of the backstory I usually try to decide what year it is and where this scene could be located. This way it's easier to decide what types of buildings will be needed and what kinds of details to add.

02. Blockout

A basic blockout helps you plan the environment, the assets you need within it, and how it all fits together. Keep an eye on the scaling!

Once your backstory is figured out, it's time for the blockout. This is a simple 3D concept of the area and assets you want to make. There is no right or wrong way to do these, but it's important to keep scaling and proportions correct. 

I use 3ds Max 2014 and basic 3D primitives such as boxes and cylinders for placeholder models. Because primitives are easy to make, it's a good idea to do different versions of the scene to see what works the best. You can also import different objects into the scene – such as cars, trees or characters – to get a better idea of the scale.

Make sure your setup in 3ds Max matches the settings in Unreal Engine 4 – this will help avoid unwelcome surprises when you put it all together

It's a good idea to use a grid when you're doing blockouts that have buildings or mechanical objects because this will ensure that everything snaps nicely together in the game editor.

Here is how you can make sure that 3ds Max has the same grid settings that Unreal Engine 4 uses:

  1. Go to Customize and select Unit Setup.
  2. There, select System Unit Setup and select Centimeters from the menu.
  3. Select Metric and Centimeters as a display unit.
  4. Go to Tools, Grids and Snaps and select Grid and Snap Settings.
  5. In that window, select Home Grid and use Grid Spacing of 10.0cm.
  6. You can change the two values under that to make the grid bigger or smaller.

03. Organise the objects

Organise the objects in your scene into folders using 3ds Max's Scene Explorer – in complex environments this not only saves time but prevents confusion

Now that my blockout is done, it's time to start organising the objects. To help organise your scene you can create layers in 3ds Max Scene Explorer (found in Tools>Manage Scene Explorer). The nice thing about these layers is that you can hide part of the scene if necessary.

04. Modelling

Simply replace the placeholder models in your scene with finished objects built individually in 3ds Max to matching dimensions and exported into UE4

Modelling is easy thanks to the blockout. All I need to do is pick a placeholder model and replace it with my final model. 

My workflow is pretty standard for modelling but here are the most important stages to consider:

  1. Isolate the blockout placeholder model.
  2. Start to model the high-poly model and keep the dimensions inside the placeholder model. This way it will work well with the blockout dimensions.
  3. Keep good topology if possible – this will make it easier to create low-poly from high-poly and avoid visual errors.
  4. Use ZBrush for final details and organic shapes.
  5. When your high-poly is done, make the low-poly using the high-poly as a base or use retopology tools like 3ds Max's Graphite Modelling tools.
  6. Make good, well-placed UVs for the low-poly and make sure smoothing groups are assigned right.
  7. Explode the model into smaller parts for baking, if necessary, and then triangulate it.
  8. Bake maps as normal, height and AO maps.
  9. Give the low-poly model a suitable name – such as ‘Diner_Sofa' – and export it into Unreal Engine 4.

05. Real-time texturing

Using the same Substance graph in Substance Designer for all your props means they'll all have a consistent look and be very fast to make

Since game engines are now supporting Physically-Based Rendering (PBR), it's a good idea to find a fast and workable workflow for texturing. I find that Substance Designer is perfect for my needs and helped a lot with tiling textures.

When tiling textures in Substance Designer, my workflow goes like this:

  1. Figure out the big shapes first and focus only on height information.
  2. Slowly start to add smaller details to the heightmap and test how it tiles.
  3. Avoid making tiling too noticeable and make sure your heightmap holds all the information you need. Use levels to balance it if needed.
  4. Once the heightmap looks good, generate normal and AO maps, and use gradients to generate a base colour map.
  5. The final thing is to generate a roughness map. Use everything you already have and find the right feel for the materials. Avoid using 100 per cent black or white!


I also bake different maps from high-poly models to help with texturing objects such as cars, props, etc. I use xNormal for baking normal, AO and heightmaps, and Substance Designer for position and curvature maps. Substance Designer is a powerful tool for props because you use the same Substance graph for all of them. This way all the props have a consistent look and are very fast to make.

06. Texturing with Photoshop

Texturing models in Photoshop can also be quick – and allows for easy tweaks and variations – but you'll need to keep track of what you're doing

I use Photoshop for some minor textures too because it's a very fast way to texture models, but it needs more attention because of the PBR workflow. 

Here is my basic Photoshop workflow for texturing:

  1. Add baked maps into the document – this document will be the base colour texture.
  2. Render your UV wireframe, add that on top of everything, and lock it so you have a better idea where different UV islands are.
  3. Make base colours for different materials and give those layers suitable names.
  4. Use AO and normal map channels as a mask to add details. Normal map red and green channels make good masks with Photoshop filters and level tweaks. This works well for adding edge damage or a sun bleached look. Use these as layer masks.
  5. Start adding detail passes with hand painting or with photo source textures.
  6. Name everything and group layers so it's easier to find the right layers and keep this workflow consistent with all of the textures you're making.
  7. Duplicate content to a new document and make Roughness/Smoothness, Metal/Specular maps. Progress should now be easier because you have all of the information, so just delete or add details and play with levels, invert channels, etc.
  8. Keep testing textures as you go with a PBR renderer like Marmoset Toolbag 2.

07. Using the Material Editor

Create a few master materials from which you can generate instances as needed

Creating good textures is one thing, but blending them in-engine is another. Unreal Engine 4 has a very good material editor, which enables you to do pretty much anything you need for games and more. Real-time applications also have some limitations, so be aware that very complex materials will cost you a lot to render.

I create a few master materials that have a lot of functions and switches to help speed up the process. Then it's easy to create material instances out of the master materials and select which of the features to use. 

To help you work faster when creating materials, here are some things to keep in mind:

  1. Try to keep all the materials you're using as simple as possible because there is a limit what you can do in real-time.
  2. Name nodes and add comments so it's easier to see what different nodes are doing.
  3. When blending textures, make sure that you blend changes to all of the outputs like Base Color, Roughness and Metallic to get good results, and clamp values so blending works right and there aren't any visual artifacts.
  4. Use Static Switch nodes so you can turn different features on or off in your material instances. This way you can save performance in materials if you don't need some expensive feature to be enabled in every material instance.
  5. Check Shader Complexity to make sure materials aren't too heavy. You can find this in viewport View Mode under Optimizations.

08. Foliage

Build a foliage atlas so you can combine different grass types into one model

My project has a lot of foliage and I want to have a solid workflow for making the plants and grass. I end up modelling everything in 3ds Max. This way I can bake high-quality normal, base colours and AO maps. I pack them into texture atlases, so this way I can combine different grass types into one model and save on performance at the same time.

09. Building the level in Unreal Engine 4

Use the Paint tool to add foliage models to your scene

My workflow for this project is to export every model from 3ds Max to Unreal Engine 4 in .fbx format and use Unreal Engine's built-in tools for adding the foliage to the scene. 

Here is how I do it:

  1. Make sure you have pivot point in the right place with your models.
  2. Reset the scale and rotation of the object. In Max I used Reset Xform for this.
  3. Export the model in .fbx format into the correct folder in your UE4 project.
  4. In Unreal Engine 4, make blueprints for objects that you use more than once to make it easier to modify different parameters later on.
  5. Add textures to materials and assign them into the correct models and blueprints.
  6. Add foliage into the scene with the Unreal Engine Paint tool.

10. Stay organised

In Unreal Engine 4, I create folders to help keep things organised. I use the same kind of folder structure for models, textures and materials, so it's easy to find the right material for the right model. I also make sure that UE4's World Outliner is organised too. I make different folders – such as DINER, SHOP, OUTSIDE – and inside of these folders I add sub-folders: STRUCTURE, PROPS, EFFECTS. This helps a lot because the scene will end up having a lot of props and assets.

11. Terrain creation

Unreal Engine 4 makes it easy to combine separate elements

For the terrain, I use the procedural terrain generator, World Machine, by exporting the heightmap and using it in Unreal Engine's Landscape tool. I also add foliage on top of this and make small adjustments to make it fit better into the scene. 

12. Light the environment

Take time to get your lighting right

Lighting is the hardest part of a project. Bad lighting can ruin everything, so take time to get it right. Since Unreal Engine 4 is a real-time engine it's vital to keep the lighting as optimised as possible, because real-time lighting has a great impact on performance.

There are lots of things that affect the end results when lighting a scene, so it helps to know something about Unreal Engine 4's lighting system. UE4 has three modes for lights: Movable, Static and Stationary. Movable means the light source will be fully dynamic. You can move it at runtime and it can cast real-time shadows. This is very heavy but won't require baking lightmaps with Lightmass. Static is the opposite to Movable. It will be the cheapest because lighting information is baked into lightmaps that are overlaid on top of the models using a second UV channel. You can't change it at runtime. Stationary is in-between these two: shadows and bounced light are baked but you can still change colour and intensity at runtime. It's not as expensive as Movable but not as cheap as Static.

13. Baking the lighting

Control the lighting of interiors using Light Portals and placing spot lights to simulate directional light

I want my scene to run in VR as well as for a game, so with this in mind I decide to bake the lighting in a way that will not affect performance. 

So, my final lighting setup is:

  1. Stationary directional light as a sun.
  2. Skylight to give an illusion of bounced light. I used HDR texture for more interesting variations.
  3. For interior areas I used hand-placed static spot lights to simulate stronger sunlight coming through windows. I also placed Light Portals to tell Lightmass where to focus more.

14. Lightmass settings

Tweak your Lightmass settings for the best performance

After a few light baking tests, I find I need to tweak the Lightmass settings. You can find these in the World Settings tab. 

Here is what I changed my Lightmass settings to for the best performance:

  1. Since the scene interior parts use indirect lighting heavily I decided to boost Diffuse Bounce to 2.
  2. I also baked an AO mask that I could use to blend dirt and moss textures in materials.
  3. I set Num Indirect Lighting Bounces to 85.

15. Post processing

Tweaking post-processing effects is easy in UE4

The final thing for the scene is to add some colour grading. I usually leave this to last because then I can be sure it's not affecting lighting or materials. 

When I'm happy with everything else, then it's safe to start tweaking the post-processing effects. It's very easy to do in Unreal Engine 4. All you need to do is add a Post Process Volume and tweak the settings. I don't want to make my changes too extreme because I want the lighting and materials to do most of the work. I also want to have it affecting the whole scene, so I turn Unbound on. 

Here are my settings, but this stage is about finding the style you want, so experiment:

  • AO Intensity to 0.85.
  • Chromatic Aberration set to 0.3 and Vignette to 0.5.
  • Global Illumination changed to 4. 

This article originally appeared in 3D World issue 212; buy it here!

Related articles:

ABOUT THE AUTHOR

Kimmo has worked in CG for six years, creating environment art and indie game assets.