Shadowcatcher - LuxRender Wiki
Luxrender GPL Physically Based Renderer

Shadowcatcher

Personal tools

From LuxRender Wiki

Jump to: navigation, search

Contents

Overview

Since version 1.6 LuxCore materials have the shadowcatcher option. See this forum thread for the original announcement.
It is intended to be used for compositing, e.g. to integrate a rendered 3D object into a photograph.

A shadowcatcher material will be transparent where hit by direct light, while shadowed areas will stay opaque.
The opacity of the shadow can be controlled by the opacity/transparency of the material.
The color of the shadow can be influenced by the material color.

Any material can be a shadowcatcher, but it does not make sense to use a purely specular material without any diffuse reflection, like glass or mirror.
Usually matte is the material best suited for a shadowcatcher.

Supported Engines

The shadowcatcher option is supported by the Path and Biased Path engines (both CPU and OpenCL), but not by the Bidir and BidirVCM engines.

It is possible, however, to use the alpha channel generated by a rendering using the path engine to compose the images.

Example

This is a scene with a LuxBall as 3D object, lit by an infinite light ("hemi" in Blender).
Note how the lower half of the environment image is black in order to not cast any shadows onto the shadow catcher later.

Shadowcatcher redball raw.jpg

Composited over a background image:

Shadowcatcher redball without.jpg

And now with a groundplane using a shadowcatcher material:

Shadowcatcher redball with.jpg

Tips

  • When using a sky light as environment, enable the "groundcolor" option and set the groundcolor to black
  • When using an imagemap as environment (e.g. a HDRI), enable the "only sample upper hemisphere" option

Doing this prevents the environment to cast lights onto the shadowcatcher from below, leading to better alpha transparency.

Support in Exporters

LuxBlend

The shadowcatcher option is a simple checkbox, either available in the "LuxCore specific settings" panel of a material or, for node materials, on the Output node.

Shadowcatcher luxblend classicmateditor.png

Shadowcatcher luxblend nodemateditor.png

SDL description for developers

This option is one of the common properties shared by all material types.