2

I am working on a project that requires me to have control of shadows in the compositor (specifically, to darken or lighten them.) In BI, I would simply take the shadow pass and ramp it, them multiply it back in. But my scene involves mesh lights, and the Shadow pass only has Lamps and Environment lighting.

It seems that it should be possible to get the info I need for mesh lights from Direct Passes, and for indirect light from Indirect passes. But I am stuck on how to do this without also getting too much other info from those passes. From googling around, I've seen that others have run into this problem, but I couldn't find anybody that had actually tried to solve it.

Does anyone know a way to do this? Or can it be confirmed that it cannot be done for some reason?

EDIT: It is not enough to get shadows cast on other objects, which is covered by some other answers. I need the shading on each model itself as well. This is not for a shadow catcher, it is for isolating both cast shadows and shading so they can be worked with.

Ascalon
  • 6,579
  • 8
  • 55
  • 121
  • A really proper solution currently needs some renderlayer tricks which get complicated with more complex scenes. Ideally we'd have a "shadow catcher" shader in cycles, but we don't yet :/ – gandalf3 Mar 24 '15 at 04:46
  • 3
    I'm voting to close this question as off-topic because it appears to be a feature request – GiantCowFilms Apr 11 '15 at 15:47
  • @GiantCowFilms it's a request for a workaround. Sure, it could be solved by a new or expanded feature, but that's true of many questions that get asked. But I found a solution. – Ascalon Apr 11 '15 at 20:16

1 Answers1

2

I was able to solve it in the end by darkening certain passes before combining them. The usual combination method is Direct Pass + Indirect Pass multiplied by color pass. The Direct+Indirect contains all the lighting and shadow information, but does not have any material colors to throw off the ramping.

I took the direct+indirect, ramped it to get a mask of the desired darkening, then multiplied the direct+indirect by it. Then I multiplied by color, completing the combined pass. This was also done for the Gloss using a different ramp for more artistic control. enter image description here

Ascalon
  • 6,579
  • 8
  • 55
  • 121