Skip to content

Per-Character Effects

This section covers NiloToon's per-character effect features, including BaseMap Override, Dissolve, Dither Fade, and Shading Grade Map.


BaseMap Override (Per Character)

BaseMap Override settings BaseMap Override result

Similar to applying a BaseMap Stacking Layer to the entire character, this typically controls:

  • Overlay Map
  • UV
  • Tiling

Dissolve (Per Character)

In Play Mode, find the NiloToonPerCharacterRenderController at the root of each character, and drag Dissolve Amount from 0 to 1 to see the dissolve effect.

Dissolve settings

Recommended Modes

We highly recommend trying different Modes to find a dissolve style that suits your use case. For example, when introducing a new character or new clothing on a 3D Live stage, you can use the following Modes:

  • World Space Vertical Upward
  • World Space Vertical Downward

Dissolve Mode selection


Dither Fade (Per Character)

In Play Mode, find the NiloToonPerCharacterRenderController at the root of each character, and drag Dither Fadeout Opacity to 0 to see the dither transparency effect.

Dither Fade settings

Requirements

High RenderScale and TAA/DLSS are required to blur the holes of the dither effect.


Dissolve/Dither Target Renderer/Material Selection

If you need to dissolve only specific renderers or materials (e.g., dissolving only certain body parts during a costume change), use the following methods.

Dissolve Group in Material

First, try using the Dissolve group inside the NiloToon Material, without using any settings from NiloToonPerCharacterRenderController. It dissolves by a selected UV, is easier to use, and can produce better per-material animated results and dissolve edge patterns (you can freely use any pattern textures you like).

Material Dissolve group

This per-material dissolve is ideal for dissolving cloth parts/attachments one by one when a character transforms to another set of clothing, or for dissolving weapons on a character holding switchable weapons.

This solution does not add extra NiloToonPerCharacterRenderController scripts. It uses the NiloToon character material's Allow Dissolve? as a mask to control which materials can be dissolved. You can control this toggle (float) at runtime via a custom C# script, or set it manually via the material inspector.

For example, to dissolve only a jacket material, do the following in Play Mode via C#:

  1. Iterate all materials of a character and set each material's _AllowPerCharacterDissolve to 0
  2. Set only the jacket material's _AllowPerCharacterDissolve to 1
  3. Use NiloToonPerCharacterRenderController's dissolve slider as usual - due to steps 1 and 2, only the jacket material will receive the per-character dissolve effect

Allow Dissolve setting

Example Code

using System.Collections;
using NiloToon.NiloToonURP;
using UnityEngine;

public class DissolveTargetMatExample : MonoBehaviour
{
    public NiloToonPerCharacterRenderController charaScript;

    IEnumerator Start()
    {
        // Wait 1 frame for NiloToon to init material instances
        yield return null;

        // Set _AllowPerCharacterDissolve on the next frame
        foreach (var renderer in charaScript.allRenderers)
        {
            foreach (var mat in renderer.materials)
            {
                if (mat.name.Contains("jacket"))
                {
                    mat.SetFloat("_AllowPerCharacterDissolve", 1);
                }
                else
                {
                    mat.SetFloat("_AllowPerCharacterDissolve", 0);
                }
            }
        }
    }

    void Update()
    {
        // You can remove this line and control dissolve as usual
        charaScript.dissolveAmount = Mathf.Sin(Time.time * 5f) * 0.5f + 0.5f;
    }
}

This method provides per-material control without needing multiple NiloToonPerCharacterRenderController scripts, making it the recommended solution.

Solution B

This solution only provides per-renderer control and requires multiple NiloToonPerCharacterRenderController scripts. It is easy to make mistakes, so it is not recommended.

  1. Copy the root NiloToonPerCharacterRenderController script
  2. Paste it onto the target renderer (e.g., jacket renderer)
  3. Click the Auto refill AllRenderers list button on the root NiloToonPerCharacterRenderController
  4. Verify that the newly pasted NiloToonPerCharacterRenderController's Character Renderers > All Renderers contains only the target renderer
  5. Verify that the original root NiloToonPerCharacterRenderController's All Renderers contains all child renderers except the jacket
  6. Enter Play Mode - you can now apply controls to that specific renderer independently (e.g., dissolve/dither/color tint the jacket alone)

Caution

The controls of the two NiloToonPerCharacterRenderController scripts are independent of each other. After the above setup, a Tint Color control from the root NiloToonPerCharacterRenderController will no longer control that specific child renderer (e.g., jacket).


Shading Grade Map

A map similar to an Occlusion Map but not identical. Its sole purpose is to offset Lighting Style's "Mid Point" using the "Shading Grade Map".

Map Color Effect
Gray (Linear Gray) No change
Areas closer to black Offsets Mid Point so shadows are harder to appear
Areas closer to white Offsets Mid Point so shadows are easier to appear (similar to an occlusion effect)

Shading Grade Map settings Shading Grade Map effect

Below is an example of what a Shading Grade Map may look like. NiloToon's default settings expect an inverted color map, and you can freely control the Invert Toggle inside the material.

Shading Grade Map example