Let's (finally) fix the ShadowCatcher

Fair enough… It’s just a bit confusing since there are many more “user” threads in Cycles “developer” forum.

1 Like

As xdanic observed, a number of people have signed up just to make their very first post on this exact issue, and I number myself amongst them.

We’re on 2.82 already and I suspect we won’t see this happen until the issue is 2 years old given that no developer seems to have stepped up yet and expressed an interest in tackling it.

For my part, I’m currently looking into using AMD’s ProRender as an alternative to cycles for any compositing work against existing images. Just as soon as I can find exactly why it keeps crashing on me.

4 Likes

I have to agree on all points there. On top of that, doing this via a BSDF or in some other non-standard way (i.e. as suggested in the Cycles Manifest) would just expand the problem instead of solving it. Which is why it would be awesome to solve through the alpha channel such as V-Ray and co. do it. That way Blender would be open to VFX Artists who are in desperate need for this kind of composition.

Try LuxCoreRender :slight_smile:

2 Likes

Not exactly sure if this is the right place for this, but since this is more or less the reference thread for the shadow catcher, I’ll drop some reports with other “issues” here (for completeness):

https://developer.blender.org/T55916
https://developer.blender.org/T69410
https://developer.blender.org/T56477
https://developer.blender.org/T73497

I did :slight_smile: Nice alternative! Thanks :+1:

This is great I was just trying to do some CG integration to real footage and noticed all these problems. I was looking around for a fix and nothing… then came upon this and realized how broken the shadow catcher is.

I cant seem to find the shadow catcher in LuxCore where is it??

1 Like

We still need shadowcatcher
improvements. I write it because this topic looks dead.

7 Likes

I ran into this exact issue a few weeks back when attempting to make a transparent icon with shadows and light reflection on the transparent ‘floor’.

From my current understanding of the requirements for a ‘correct’ shadow catcher, it would need to be a new BSDF, which takes an image texture representing the colour of the catcher, and would handle the additive/subtractive light contributions internally, then the second aspect of it is being able to encode per-channel transparency in the render result such that it can be composed properly later on.

The first half seems like a reasonably straightforward task at first glance, if well defined, but the second seems like a much larger challenge and might be why this hasn’t been tackled yet. I’d love to be wrong on that but it sounds like a rather invasive change to the engine.

1 Like

It can’t be implemented as a BSDF, it needs to be a feature of the integrator. Dividing or subtracting can’t be done on individual samples, it needs to be done on converged render results. Further it actually helps to take into account the material and its BSDF to get more accurate results, rather than assuming all shadow catchers are diffuse surfaces.

Per-channel transparency is not that hard, at least to start it could just be another RGB render pass that would require some manual work from the user to create the right composting setup. Cycles already has that information, someone could implement such a render pass without major changes.

It’s the integrator changes that are harder.

12 Likes

Dear Blender Devs,

Congratulations, you have built a serious game changer! Since B2.80, a whole new generation of industrial designers at our art school considers learning blender instead of cinema4d, rhino or other traditionals. As a blender enthusiast, I was asked to give basic introduction courses for the students and I am very happy with this trend.

But one of the most crucial tasks for industrial designers is placing their designs in real-life footage. There is no way around it… If you could make blender a little more mainstream-competetive by adding a

shadow/reflection/emission catcher that also takes into account mixed glossy/rough and bumpy/displaced surfaces (in other words: full shader nodes support)

many people would be extremely thankful. By that I mean, you could gain lots of new professional users (who are hopefully considering donations). :slight_smile:

So, can I haz shado catcha plz?

Best regards, a huge thanks and lots of hugs to the whole blender development team!

Lars

10 Likes

As in: Shadow Catcher being a real shader node to be used in nodetrees

2 Likes

So when is it happening? When will we get a working shadowcatcher?
Meanwhile, I made a video about this (before discovering this amazing thread!):

1 Like

Bashed my head against this for weeks. I’ve sort of made it work using view layers and the compositor (and no blender shadow catchers). It made my head hurt, be aware reading this may cause madness.

You need to split the scene into three view layers (you know, the button at the top right you never use):

layer 1 the environment map only pretty straightforward

layer 2 the environment plus the “shadow catcher” This shadow catcher is a rough mock up of the static part of the scene (usually a patch of ground) - try to get the specular, roughness and diffuse about right but not too critical. Don’t make this a blender shadow catcher! Enable the object index pass and give this object an index of (say) 1.
A REALLY cool dodge I’ve found for this new “shadow catcher” is that if you take the incoming ray from the geometry node, subtract it from zero with vector maths and feed it to the environment texture you get exactly what you would see on the background if the object wasn’t there. You can feed this into a diffuse or principled shader and you have a pretty good match to the environment that tracks round properly with the camera/viewpoint.

layer 3 the objects in the scene, the shadow catcher as above and the environment, i.e. the traditional scene without clever stuff.

Press render and wait. It will render the three layers separately and you can access them all in the compositor or image viewer. Fortunately the first two passes are not too complicated and don’t take too long.

Then in the compositor split each image into RGB and do maths on each channel.
Layer 1 divided by layer 2 gives the “error” in the environment caused by the shadow catcher not being a great match to the environment behind it.
Multiply the result by layer 3 and the shadow catcher merges into the background EXCEPT for the influence (shadows, specular reflections, light sources) of the objects in your scene
Merge the RGB back together again for your corrected image.
Mask out the objects in your scene so that where there is a shadow catcher you use the corrected values just generated (use object index). Overlay the image of your objects from layer 3 elsewhere.

That’s it. Shadows, specular reflections from shadow catchers, interaction with nearby environment, the works. The only drawback is that caustics and reflections on objects in your scene will be reacting to environment + shadow catcher, so depending on how close your shadow catcher textures were you might notice they are a bit off. I also make the shadow catcher fade off gently at the edges using alpha to avoid steps but I’m not sure that’s really necessary.

Is this new or clever or am I in a grandmother/egg sucking situation? Most of the time the shadow catcher we have seems good enough. There is a work around. Do we want to code this dodge into the application somehow? Is there a better way?

He’s been back for quite a while, his last commit to cycles was yesterday .

2 Likes

Post withdrawn

Post withdrawn

It makes me so happy that I found this post and that other people have found this issue as well, but also it makes me incredibly worried because there hasn’t been any fixes to this broken shadow catcher in Cycles for the 2 years that people have been sounding the alarms on this post… I’m amazed it still hasn’t been fixed or even begun to be worked on, but I have my fingers crossed this won’t be left on the back-burner much longer when the devs realize it’s a much-needed feature and that the current version of the shadow-catcher isn’t production-ready. This is one of the most vital aspects of a DCC when incorporating live footage, and is a thorn in Blender’s toe. It’s the Achilles Heel of Blender, and my hope is that one of the devs will step up to the plate and accept this challenge, but it’s important to be optimistic and hope for the best even if this post has been up for years… This post has been up since June 2018, so it’s been a bit more than 2 years since it has been brought up, and it is definitely worrisome it hasn’t been tackled by any of the developers yet, but optimism is not something I’m lacking, considering the Blender developers are incredibly talented and smart. However, it does make it increasingly difficult to incorporate live footage + cycles renders when you aren’t able to have a properly working shadow catcher. I hope one of the devs takes this up. It’s one of the last things Blender needs to get fixed that will pull myself as well as many others to move on from other DCCs with proper shadow catchers. Of course you could argue Luxcore has a shadow catcher, but being able to use the shadow catcher with the standard Blender Cycles rendering engine would absolutely change the game. Cycles is my favorite renderer, so here I am just crossing my fingers!

Fingers crossed that one of the devs takes this up. I hate to say it, but it is such a tall order that I think it’s a bit too major of a challenge for any one of the developers to want to take the chance of failure and wasted time, and that would explain the amount of time it has taken so far, but here’s to hoping that’s just the mis-informed skeptic in me!

Either way, thanks for this post, and I will be watching this post intently, and as with all things, with patience.

Even without this feature, it’s not like Blender isn’t one of the biggest game-changers ever, so I will just have to be patient!

Thank you developers for your hard work, and thanks to everyone else who brought up this issue in the last 2 years! :slight_smile:

1 Like