Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] I need help! => Topic started by: malindis on 2019-03-08, 10:30:15

Title: Multipass and shadow
Post by: malindis on 2019-03-08, 10:30:15
Hi,
how can I use the the shadow layer of my multiples rendering the compositing ???

I get an image where the shadow are white !!!

Thanks for your help.

Best
Title: Re: Multipass and shadow
Post by: TomG on 2019-03-08, 13:26:23
"Shows the shadows (energy subtracted from the image due to shadow ray occlusion). This is the complement to the beauty pass, showing white where there are black shadows. If this pass is linearly added to the beauty pass, it negates the visible shadows. Note that currently the shadows from environment lighting are always shown, resulting in a washed-out pass in typical interior renders." from https://corona-renderer.com/wiki/render_elements

So you need to subtract / invert the shadow pass.
Title: Re: Multipass and shadow
Post by: malindis on 2019-03-08, 13:42:56
Hi,

I have seen that, but I am not able to have a good rest in photoshop... maybe I'm doing something wrong...
Title: Re: Multipass and shadow
Post by: TomG on 2019-03-08, 13:52:17
Don't know - you'd place the shadowpass layer in Subtract mode, or you'd invest the shadowpass layer and use any of the more usual Screen, Darken etc. type modes depending on the effect you want to achieve.
Title: Re: Multipass and shadow
Post by: malindis on 2019-03-08, 13:54:25
This doesn't work :-)

Maybe I have to point that I'm using a shadowcatcher material to have a transparent background...
Title: Re: Multipass and shadow
Post by: TomG on 2019-03-08, 15:41:07
Maybe share some images of what you are trying to accomplish? In general, if you are using the shadowcatcher, it should do the job on its own, with no need for the shadow pass at all.
Title: Re: Multipass and shadow
Post by: malindis on 2019-03-08, 15:52:45
What I want to achieve is being able to manage the shadows in post-process.

Depending on the background used for the image I need a darker or lighter shadow...

Now I'm doing 2 renders. One with the object without shadows or background and the second with the shadow catcher and the object casting shadow but not visible... This works but double my render time ...
Title: Re: Multipass and shadow
Post by: TomG on 2019-03-08, 17:09:06
Not attempted that workflow, and probably lots of ways to solve it, here's some thoughts that might give a solution. Someone else might have an even better idea.

Here's a C4D scene and a PSD. The scene has a brick plane hidden in it just so I had something to render to use as a background that would match the perspective, but can be ignored for what I was doing.

There's a shadowcatching disk, which I used Rayswitch on so that it wouldn't reflect light onto the cube when rendered. It has an ID pass so I can selectively remove the cube in post. I can use the beauty pass and the cube ID mask to show just the cube without shadows. I can then either use the beauty pass, remove the cube using the ID pass as a mask, and then I get just the shadows which I can use Normal (or other variation) as a layer, and can adjust opacity to control shadow color. Or I can use the Shadows pass, do the same ID pass mask, and use Subtract mode with the layer, and then use Opacity to control the strength of the shadows (in this case, the disc doesn't really need to use the Shadowcatcher).

I didn't try and resolve the anti-aliasing question of the cube in this test (I also used white when rendering, but the saved scene has grey which should in theory be better for anti aliasing).

Both ways require just one render rather than two, and may give inspiration for how you might resolve it.

Title: Re: Multipass and shadow
Post by: malindis on 2019-03-08, 17:41:51
Oh yes, I haven't thought of using ID's to mask parts of my scene... I'll will try this path and investigate more...

Thanks for the idea.

best
Title: Re: Multipass and shadow
Post by: studiobasler on 2019-03-14, 09:52:37
So im in the same situation. I have to prepare about 20 different colors for the facade and therefore i would like to just create solids in photoshop and blend them with the different multipasses, but i also cant archiv the correct shadow behavior. So i made a couple of screenshot to show the problem. The left side od the house has to be dark as shown in the "BaseBottomLayer", but soon as i invert the shadow map and put it on top of the solid layer it brightens the left side. ANy suggestions how to set up my photoshop file to get the correct result?

Thank You
Christian

Title: Re: Multipass and shadow
Post by: TomG on 2019-03-14, 12:21:19
What mode did you use to apply the Shadow layer? You could use Subtract without inverting it. If inverted, something like Darken or Multiply should do it.
Title: Re: Multipass and shadow
Post by: studiobasler on 2019-03-14, 12:28:05
I tried both methods. do i have to apply another pass on top of it? If you like i can post the psd file.

k r
Christian
Title: Re: Multipass and shadow
Post by: TomG on 2019-03-14, 12:47:49
Shouldn't need anything else - with darken or multiply, not sure how it would be possible for something to get brighter :)