NPR character over PBR background — cel shading + outline

NPR Shader System

MetaHuman to anime, 4 NPR looks over PBR

UE5 · Material · Post Process — Company, 2024–2025 · Live Service: cinev.com

Problem

Early in the project, a decision was made to switch from MetaHuman-based realistic rendering to an anime style. Characters needed to be rendered in NPR while keeping PBR backgrounds, and the in-house characters and external VRM models had different material structures, making it impossible to achieve a consistent look with a single approach.

Solution

Built a Cel Shading-based NPR prototype, then led system expansion and maintenance.

Split the approach into Custom Depth + Post Process for in-house and Emissive + Inverted Hull for VRM, creating 4 NPR looks. The core nodes carried over from the prototype are SDF face shadow and Dot Product-based two-tone shading.

Result

Category Result
Rendering TransitionFull transition from MetaHuman to anime style
NPR Looks4 looks — art team can change styles by swapping Toon Ramps
Material Scale698 MIs, 1,371 textures
Material SeparationIn-house (dedicated toon) + VRM (MToon reimplementation) built separately
Background CoexistencePBR backgrounds + NPR characters in the same scene
Look DevFinalized per-character looks with art team — style changes possible via Toon Ramp swap
PBR background + NPR character coexistence scene

PBR background + NPR character in the same scene


4 Base Materials

In-house and VRM have different material structures, and even within VRM, realistic and non-realistic parts are mixed. So four separate base materials were created.

4 Base Materials — VRM Toon, VRM Zo Std, VRM Zo Toon, M Cell

4 base materials

1. In-house Toon

Dedicated toon material for in-house characters. On top of a structure that separates characters via Custom Depth buffer and renders them in NPR style through Post Process, I developed and maintained features such as SDF face shadow and Matcap reflection.

Global Shadow OFF / ON toggle demo

SDF Face Shadow

Standard NdotL produces unintuitive shadows around the nose and eye sockets. By controlling shadow boundaries with pre-baked distance information in SDF textures, face shadows fall naturally even as the lighting angle changes.

SDF face shadow lighting demo

SDF Shadow Mask texture

SDF Shadow Mask texture

SDF material node graph

SDF texture sample → Light Direction dot → shadow mask output

Matcap Reflection

PBR reflections don't suit NPR environments. I used Matcap textures for view-based reflections on hair highlights, skin sheen, etc. Turned out it could fake rim lighting too, so I built Matcap Painter to make those textures faster.

Matcap reflection demo

Matcap Material Function node MF_MatCAP call site

2. VRM Toon

Restructured parameter input names based on the in-house toon material to conform to MToon conventions. Ensured MToon textures and flags are automatically connected upon VRM import. Outline uses the same Post Process approach as the in-house material.

PP outline mask — Before/After + Material/Blueprint

PP outline mask processing — unnecessary line removal + Material/Blueprint implementation

Angel Ring Matcap

Applied Matcap to the specular map to create a natural sheen effect that shifts with camera direction. Hair highlights like angel rings are achieved with a single ShadowSoft Matcap texture, and Matcap parameters are exposed on the material instance so the art team can easily adjust per-character look dev.

Angel Ring Matcap — Before/After comparison

Angel Ring Matcap Before / After

Matcap ShadowSoft settings

Matcap_ShadowSoft parameter settings

3. VRM PBR

Lightweight version of the VRM4U plugin's PBR material. Renders realistic parts such as skin, irises, and accessories based on a default SSS Profile. Like Zo Toon, the focus was on matching the tone with existing in-house characters.

VRM PBR character rendering

4. VRM Zo Toon

The existing in-house material grabbed color from the Custom Depth buffer, making realistic/non-realistic mixing impossible. To solve this, I created a new toon shading system that operates in the Emissive channel. Outline uses the Inverted Hull method. Matching the tone with existing in-house characters was critical.

Zo Toon material node graph

Zo Toon material node graph — Emissive-based toon shading

Zo Toon(Inverted Hull) vs VRM Toon(Post Process) outline comparison

Zo Toon(Inverted Hull) vs VRM Toon(Post Process) outline comparison

Zo Toon + PBR non-realistic/realistic combination showcase

PBR + Toon mixed rendering

PBR realistic part + Toon non-realistic part mixed result

Material Base Pass Samplers
In-house Toon433 inst7 / 16
VRM Toon369 inst4 / 16
Zo Toon226 inst3 / 16

Enabled realistic/non-realistic mixing while reducing shader cost by 48% (vs in-house)

UDS / ToD 통합 테스트

A 9-frame grid verifying that all shaders behave consistently across various lighting and Time of Day conditions.

UDS / ToD integration test — 9-frame shader results across lighting conditions
← Character System MMD Player →