Skip to content

Blob Shadows

Vladislav Kantaev edited this page Dec 18, 2023 · 7 revisions

Blob shadows are very performant circular shadows, which are projected on the XZ plane.

Because of their perspective, a high-quality picture can be achieved with a very low resolution shadow map.

📝 Note: Blob Shadows support shadow ramp and pattern specified in the Toon RP pipeline asset.

Blob Shadows

Setup

1. Enabling Blob Shadows

In the pipeline asset's Shadows section, find Mode and set it to Blobs.

2. Preparing Receivers

For shadow receivers' materials:

  • Ensure they use Toon RP/Default, Toon RP/Default (Lite), or a Default type graph shaders.
  • Enable Receive Blob Shadows.

⚠️ Warning: an object should not cast and receive blob shadows at the same time as this causes full self-shadowing.

3. Preparing Casters

Add Blob Shadow Renderer components to all shadow casting geometries and configure their sizes and other shape parameters.

4. Tweak Parameters

  • Set the desired shape of the renderer (Shadow Type).
  • Tweak Threshold, Smoothness, Mode, and Saturation to achieve the desired look.

Modes

Blob shadow modes define how blobs should blend with one another on intersection.

Default

Default Mode

Meta Balls

Shadows "merge" when getting close.

Meta Balls Mode

Shadow Type

Blob shadows can be of various shapes:

  • Circle
  • Square
  • Baked

Baked Blob Shadows

Prefabs' shadows can be baked into textures, which can then be used to define the shadow of a blob shadow. To bake a shadow of a model:

  • Go to the Project window, right click and select Create/Toon RP/Baked Blob Shadow;
  • Specify a model (or a prefab) to bake, configure parameters, and click Apply.

Baked Blob Shadow

Toon RP requres all baked blob shadow to be packed in a single atlas, which is specified in the pipeline asset. To create such an atlas:

  • Go to the Project window, right click and select Create/Toon RP/Baked Blob Shadow Atlas;
  • Specify textures, configure parameters, and click Apply.
  • Assign the created atlas inside the Toon RP Pipeline Asset: Shadows/Blobs/Baked Shadow Atlas

Baked Shadow Atlas Baked Shadow Atlas Inside Pipeline Asset

Then, in the Blob Shadow Renderer, select Shadow Type Baked and input the index of the baked shadow in the atlas. Textures are indexed in the same order as they are set in the atlas' Source Textures.

Setting Texture Index