Demersus Devlog #17 - Creating IRL and Clay Human Models, IRL Asset Pipeline, Mocap Pipeline and more



Creating the IRL Human Model

A realistic humanoid model is needed for the first and last cutscenes.

Designing in Meta Human

asdf

Exporting from Meta Human

asdf

Prep for Mocap Fusion

asdf

Setup inside Mocap Fusion

asdf

Movement Test

asdf

Creating the clay Human Model

Same as with the ‘IRL’ part of the game, we need a humanoid model for playing the animations of the player controller and for being used in different timelines and cutscenes.

Making the Model

asdf

Rigging and Weight Painting

asdf

Prep for Mocap Fusion

asdf

Setup inside Mocap Fusion

asdf

Movement Test

asdf

IRL Asset Pipeline

1. Creating the Model

This process starts in Blender. Unlike the clay pipeline, ‘IRL’ assets are modeled in a more traditionally way, using standard Blender tools and modifiers. Because these assets are primarily used in cutscenes, there is a bit more leeway on polygon count, though it’s still worth keeping things under control (Shade Smooth and Shade Auto Smooth help with that a lot and have virtually zero cost).

Remember to create backups of your work using Collections before applying modifiers and other destructive steps!

  1. Use Blender’s modifiers like Array, Mirror and others to your advantage in order to simplify the modeling process. Right from the start make sure you’re creating simple, correct and high enough poly count topology for good detail, but low enough so performance doesn’t get hit too hard. However, (outside of a few cases) ‘IRL’ assets will be pretty much exclusively used in cutscenes, so performance isn’t as much of a priority (there is definitely a bit more leeway here).

2. Clean Up

Before applying materials it’s important to make sure the mesh is in a clean state. Issues with normals, topology and surface artifacts left untreated will pile up later on and become more visible plus harder to deal with further down the pipeline, so it’s important to be thorough at this stage.

To check normals of a model, enable Face Orientation under Viewport Overlays in the top right corner!

  1. Apply Shade Auto Smooth or Shade Smooth (depending on the situation) to give a lower poly model a ‘fake’ more detailed / smoother look on all parts of the model (remember you can also change the Shade Auto Smooth angle in the modifier settings)!
  2. When you’re happy with your model, before proceeding, check and fix any issues with:
  • Topology (use X-ray view and inspect the model in detail)
  • Normals (flip if there are any that are wrong)
  • Surface artifacts (glitching faces / garbled surfaces and so on)

3. UV Unwrapping

A proper UV unwrap is needed before exporting to Substance Painter, as it uses the UV map to project textures on to the mesh correctly. Without it (or with one that is of poor quality), the baking and painting steps in Substance will produce incorrect or garbled results. This video is a great overview on the topic and a must watch!

These steps need to be repeated for all meshes of the model!
A more manual approach to UV unwrapping is crucial, because Substance Painter heavily relies on proper UVs to output good looking results!
Avoid long UV islands, it’s better to cut them to shorter pieces as that will bring better results overall!
You can use Select > Sharp Edges in the Edit mode to get an easy starting point before de-selecting certain edges, but this shouldn’t really be relied on and can be problematic!

  1. Apply All Transforms on all meshes of the model!
  2. Open up the UV Editor view, then press A to select all of your meshes’ faces and then press U and Project from View to create a ‘clean slate’.
  3. Go in to edge select mode, then using Shift + Left Click and in certain cases Ctrl select the edges that will become seems.
  4. When you’re done, press U and Mark Seam to save your seams.
  5. Switch to face select mode, press A, click in to the UV Editor window, and then Right Click and Unwrap.

4. UV Clean Up

It’s important to perform a few clean up steps on the UVs before moving on to minimize distortion and artifacts.

These steps need to be repeated for all meshes of the model!
Make sure when applying the UV Checker texture, you’re using the UV in the Tex Coord Node, if you don’t see that node, make sure Node: Node Wrangler is installed in the Add-ons menu!
You can check your UV distortion by going in to the UV Editor view, removing the UV Checker grid with the X, then, in the Overlay menu (top right corner), enable Display Stretch and pick Area. The goal should be mostly blue but it will never be perfect!
Make sure to orient your shells parallel to the U or V axis as otherwise if you have them at odd angles, you will get a ton of anti-aliasing artifacts!
If you’re having distortion issues, try to add more seams!

  1. In the UV Editor view, select your shells and orient them (by pressing L) parallel with the U or V axis.
  2. In the UV Editor view, create a new image with Generated Type set to UV Grid.
  3. Apply the newly created UV Checker texture to your mesh, by creating a new material and picking it as the image texture.
  4. In the Shading view, open the material you just created, select the image texture node and press Ctrl + T to add Texture Coordinate and Mapping* nodes.

5. UV Packing

Now it’s time to pack all of the prepared UVs in to a single texture for a clean and centralized export.

  1. Select all your meshes.
  2. In the UV Editor view, press A, then UV > Average Island Scale to make sure they’re the same size relative to each other.
  3. Then pack your islands by going to UV > Pack Islands, make sure to use these settings:

![Img]

5. Texturing in Substance Painter

This step replaces baking in Blender. Substance Painter gives far more control over the final look of the asset, allowing for realistic wear, dirt, edge damage and other surface details that follow the actual geometry of the model, rather than a generic material applied uniformly across it.

Make sure you export the mesh to FBX before importing in to Substance Painter — use the same Unity export preset as usual!
Bake all maps (Normal, AO, Curvature, Position etc.) inside Substance Painter at 2048x2048 — this replaces the Blender baking step entirely!
Use Generators and Anchors to drive wear and dirt by curvature and AO rather than painting everything manually — this is what makes the result look intentional rather than hand-painted!
Name the material slots to more proper names as they’ll transfer over to Substance Painter and Unity later on!

  1. Create a new project in Substance Painter and import the FBX mesh
  2. Bake all mesh maps using the built in baker (set resolution to 2048x2048).
  3. Build up the material in layers - start with the base material, then add wear, dirt and other surface details on top using Generators and Fill Layers with masks (depending on the look you’re going for).
  4. When happy with the result, export the textures using the Unity HD Render Pipeline (Metallic Standard) export preset - this outputs correctly formatted and named maps including the Mask Map, meaning the Channel Packer step in Unity is no longer needed.
  5. Remember to save all exported textures in a safe place with proper naming.

WHAT ABOUT GLASS AND SUCH?

5. Export From Blender

This step prepares the final model for export. We’ll remove material slots from the mesh as otherwise Unity will expect different textures for each slot (we baked all materials in to just one).

Duplicate your work in to a separate collection as a ‘backup’ before removing material slots!

  1. Remove all material slots from the mesh.
  2. Perform Apply All Transforms via Ctrl + A (a safety check — if any accidental adjustments happened along the way, this prevents wrong scale or rotation showing up in Unity).
  3. Export the mesh to FBX using the Unity export preset (export selected only, don’t pack textures).

6. Setup in Unity

Similarly to the Clay Asset Pipeline, because we’re using Unity’s HDRP pipeline we need a Mask Map, packed using a Channel Packer.

With every deletion and reimport of textures in to Unity their settings will reset — remember to fix them each time (particularly the normal map)!
Because we baked the normal map to TangentSpace in Blender, make sure it’s also set to that in Unity!
Do NOT use Extract Materials & Textures on import — create the material manually and assign the baked textures yourself to keep full control over the setup!

  1. Import your mesh and all baked texture files in to Unity.
  2. Make sure the normal map’s type is set to Normal Map and that Tangent Space is selected.
  3. Set a proper import resolution and compression to High Quality.
  4. Create a new material (use HDRP/Lit).
  5. Open a channel packer tool (like this or this one), add the textures, set up the parameters and generate the mask map texture (see the Clay Asset Pipeline section for the channel packer setup).
  6. Assign the diffuse (albedo), normal and mask map textures to the material.

Potential Baking Issues

Mocap Pipeline

asdf

What’s Next?

asdf