Difference between revisions of "Shadowcatcher"

From LuxCoreRender Wiki
Jump to navigation Jump to search
 
Line 16: Line 16:
It is possible, however, to use the alpha channel generated by a rendering using the path engine to compose the images.
It is possible, however, to use the alpha channel generated by a rendering using the path engine to compose the images.


<!--
=Example=
=Example=
This is a scene with a LuxBall as 3D object, lit by an infinite light ("hemi" in Blender).<br>
This is a scene with a LuxBall as 3D object, lit by an infinite light ("hemi" in Blender).<br>
Line 29: Line 30:


[[File:Shadowcatcher_redball_with.jpg|500px]]
[[File:Shadowcatcher_redball_with.jpg|500px]]
-->


=Tips=
=Tips=
Line 34: Line 36:
* When using an imagemap as environment (e.g. a HDRI), enable the "only sample upper hemisphere" option
* 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.
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 [http://www.luxrender.net/wiki/LuxBlend25_LuxCore_NodeEditor#Output Output node].
[[File:Shadowcatcher_luxblend_classicmateditor.png|250px]]
[[File:Shadowcatcher_luxblend_nodemateditor.png|250px]]
=SDL description for developers=
This option is one of the [[LuxCore_SDL#Common_properties|common properties]] shared by all material types.

Latest revision as of 10:20, 26 September 2018

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 Tiled 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.


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.