02 – first steps in UE4

Welcome back one more week!

On the last tutorial, we left our scenes ready to be exported into Unreal Engine 4. This time, we can continue from that point and start playing with our models in the game engine – while we also begin to understand how said software works and what tweaks we need to apply for it to give the best results. Without further ado, let’s get to it!

The first thing to do is to create a new project for us to work with. I would recommend to start with the ‘first person blueprint’ option, as it will come in handy later on. In spite of this, most of what we are about to do can be achieved with any of the starting options, so no worries over there.

Once we have started, let’s continue from where we left it last time and import the scenes we were working on. To do so, we only need to click on the import button, as seen below.

This slideshow requires JavaScript.

At this point, we might want to start thinking about folder management. The editor lets the user create folders and sub folders which can store the various assets of any project – models, textures, materials… This becomes a helpful tool as our scenes grow larger, since finding certain elements stored in the middle of a myriad of other things can become difficult.

Once we have imported our meshes, they can be dragged and dropped into the main viewport. As we said last week, some textures might have carried over if we applied standard materials in a certain way, but this isn’t usually the case. Moreover, there will be many textures who will not be connected by default, so we have to work on several fronts from this point onwards. Adjusting the lightmap properties, the material and the collision attributes will be the main fields we are going to tweak, and what we’ll cover today.

1/ Lightmap

The lightmap is a very important element, and adjusting its resolution is the first thing we are going to do. This map is calculated by Unreal, and it basically defines how accurate the shadows in an object eill be. For simple elements, a low resolution might work – let’s say 512 by 512 pixels. But once the geometry gets more complex, that value has to go up. Let’s check where can we find its properties.

This slideshow requires JavaScript.

As you can see, even for such an apparently simple mesh a resolution of 1024 x 1024 is needed. We could have gone lower, but since the overall scene won’t be overly complicated we can leave it at that. The values I usually move in between are 1024, 2048 and 4096, but I usually go with the one in the middle. 4096 will take some more time to calculate, and I only use it for complex geometries. I find 1024 ok for most simple objects.

2/ Materials

Oh, materials. They are the bread and butter of Unreal Engine’s 4 ability to show photorealistic graphics. And sadly for us, not much of the work we could have previously done in Max or Maya is going to help us here, since a lot of the textures won’t be imported. Let’s take a look at how to proceed here by creating a material from scratch for the mesh we imported last week.

This slideshow requires JavaScript.

Remember that table? We exported it, but not after we had carefully unwrapped it. This is going to be a major asset for us, since correctly unwrapping a mesh will be mandatory for the lightmap to work well and for the texturing process to move smoothly. Let’s take a look at the different elements that make up a material.

This slideshow requires JavaScript.

Base colour – this is the map that contains the albedo information, or in other words, the texture that carries the colour information that we observe in the real world. It is a texture that you’ve probably used many times before, and one of the few that can be carried over from Max or Maya. As a precaution, be aware that it doesn’t work exactly as in other render engines like Mental Ray or VRay for metals – for example, in a chrome object you might be tempted to paint the metal parts black, but over here you should colour them as what you would see in the real world (grayish or white).

Metallic – This material’s property tells Unreal how metallic an object is supposed to be. Lighter values will show a more metallic surface, while darker tones will do the opposite. Combining different shades can render a metal with different glossiness values, creating rust effects or other interesting appearances.

Specular – A value I don’t usually change, Epic Games – UE4’s creators – recommend leaving it at 0,5.

Roughness – This map tells the engine how blurry or sharp the reflections are. Contrary to the metallic property, a whiter value will translate into blurrier reflections, whilst darker images will result in glossier reflections.

This slideshow requires JavaScript.

With all of the parameters we’ve seen above, you are now ready to start making a lot of the materials you can think of. There are several other options we haven’t covered yet though, like making glass or other more complex materials, but we’ll cover those on a next tutorial dedicated to them.

After we cover those two main sections, we will be almost ready to ‘render’ the scene. Of course, Unreal doesn’t call it rendering, since it is a real-time software and we are not looking for a still image. What we will do next week is prepare the scene to build the lighting and be able to watch our models and our scenes at their full quality. Until then, hope this was useful!

See you next week,

Brais

Leave a comment