Skip to content

Additional Light Settings

By default, NiloToon only renders 2D Rim Light on characters when you shine additional lights (Point/Spot/additional Directional Light) on them.

2D Rim Light is the default because it is the safest option visually.

If you need 3D hard/soft Rim Light (e.g., animated/flashing 3D Rim Light in concerts), read the section below about the Volume > NiloToonCinematicRimLightVolume controls.

CinematicRimLight Volume settings

In this section, we use a regular white main Directional Light for default lighting (not for rim light) and add one extra Point Light (bright red) to produce extra red rim light. Feel free to use other additional Point/Spot/Directional lights as well -- all additional lights work.


Light Setup Method

Attach a NiloToonLightSourceModifier script to the additional light and click the 'Rim Only' button:

  • Set Color = 0 (or 0-1 if you want this light to also affect the character's lighting color)
  • Set Direction = 0

Note

These NiloToonLightSourceModifier settings mean this light produces only rim light and does not affect other parts of the lighting (Color / Direction).

Tip

For Point/Spot lights, enabling Soft Shadow is strongly recommended! It greatly improves rim light quality through correct shadow occlusion.

NiloToonLightSourceModifier settings

To add a new light with NiloToonLightSourceModifier attached, you can use this menu:

  • + > Light > NiloToon > *** Light(+ Light Source Modifier)

NiloToon Light creation menu

This is the same as adding a regular Unity Light first and then manually attaching a NiloToonLightSourceModifier script.

Correct scene setup summary:

  • A NiloToon character
  • A regular main Directional Light (not for rim light)
  • One or more additional lights (e.g., Point Light), each with a NiloToonLightSourceModifier script
  • Each NiloToonLightSourceModifier set to: Color = 0, Direction = 0

2D Style Rim Light (Default)

2D Style Rim Light example

If you do not enable any rim light style in NiloToonCinematicRimLightVolume (all styles' Strength = 0), this 2D Style Rim Light is used as the default.

2D Style Rim Light uses only the Depth Buffer to calculate rim light (no vertex normals), producing a 2D rim light similar to what After Effects generates. It is the safest rim light option visually.

Additional red Point Light = Off:

Additional light off

Additional red Point Light = On:

Additional light on

You can also adjust Intensity in NiloToonCinematicRimLightVolume to produce the desired rim light intensity.

Rim Light Intensity setting


Classic Style Rim Light

A classic style 3D Rim Light commonly seen in 3D idol music games and concerts.

To use this style, override the following in NiloToonCinematicRimLightVolume:

  • Rim (3D Classic Style) > Strength = 1

The default settings of 3D Classic Style produce a very conservative hard 3D Rim Light.

Classic Style Rim Light settings

Softer or Larger Rim Light

Override Width / Blur / Sharpness. Example settings:

Setting Value
Rim Width 0.7
Rim Blur 0.5
Rim Sharpness 0.1

Soft Classic Rim Light settings Soft Classic Rim Light result

Concert Soft Rim Light

For a constant concert soft Rim Light, the easiest method is to place an additional Directional Light pointing downward. Example settings:

Setting Value
Rim Width 1.0
Rim Blur 0.7
Rim Sharpness 1.0

Concert Rim Light settings Concert Rim Light placement Concert Rim Light result

You can also use two Directional Lights with different colors and directions. Example settings:

Setting Value
Rim Width 0.5
Rim Blur 0.5
Rim Sharpness 1.0

Dual Directional Light Rim Light settings Dual Directional Light Rim Light result

Also adjust Intensity in NiloToonCinematicRimLightVolume to achieve the desired Rim Light intensity.

Intensity adjustment

Tip

You do not need to follow the exact settings listed above -- they are simple examples. In practice, enable one style (Strength = 1) and disable others (Strength = 0), then adjust these 3 sliders until you are satisfied with the rim light result: Rim Width, Rim Blur, Rim Sharpness.


Dynamic Style Rim Light

This style renders left/right side soft Rim Light when additional light hits the character. It has a more "Specular" feel compared to Classic Style Rim Light.

To produce this 3D Rim Light:

  1. In NiloToonCinematicRimLightVolume, override:

    • Rim (3D Dynamic Style) > Strength = 1

    You can freely adjust Width/Blur/Sharpness for your target art style.

    Dynamic Style settings

  2. For a softer/larger Rim Light, example settings:

    Setting Value
    Rim Width 0.5
    Rim Blur 0.7
    Rim Sharpness 0.05

    Dynamic Style soft settings

  3. This style also works with one or more Directional Lights. Example with two additional Directional Lights:

    Setting Value
    Rim Width 0
    Rim Blur 0.5
    Rim Sharpness 0.05

    Dynamic Style Directional Light settings Dynamic Style Directional Light result 1 Dynamic Style Directional Light result 2

Note

This style usually produces higher brightness compared to other styles, so you may want to lower the Intensity.


Concert Style Back Light

For concert 3DLive / MV scenes with many animating Spot Lights behind the character, use the 3D BackLight only Style in NiloToonCinematicRimLightVolume if a more realistic 3D Rim Light is preferred.

This style renders realistic Rim Light / Back Light only when the light is behind the character (in the camera's view), same as real-life rim light / back light. It works great for 3D concert flashing and animating back lights (usually bright Spot Lights flashing behind the character).

BackLight Style example

How to Use

  1. In the Volume's NiloToonCinematicRimLightVolume, override:

    • 3D BackLight only Style > Strength = 1

    BackLight Style settings

  2. Place additional lights so they come from behind the character (e.g., Point/Spot Light behind the character in the camera's view)

  3. Adjust Rim Sharpness for your target art style

  4. Also adjust Intensity to achieve the desired Rim Light intensity

  5. For a softer/larger Rim Light, override Rim Sharpness:

    • Rim Sharpness = 0 (softer result)
  6. For Point/Spot Lights, try moving the light position. This style is highly dependent on light direction and position.

Example results with different Point Light positions:

Point Light position change example Position result 1 Position result 2 Position result 3 Position result 4


Additional Light Tips

Tips applicable to all Rim Light styles.

For Point/Spot Lights, we strongly recommend enabling Soft Shadow with at least 1024 resolution when using 3D Rim Light styles. Shadow is very important for producing good 3D Rim Light, preventing rim light leaking into occluded areas not covered by occlusion maps (e.g., inner hair area, inner cloth area, under skirt).

Shadow settings

SoftShadow Disabled = Rim Light leaks to the front of the character (unwanted Rim Light in inner hair and cloth areas):

SoftShadow disabled result

SoftShadow Enabled = No Rim Light leaking:

SoftShadow enabled result

Caution

In URP and HDRP, Additional Directional Lights cannot render Shadow Maps. If you need multiple Directional Lights with Shadow Maps, try replacing all additional Directional Lights with larger, wider Spotlights. Carefully control the range and near plane of the Spot Light to ensure the Shadow Map renders well.

2. Use Aim Constraint

Add an Aim Constraint script to a Spot Light to force it to always aim at the target character's Bone (e.g., Head/Spine Bone). No matter how the character moves, the back Spot Light will always aim at the character, producing more stable Back Light / Rim Light.

Aim Constraint setup

3. Animate Lights in Timeline

Animate lights in the Timeline to produce flashing back lights.

Tip

Flashing Rim Light on characters is an extremely powerful effect for 3D Live / concert / MV, especially when the Rim Light is synced with the music!

4. Use a Single Style

Each Rim Light style is a mask applied to additional lights. If you enable 3 styles simultaneously (strength = 1), 3 masks are applied, and the Rim Light may become hard to see.

In most cases, enabling only a single style (strength = 1) and disabling others (strength = 0) is the best practice and recommended usage. It also makes Rim Light tuning easier since you only need to adjust settings for one style.


Multi Directional Light

If your scene contains multiple Directional Lights, only 1 is treated as the main light, and the rest are treated as additional lights. You can use these additional Directional Lights similarly to Point/Spot Lights to produce soft Rim Lights.

The conditions for determining which light is the main light:

  1. The light assigned as the Sun in the Rendering settings is always the main light.

    Sun setting

  2. If (1) is not set, the brightest Directional Light is chosen as the main light.

Tip

To ensure the main light never changes, we recommend using option (1) since it is the easiest to set up and debug.

For URP's Main Light documentation, see the official Unity documentation under Lighting > Main Light.