Rookie Awards 2024 - Open for Entries!
Auckland Train Environment in Unreal Engine 5 Beta
Share

Auckland Train Environment in Unreal Engine 5 Beta

John Dempsey
by harbourscape on 24 May 2022

Creation of a realistic Auckland Train Environment in Unreal Engine 5 Beta.

1 395 0
Round of applause for our sponsors

Cinematic Flythrough of completed environment

Introduction

Just before Christmas 2021, I purchased several tutorials from FlippedNormals including "Creating a Metro Train Interior in Unreal Engine 5" by Emiel Sleegers. I wanted to try to build a complete environment from scratch and I thought that this type of self-contained, closed environment would be a good start. It also would serve as a good introduction to Unreal Engine 5 and technologies such as Nanite and Lumen.

Upon completing the 19 hour tutorial, I felt inspired to get started so I went out and took lots of pictures of the inside of an Auckland train. From overview shots to details of decals, seat patterns, carpets etc. This became my reference board in PureRef and the basis for creating the seat material and all of the decals later.

PureRef Reference Board

Blocking Out

I first blocked out the train with the main aim that it was at the correct scale and that each module had an exact grid size*. This gave me a good template to start refining from.

I used a basic male model 1.8 metres high to assist in judging the measurements. Once happy with the blockout, I moved on to modelling the detail of the different pieces, solving issues as they arose.

*(This would allow easy snapping in UE much later)

Mocking up

In order to make sure that everything was going to snap together correctly in Unreal Engine, I mocked up the environment in Blender as I was modelling. I used a single "master" instance of each module and duplicated them in exactly the same way as would occur in Unreal. This allowed me to spot many issues and fix them before I got too far into the process.

Modular Pieces

Perhaps the most difficult part of this project was the modularity. I wanted to create a small set of modules that could be reused and snapped together to create the environment. Determining the parts required and exactly where to cut (particularly the interface between the door section and a carriage) was really challenging. What was particularly unexpected was having to make decisions regarding how the environment should vary from my reference in order to suit my requirement for modularity.

Below are the final set of modular pieces used to make the whole train (excluding decals). Note that to save excessive geometry and because the outside of the train is not seen, all of the carriage objects are single-sided.

UVs and Texturing

From early on in the project I knew I wanted very high quality stills at 4k resolution, even if the subject was very close. For this reason, I opted for a texel density of around 1024 px/m, a number which I kept consistent across all objects by using Zen UV and UV Packmaster.

After modelling, I created seams and unwrapped the objects, minimising stretching and hiding seams wherever possible. I seperated different areas of polygons into different logical texture sets to minimise wasted texture space, this meant making use of a UDIM workflow. I used both materials and vertex colours to assist me in the texturing process later.

Materials - Areas that belong to the same texture/UV set.

Vertex colours - Each vertex colour is an area of different physical material, regardless of texture set. Used for masking.

Texturing in Substance

From here, I exported my different modules so that I could texture them. I used Substance Sampler to create a fabric texture from a photograph of the seat texture and exported it for later use. I systematically textured each module. Wherever there was a texture that was widely used (e.g. white plastic, carpet etc.) I created a smart material so that I could drag and drop to any other modules that required it.

Detailing

For minor details that did not require extreme close ups, I created alphas to stamp material information into the surface of the train. This can be seen in screws, grills, vents, small signs etc. For other items such as large posters and maps, decals were used. (see later)

Exporting

I used the industry standard for game textures by combining Ambient Occlusion, Roughness and Metallic maps into the R, G and B channels of a single texture which could be split back out in Unreal. The large number of assets and textures involved meant that managing the folder organisation and naming was very important.

Finally, to Unreal!

After all that hard work, I finally got the chance to import my assets, stage and light the environment and build shaders in Unreal Engine 5 Beta. Of course this wasn't a straightforward process and when I noticed an issue I sometimes had to return to Blender, fix the issue, re-UV and export, rebake in Substance and export the textures to reimport to Unreal!

Nanite and Lumen

When importing my assets (apart from the glass panels) I opted to create Nanite objects. This allowed Unreal to dynamically take care of the optimization/ poly count of the meshes based on the distance from the viewer. At the time I was doing the project, Nanite did not work with transparent materials.

Because I wanted a high quality result, I opted to use Lumen with hardware ray tracing. This meant that I only had to create lights. No reflection captures or light baking were required.

Material Hierarchy

Where possible, I created a hierarchy of materials where there was a set of base materials which implemented the core functionality relevant to all shaders (such as the RGB unpacking) and created material instances based on these.

Object Hierarchy

Similar to the material hierarchies, I also created base objects which were instanced into the scene rather than have multiple copies of the same mesh.

The finishing touches - Decals!

When I was happy that I was in control of the staging and I had fixed all outstanding issues, I returned to Blender and built a decal atlas using DecalMachine which contained all of the posters and other related items that decorate the train. I created decal meshes using this atlas and brought those simple meshes into Unreal and created a shader for the decal material.

Creating Portfolio Renders and Cinematic Flythrough

At the end of the process I was hugely proud of what I'd achieved so it only remained for me to create some portfolio-worthy content! I'm a photographer so I loved placing different cameras around the train and adjusting the settings to get the shots I was looking for.

Finally I decided to create a cinematic flythrough using an Unreal camera rig and rail. When the sequence was rendered out, I used Blender to create the final movie from the image sequence.

What did I learn?

This was a huge project for me and one that at times was frustrating. During the 3 months I worked on this, I hit many issues which I had to figure out how to fix in order to progress. With each hurdle I overcame, there was learning and a sense of satisfaction. I'm proud that I kept going and got the final result that I did.

Learning 1. Iteration

Even if you try your best to complete a project like this in a certain order from end-to-end, it won't happen like that! There will always be things that crop up at the end of the process that require going all the way back to the modelling software and all the way back through the process!

Learning 2. Continuous Learning

Quite a lot of this project involved me doing things I hadn't done before. I just kept going and if I came across something I didn't know how to do, I taught myself how to do it. I think that continuous learning is a must in an industry that is so vast and ever-changing.

Learning 3. Take a break!

Sometimes the best thing you can do is step away and take the dog for a walk. It's amazing how many times you can immediately solve a problem if you take yourself away for a bit.

Learning 4. Organisation is critical

As the size of the project increases, it becomes critical to keep organised. This applies to absolutely everything that gets generated in the process. You always need to be able to know at a glance what everything is otherwise it would become unmanageable very quickly.


Comments (0)

This project doesn't have any comments yet.