Website powered by

Real-time Skinshader for Unreal Engine

ROUGHNESS:
In this example, roughness is not based on a baked roughness map, but instead based on a combination of tiling detail-roughness, micro roughness, and roughness zones. Roughness zones are extracted from a texture map.

The Material Network in Unreal Engine. The material is built to be flexible, and is built to enable the artist to opt in or out of using certain features such as tiling normala, dicplacement from optional heightmap, Roughness map or "Roughness zones" map.

The Material Network in Unreal Engine. The material is built to be flexible, and is built to enable the artist to opt in or out of using certain features such as tiling normala, dicplacement from optional heightmap, Roughness map or "Roughness zones" map.

Painting of Tiling normals in Blender,

I've set up a "Tiling & Blending Skinshader" in Blender that mimic the blending result of the skinshader masks that are required for the Unreal skinshader. This takes the guesswork out of authoring the tiling masks.

I've set up a "Tiling & Blending Skinshader" in Blender that mimic the blending result of the skinshader masks that are required for the Unreal skinshader. This takes the guesswork out of authoring the tiling masks.

Test-Capture, Live Lightning

Early testing of the shader comparing it to the artists highpoly normals.
Video shows the Skinshader (middle and left), using a 2k, 1k and 512px resolution version of the highpoly normal, compared to the shader without tiling normals (right).

For this project I set out to achieve high quality and highly detailed skin to be used on character in real-time-productions. The project itself consists of a skin-shader, or material, in Unreal Engine and a thought-out pipeline for producing the necessary masks that the shader requires. Using tiling detail-normals for all tertiary details of the skin, less resolution is needed from the high-poly bake. The tiling normals are controlled by a texture mask,which allows for blending of multiple, overlapping, detail normals to be which will also be blended with the baked textures from the high poly mesh.

Assuming a production team would use a shared.base mesh for their characters, and shared UV’s for the characters faces, this shader would enable for less texture memory to be demanded in a scene with multiple characters, as the tertiary details (tiling textures) can be shared between them. This method of achieving details also means more resources that can be shared between assets, and th detailing process of sculpting tertiary details of a face, wouldn’t need to be repeated for all characters. This method would also assure synchronized levels of detail across characters, as the tertiary detail application can have standardized and shared textures.

This Skin-Shader puts great emphasis on engine customization and tiling details. Tiling detail normal maps and tiling detail cavity texture maps are used to drive the tertiary details of the model, rather than relying on a needlessly high resolution texture map baked from a highpoly sculpt.

The material has exposed parameters to enable a large variety of customization, among others:
Detail normal Size
Detail Normal Strength
Tertiary Detail Roughness Factor
Colors (Albedo) in Pore Cavities.
Zone-based Roughness influence (RGBA Mask)

The Renders below tiling normals are driven by a 512px resolution mask (RGBA), To author the tiling masks and roughness mask, a shader mimicing the Unreal Materials behaviour has been set Blender, where an approximate result can be previewed in the viewport directly whilst painting the masks.

The detail-normals greatly reduces the need for baked normal resolution. In this example, the character uses a 512 baked normal map, and then 4 different 1024 tiling textures.

There's a lot of great resources on skin shading and materials, with everything from dual lobe specularity to microstructure displacement. My main reference for this project has however been this great article about tiling normal skin from Saraubh Jethani: https://texturing.xyz/pages/saurabh-jethani-creating-realistic-skin-in-ue4, and this one about different techniques of normal blending: https://blog.selfshadow.com/publications/blending-in-detail/.

The portrait used for demoing the skinmaterial is a early version of a bust sculpted by Josephine Eriksson, check it out here: https://www.artstation.com/artwork/283R1a