Shadows / Blender

Here are described the settings and best practices to setup beautiful real-time shadows in Verge3D for Blender.

Contents

This section is written for Blender 2.81 (or higher). The shadow settings for older Blender versions are slightly different.

Shadow Filtering Types

Shadows in Verge3D look very differently depending on what shadow map filtering algorithm is in use. The Shadow Map Filtering property located on the Render Properties tab is used to specify the algorithm.

Basic

Disable filtering, render shadow map as is. This is the fastest method to render shadows.

Bilinear

Use bilinear filtering to smooth adjacent shadow map pixels.

PCF

Stands for Percentage Closer Filtering. Uses multiple shadow map lookups for smoothed shadow rendering. Average quality and performance.

PCF (Bilinear)

Similar to PCF but uses bilinear interpolation for each shadow map lookup. Gives smoothed shadows at the expense of more computation power.

PCF (Poisson Disk)

Uses pseudorandom Poisson Disk Sampling to eliminate shadow pixelation for PCF shadows. This was made the default setting because it corresponds the most to what you see in the 3D editor viewport. The performance is comparable to PCF (Bilinear) algorithm or better.

ESM

Stands for Exponential Shadow Maps. Shadows are smoothest but light leaks are possible. Use ESM Bias setting on lights to remove light leaks artefacts. The performance is comparable to PCF (Bilinear) algorithm.

Global Settings

The rendering of the shadows is tuned using the Shadows and Verge3D Settings panels located on the Render tab in Blender.

Cube Size
shadow map size for shadows casted from Point and Spot lights. The higher values gives better quality but reduces performance.
Cascade Size
shadow map size for shadows casted from Sun lights. The higher values gives better quality but reduce performance.
Light Threshold
light intensity threshold used to calculate shadow volume distance.
Enable Shadows
enable/disable shadows in Verge3D.
Shadow Map Filtering
shadow map filtering algorithm. See above.
Shadow Map Side
denotes which side of polygons is rendered during the shadow pass. Tweak this value to eliminate self-shadowing artefacts or if you render the plain models (such as leaves or papers).
ESM Distance Scale
ESM shadows scaling factor. Since the ESM filtering algorithm uses absolute distance values, set up the scale value < 1 if you're working on a scene which is much bigger than the default cube, and configure the scale > 1 if your scene is much smaller.

Per-light Settings

Shadows can be enabled/disabled/tweaked for each individual light using the Shadow and Verge3D Settings panels.

Clip Start
near clipping distance, higher values may slightly improve shadow quality.
Bias
main parameter you should tweak to get rid of self-shadow artifacts and/or the "peter-panning" effect.
Blur Radius
specify value higher 1 to make your shadows smoother (increase shadow blurriness). This parameter works only for PCF and ESM shadows.
ESM Bias
bias to reduce ESM light leaking artefacts.

Configuring Sun Shadows

Since Verge3D does not support cascaded shadow maps yet, you must follow these steps to configure sun shadows:

  1. Set the cascades Count to 1.
  2. Go to active camera view using the View->Cameras->Active Camera menu or Numpad 0 key.
  3. Tweak Max Distance parameter.

Got Questions?

Feel free to ask on the forums!