NOTE: Is an early access version.
It is re-implemented in a way which does differential rendering: the
path is split at a first non-transparent bounce when shadow catcher
object is hit. One path will track state of the shadow catcher object
without other objects affecting it. The other path is rendering scene
as usual.
Upon user access of the shadow catcher pass the result is calculated
as combined pass divided by the pass with shadow catcher object. This
gives a pass which is to be multiplied with a backdrop to transport
light and shadows caught.
For the artificial objects which are to be added to the backdrop there
is a matte pass. This pass is to be alpha-over onto the backdrop (after
multiplication).
This process is a bit more involved that the old single pass approach,
but it allows to deal with indirect light, caustics.
It is possible to get some approximation of shadows for the matte pass
to have a simple workflow. It is a possibility, which is not done yet.
In fact, would actually be better to only do it if absolutely needed.
Example file using Fabrik footage: {F10055171}
The footage is available at T86591#1131707 and soon will be put to a
more visible/permanent place.
Example result: {F10055172}
The example file is a quick developer-working-on-laptop version, so
the reconstructed mesh is not very well aligned, and the light is only
to visualize possibilities of the new shadow catcher.
TODO:
- More permanent link to the Fabrik footage, so that we can reference it
from everywhere.
- Support shadow catcher which is behind transparent object.
- Support GPU.
- Better naming for what is called "split state". Maybe be explicit and
refer to it as "shadow catcher state". Not sure if we will have state
split for other functionality (aka, does it worth trying to be too
generic here?)
- Make the state copy more reusable (for compactification). The current
state of the code is probably 95% there: need to somehow define state
into which we do copy (and not assume we always copy to the split
state).
- Look into old-style approximation for a single alpha-over behavior.