Baking "Shadows Only" in Cycles?

Hi everyone,

Has anyone figured out a way of duplicating the “Shadows Only” feature in Cycles, i.e. baking shadows and shading to the alpha channel?

I’ve looked high and low, but this seems to be unresolved as of 2.71?

TIA

not possible at the moment… had the same problem and did find some solutions… but thats not what you need. Not at the moment with cycles. hopefully there is a solution in the near future because it makes a lot of sense to have it.

I was afraid that was the case. I do love Cycles but it seems some of the really useful functionality in BI still has to make its way across. Thanks for the reply! :slight_smile:

year… thats it… maybe the great cycles guys can do it, since brecht is not there anymore…hopefully they can do it. And lots of thanks to any approach on this guys.

Shadows only is non-trivial to do in a path tracer, since shadows aren’t a property of the object onto which they’re being cast, but rather a side effect caused by the object casting them. This is why, to set a shadow color, you do it on the the object casting it for example. A shadow only material would have to do some creative things in terms of physical plausibility (because obviously such a material can never exist in the real world).

Fair enough – and I’ll readily confess that I don’t understand all the ins and outs of this yet – but how far off would you be if you simply captured the brightness of each pixel and stored that in the alpha channel?

I don’t think the light contributions add up to a “brightness” value but rather to separate R G and B values, which are likely to take into account all textures, shaders, etc. Just my guess…

But Piet, how far off would you be if you baked the shadow pass onto your model and set the resulting image as the alpha for your shader ? Unless there is something I missed ?

I agree – but RGB can easily be converted to grayscale. Whether or not that’d be accurate is of course another matter, but it might be close enough?

Problem is that the shadow pass does not inculde mesh lights… we did a lot of tests an could not find a good solution.
Don`t know… some new ideas are welcome.

Aaaaaah yes. I remember there was a discussion about this a few weeks ago on one of the mailing lists… yeah here it is : http://lists.blender.org/pipermail/bf-cycles/2014-May/date.html (the discussion is “Shadow Pass including IBL + mesh Lights”)

Oh cool. Then the devs are aware of it and can hopefully provide a solution soon.