A question about render layers and shadows

I have a complicated question to ask about. Hopefully someone can help. Let me describe the situation.

I have a scene which will be a room. In the room there will be let’s say 5 objects.

I would like to render the scene with 1 object at a time and all objects eventually. With render layers, I can render each object without the background and with the background. If I render without the background, the shadows will not be there obviously. However on the background layer, the shadows will be there as well as the missing space for the object.

I would like to take those shadows and render them without the objects and without the background on a separate layer.

How can I do that? Very difficult for me right now!

You want a shadow catcher, doesn’t exist yet in Cycles. It’s in the plans though not a priority I think.


It’s not 100% clear what you’re trying to achieve. Can’t quite picture what you’re trying to do. This might work:

You can make a pseudo shadow-catcher just by making the shadow-casting object invisible to the camera. That is, set up the nodes so that if the object is hit by a camera ray, it’s 100% transparent, but if it’s hit by any other kind of ray, it’s opaque:

( http://imgur.com/MneMoJJ )

Then you just have to make your background objects nice and white to catch the shadows. Bit of tweaking the levels and you’re done.

Thanks, I’ll wait for a shadow catcher (never heard of that before). I’m trying to get a object, background and shadow as a separate image so I can composite them later separately to a empty background.

I’m basically trying to get the exact shadows that appear when you render with a missing layer, except without the background.

I’ll wait for a shadow catcher (never heard of that before)

I wouldn’t wait around for a shadow catcher because it seems the developers don’t consider it in anyway a priority, which is a real shame.
Every cycles roadmap that has ever been posted you never see a thing noted about it. So you really need to consider learning to work around with all the shadow plane setups i’m afraid because I don’t think your going to see this badly needed feature anytime soon.

I wouldn’t be so sure, it’s been mentioned a few times on #blendercoders (I snoop around there sometimes), so they’re thinking about it. Maybe Thomas Dinges is planning to tackle it ? It would be so cool to have it I agree, it would render a good part of any comp tree unnecessary.

Remember, you also have BI available to you. You can use that with a properly-placed shadow-only light to generate shadow information. You will have to store it into a separate (MultiLayer OpenEXR) file, but your workflow is probably multi-pass already anyway.

What you need to know, one way or the other, is where “a plausible shadow” is located in the frame, and roughly how dense it is at the various places. Realistically, it doesn’t have to be exact, because only a few shadows are useful as “visual cues” while other shadows that in the real-world would be there might be a visual distraction. Concentrate on the shadows that moving-things cast over stationary-things, and the most critical ones that manifest the illusion of depth. Consider splitting-out these two “reasons for shadows” into separate channels.

In fact … one of the “tricks” that I routinely use is to generate the basic scene with no-shadows (shadows are expensive), then to go back and determine where shadows are required, and to use shadow-onlys to generate exactly those shadows. (“Generate the cheap-stuff quickly, then pick-and-choose the expensive stuff and produce only what you must have.”) The shadows are then tweaked so that they “darken” the scene (of course), but also they inject a little bit of usually-bluish tint. If something-of-importance is in the shadowed area, it might be desaturated a little bit, too. As long as the result looks believable, who-cares how you get it. Just, “save time.”

Remember: “light is one thing, and shadows are another, and you need to keep the two distinct and well-apart.” A shadow is not merely a place in a pool of light that is darker than the rest: it is a region with varying densities and possibly color-values of its own. You need each layer of data … light, and shadow … “pure, pristine, and separate.”