3D Artist
Dec
4

Create a real-time character

Tips & Tutorials
by
Safwen Laabidi

Learn how to create real-time hair, render a character with Marmoset Toolbag and integrate it with any engine


Create a real-time character

This tutorial was written by the amazing Safwen Laabidi and appeared in issue 113 of 3D Artist. Subscribe today and never miss an issue!

Tools used

ZBrush,
3ds Max,
Substance Painter,
Substance Designer,
Marmoset Toolbag,
Mari,
Photoshop

In this tutorial we’ll go through the process of making a real-time character that can be rendered in Marmoset or integrated in any engine, from creating a base model in ZBrush to the final details in 3ds Max. You’ll also learn how to create real-time hair from scratch. Following the usual pipeline used in today’s game industry, you’ll be using ZBrush, 3ds Max, Substance Painter, Substance Designer and Marmoset Toolbag.
The purpose of this tutorial is to give you an idea of how to create your own characters in a non-destructive way. We’ll include some tips and tricks to make really cool-looking hair and change its parameters procedurally. You’ll then have the means to create not just characters, but anything because this workflow can be applied to assets, environments and so on.

 

Step 01 – Base mesh block out


Create a real-time character

We’ll start things off with a base mesh. We’re not making our own because when you work in a studio it’s better to have a base to start from than to have to make a new one each time you create a character. For this character we’ll use a base mesh to add the main form and correct proportions without subdividing the mesh. This is important – most beginners want to dive into details as soon as they start sculpting without having a good form and some decent anatomy. After we get the correct silhouette, we’ll have to start adding subdivisions to work on the neck piece using the ClayBuildup, Trim Dynamic, Dam_Standard and Move brushes. We don’t have to use that many brushes to be honest, these ones are all we need to achieve the result that we want and for most cases, we try not to go into a lot of details when it comes to hard surface in ZBrush. Rather, we can do a clean retopology and finish the rest of the modelling process in 3ds Max to give us more control when adding panel loops and making the model as clean as possible.
 

Step 02 – Retopology phase


Create a real-time character

Now that we have a base to start from, we’re not going to worry about it in 3ds Max for the moment. Use ZSphere to do the retopology because it’s easy to use, plus it’s controllable. You can use other software if you want but ZSphere is enough for what we’re trying to achieve. Usually in hard surface, we will try not to add triangles and ngons in curved surfaces because you won’t get any pinches, especially because this character’s suit is highly reflective. After finishing the retopology, export the model to 3ds Max. In the next step we’ll see how we go about modelling the rest of the pieces.
 

Step 03 – Clean up the topology


Create a real-time character

After creating the rough sculpt, we’ll make a last check of the anatomy and the overall look compared to the original concept and some other references, but keep in mind that we’re not going to copy everything from the original, we have to add our own touch. Let’s export the pieces as an OBJ to 3ds Max for cleaning and remove all triangles and ngons to make sure that when we do an edge loop, it goes all the way around so that we can perform our edge control without any problems. We’ll use editable poly for extruding, adding chamfers and thickness to the hard surface parts.
 

Step 04 – Poly modelling


Create a real-time character

Now we have the clean topology to work with, we can start looking at references for ideas on how to treat areas such as the holes on the suit, the panels on the spine, details on her neck piece and the energy source in her chest. Refer to industrial design for ideas and break down the details to different levels. Start big and finish small. Try to change the shading of your geometry to check for pinching in your model. You can use a very shiny shader or just the standard 3ds Max material. We advise you to use a blue colour with a high specular intensity that will bring out any modelling artifact. To add thickness to the pieces, since the back face won’t be visible, instead of using the Shell modifier, click on all the borders and extrude twice. That way we’ll have thickness without extra polygons on the back.

 

Step 05 – Cable modelling


Create a real-time character

The first thing to keep in mind when modelling a sci-fi-looking cable is that you have to think about using a modular workflow in games. That means you model just a small part of the cable so that when you duplicate it to make a longer version, you won’t see the repetition, almost like texture tiling. Usually when modelling cylindrical objects you start with a cylinder. Well we’re not going to do that, so take a flat plane and gradually add details to it, add a Bend modifier with an angle of 360 to see how it looks and keep turning it on and off. After you finish with the modelling, draw a shape that will be the path of the cable and how it would look when connected to the character. After that, duplicate the part to your desired length and attach everything, add a Path Deformer modifier, click on Pick Shape and choose the spline you made. Now you have total control on the form of the cables.

 

Step 06 – Detail the suit


Create a real-time character

Now add folds on the suit to make it look like leather. Folds will give a natural feel even if it’s a robot. Export the mesh to ZBrush and since it’s leather wrapped around metal, it will not have that many folds, only around the connection between the shoulder and biceps. We’ll use the Dam_Standard brush with one simple stroke and then use Opt/Alt to invert the brush effect and do another stroke flowing. You can get references on Pinterest, just type ‘folds study’ and you’ll find a bunch of examples showing how clothes behave. Now we’ll focus on the parts that connect with other objects like the spine, so it feels like the leather is affected by those pieces, which is important for realism. Use the same brush along with the Smooth brush, but don’t oversmooth the mesh as we want the details to be sharp for a better bake in the texturing phase.
 

Step 07 – Emphasise the mechanical parts


Create a real-time character

When it comes to creating the mechanical objects, you always have to spend a bit of time thinking about what details you want in the actual geometry and also what details you want to add later using alphas. At this stage we’ll use the Masking tool along with Inflate to make those details. All you have to do is mask some panels and screw details. After you finish with masking, go to the Deformation settings and scroll down until you find Inflate Parameters. Once here, put in a value of 1 or 2. You can always use some custom alphas without manually masking the details, it’s just that in our model we don’t need to bother with that many details because it’s already detailed enough. If you wanted to add more, you can download or buy a mech brush and go crazy. However, before you do this, you need to understand that the more details you add the noisier your model will get, and that’s not ideal visually.
 

Step 08 – Unwrap your model


Create a real-time character

It’s time for laying out UVs. When you get to the unwrapping stage, the most important part is putting the seams in the right place. If you don’t take care with this, you risk having visible seam lines in your textures. But that’s not all – you also have to consider pixel density. This simply means that the biggest object needs the largest UV space. We’ll use the ZBrush plugin for most of our UVs since it’s awesome and very easy to use; it’s just a matter of clicking on Unwrap. What’s cool about this is that when you unwrap the mesh, you click on the Flatten button and you can use the Move brush to adjust the form and smooth it all inside the UV space. When you are finished, click on Unflatten to go back to your 3D view and then use the same technique for all the parts, including the head and the cables. Now export everything to 3ds Max to adjust the pixel density. All you have to do is add the UVunwrap modifier and use the Move and Scale gizmo to fix the scaling and the bad rotation of your UVs.
 

Step 09 – Prepare the character for texturing


Create a real-time character

As soon as you get to the stage where you have the UVs properly laid out with no visible seams and a good pixel density, it’s time to create the base colours of the model. When doing this, follow the reference in addition to adding your own personal touch. Because this model is not for games but real-time and we’re creating it for a still images, it means that we have a bit of freedom when it comes to texture resolution. We’ll separate the model to five UDIMS, which means that each of the five parts will have its own UV space. The benefit of this is that it gives us a good pixel density to work with.
 

Step 10 – Character texturing


Create a real-time character

We’re ready to start texturing, so will export everything to Substance Painter. Don’t forget to rename everything and assign different materials to each part. Now go to Substance Painter; all we have to do at this stage is add some fill layers with a basic colour to get a feel of the end result without details, and match the references with some guesswork since we don’t have that many viewpoints, only one. Try to avoid colour picking from the actual references because you won’t get the correct colour. Keep in mind the reference contains lighting information along with reflection highlights and so on.
 

Step 11 – Texture detailing


Create a real-time character

Before we start any detailing we’ll check references from real life. That way you’ll learn a lot about how different shades react to the surrounding environment. If you go into detailing from your imagination, you will always get a non-realistic result. Even though our character is a bit stylised, we want some realism. Most people will always use a generator without changing anything – a generator is a way of smart masking your layers using surface information from the map. These maps will tell the generator where to put the damages on your model. It’s easy to use but when you always apply it in the same way, all your work will look the same, so let’s make our own generator in Substance Designer. To create details you just pick a lighter colour than the main colour, for example the black part of the suit. Since it’s black we create a lighter colour like a dark grey and put it under it. Then go to the top layer (the black layer), add a white mask and add the generator. In this case we’ll choose our generator and mask the edges of the top layer using a costume grunge made in Substance Designer, and that’s pretty much it. All of the details, whether it’s dirt or oil or any damaged areas, we’ll make using smart masking or hand paint any specific details that we want to add.
 

Step 12 – Polypaint the face


Create a real-time character

When it comes to the face, we’re not going to do the same workflow as with the rest of the models – we’ll split it into two parts. First we add the main colour of the skin in ZBrush. Find some references to understand the different tones of the face. After that we’ll convert our paint into textures and then export it to Substance Painter to add the make-up and skin details. We’ll create a fill layer with a noise generator to add some skin imperfections, another fill layer for the tattoos next to the eyes and now we’ll use the ambient occlusion of our mesh to add some redness. You can do that by adding a fill layer with a red colour similar to the blood colour and use the AO map as a mask. Don’t overuse it, just around 10 per cent opacity is fine as we’re not going for a realistic texturing.

 

Step 13 – Prepare real-time hair


Create a real-time character

Here you want more control to twist and change the length of the hair cards without stretching the geometry, so we’ll use 3ds Max to create shapes with the awesome Polydraw tools in the Freeform section. You’ll use strips instead of spline, that way you can take the strips to ZBrush to adjust the haircut and when exported back to Max, create splines from those strips using a technique without any scripting. All you have to do is select all the edges of those strips, then click on the borders in editable poly, click Alt and deselect the borders. This way you will have only rings, click Connect and it will add one edge in the middle of each strip. Create a shape from the selection and there you have it. Spline from strips after you’re satisfied with the haircut form.
 

Step 14 – Create the hair strand


Create a real-time character

Now we’ve got the main shapes in place and are happy with the haircut, we’re going to start modelling the hair strand. This is simple polygon modelling and we start with a simple plane. Extrude from the start of the planes to make the hair look curved, then use FFD 3 to taper the end of it. We’ll make three different hair strands with a different length, three small ones and a long thin strand to make the hair look a bit messy and less computer generated. Now that everything is in place we’ll unwrap the cards – it won’t take a lot of time since it’s only seven strands. Let’s make the haircut look good. Select the strand and add the Pathdeformer modifier of 3ds Max. This modifier makes the selected geometry follow the path, in this case the spline created in Step 10. We keep duplicating the hair and that way all strands can share the same UV space. It will save a lot of time when it comes to texturing. After we finish the hair we’ll export the geometry only to ZBrush to work more on the haircut using a simple Move brush, and maybe some more duplications of the strand using the Transpose tool to fill the gaps.
 

Step 15 – Make the high-poly hair


Create a real-time character

The first thing we do before starting the texture is take the six strands to ZBrush, go to ZPlugin and open the UV Master. Since the strand already has UVs, just click on Flatten and that way UV Master will turn the UVs into geometry so we can paint hair on top. Select the Curve Tube Snap brush and adjust the settings of the tapering so that when we create the hair, it will taper at the end. You can change the settings by going to Stroke Curve modifier, activate the size and play with the curve until you get the desired effect. Now start painting the hair but keep in mind that after you paint the hair, choose the Move Topological brush and keep moving the strand randomly on the z axis. That way when you bake the zdepth map or ambient occlusion map, you will get depth in the texture and it won’t be flat when you finish. Delete everything but the painted hair.
 

Step 16 – Texture the hair


Create a real-time character

Now we have what we need to start creating our texture but before we do that, we need a base to start from. That will be the baked maps such as alpha and zdepth and so on. So the first two maps we have to bake is in ZBrush. It is easy to do the zdepth map because it is created by going to the alpha of the brush and clicking on grabdoc. It will automatically create a height map for you. To create the alpha map, you just have to click on PBR render and you’ll get a clean alpha. After creating the two maps we’ll export the high-poly hairs and created a basic plane to use for baking the rest of the maps (normal, ambient occlusion, position map and so on) in Substance Designer. When we finish baking we create a basic graph in Substance Designer. Now we have a procedural texture that can be exported as a Substance file, which can be opened in Marmoset Toolbag, Unreal Engine, Unity and so on. The graph is simple enough for anybody to make; it controls factors such as the hair colour, normal, intensity and roughness. The alpha map is blended with the depth and the ambient occlusion map to fade the different strands of hair to look more realistic and work better for antialising.
 

Step 17 – Shade and light


Create a real-time character

Now all we have to do is export the maps from Substance Painter and plug each map in the proper slot, apart from the hair shading, which is a bit different because we used Substance Designer. We’ll load the SBSAR file we made; click on the material of Marmoset Toolbag, scroll down to Extra, pick Substance and load it. Now everything is done. The lighting will be a bit tricky because none of the standard HDRI that comes with Marmoset will give the result we want, so we have to look up some online until we find one that provides good reflections. For the face, we want to guide the viewer’s eyes directly to the face so we’ll put the brightest light on the right side using the Rembrandt technique, only not so obvious. Just a small hint of the triangle on the left eye and we’ll mix this technique with the warm vs cold workflow, but also not too much since it’s a sci-fi character. You’ll have to add more lights with different colour variations but at the same time, keep them close to the warm and cold. The rendering part is the easiest part thanks to Marmoset Toolbag 3. You don’t have to do much, just activate all the settings with the resolution that you need, activate the GI and hit Render.