Author Topic: shadowcatcher and reflections problem  (Read 8406 times)

2018-10-09, 15:44:03

flood

  • Active Users
  • **
  • Posts: 36
    • View Profile
I want to use shadowcatcher to create a transparent background but want to keep the shadows so that I can composite it onto a background in photoshop.

When I render the scene everything look OK. But when I save the image as a PNG (with alpha) and open it in photoshop, the reflections on the ground are gone. It just doesn't look right.

When Saving the same image as a JPG, everything look OK but I have no transparency of course.

Top image is how it is rendered and saved as JPG
Bottom image is the same image but saved as PNG and then added a white background layer in photoshop. All reflections on the floor are gone.

2018-10-09, 16:20:22
Reply #1

pokoy

  • Active Users
  • **
  • Posts: 1873
    • View Profile
First thing is, of course, how can reflections appear if your background is white? They would have to be brighter than RGB 255, which is not possible in 8 or 16 bits.
Second thing is, shadows are multiplied while reflections are additive. You simply can't have both without splitting the render output, that's what render elements are for.

2018-10-09, 16:21:14
Reply #2

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
Try to save EXR with layers or tga alpha and compose it in photoshop.

2018-10-09, 16:44:57
Reply #3

flood

  • Active Users
  • **
  • Posts: 36
    • View Profile
First thing is, of course, how can reflections appear if your background is white? They would have to be brighter than RGB 255, which is not possible in 8 or 16 bits.
Second thing is, shadows are multiplied while reflections are additive. You simply can't have both without splitting the render output, that's what render elements are for.

Thanks for your reply, I still don't seem to understand this.

First : It doesn't matter what color I use as a background, the reflections aren't there.

Second : If corona is able to output the reflections on the screen and save it as a JPG, why wouldn't that pixel information be available in PNG?

2018-10-09, 16:45:59
Reply #4

flood

  • Active Users
  • **
  • Posts: 36
    • View Profile
Try to save EXR with layers or tga alpha and compose it in photoshop.

I tried both, the problems seems to be in the alpha, parts where the reflections are, are being cut off by the alpha channel

2018-10-09, 17:31:27
Reply #5

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
please show you alpha too

2018-10-09, 17:32:43
Reply #6

pokoy

  • Active Users
  • **
  • Posts: 1873
    • View Profile
Alpha probably considers only objects and shadows, which, if you think about it, isn't wrong at all.

Still, for what you want, you'd probably have to render all required elements and compose, as suggested above. There's simply no way to get reflections to appear correctly without using additive mode, which requires reflections to be separate.

2018-10-09, 17:40:52
Reply #7

flood

  • Active Users
  • **
  • Posts: 36
    • View Profile
Alpha probably considers only objects and shadows, which, if you think about it, isn't wrong at all.

Still, for what you want, you'd probably have to render all required elements and compose, as suggested above. There's simply no way to get reflections to appear correctly without using additive mode, which requires reflections to be separate.

But...but...but... I have seen it being done in the Corona shadowcaster tutorial (part 4). They have no problems with compositing with just rendering with shadowcaster only.

(fastforward to 2:03). I want/need just exactly the same effect.

2018-10-09, 17:48:19
Reply #8

flood

  • Active Users
  • **
  • Posts: 36
    • View Profile
please show you alpha too

This is the alpha channel. You can see clearly that the reflection in front of the box is just not there.

2018-10-09, 17:56:18
Reply #9

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
It's not  a reflection but light bounce. Beauty pass shows you all elements but alpha channel is different and you can a dd more shadows in material. In photoshop you can open your alpha in 32bit(what is way more than PNG alpha) and adjust levels to see more or less shadows

2018-10-09, 18:44:23
Reply #10

flood

  • Active Users
  • **
  • Posts: 36
    • View Profile

The "reflection" is indeed indirect lighting. So I rendered that out as a seperate element.
But unfortunatlyn when loading it in Photoshop, i get the same result.

In de rendering tab it looks good. But when saved to exr or png the indirect lighting on the floor is just gone.

2018-10-09, 19:55:18
Reply #11

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
Ok i think i am understand what you want, when you rendering in compositing mode and see in beauty pass this is not  real what is looks like,  turn off composing mode and you will  see real image, what you saw it's some kind indirect pass what will compose with alpha. Then you render without compose mode you will notice what you do not have light bounce, to add it setup more lights or some hdri environment then you will start to see bounce and then you  can change to compositing mode, now alpha will have this indirect bounce

2018-10-10, 00:39:04
Reply #12

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Just made a quick test with a teapot on a plane with shadow catcher material set to full reflection in compositing mode. Both the shadows and the reflections shows up in the alpha and is tranfered as expected when saved to tif-format with alpha activated.

Color-bleeding isn't transferred.

2018-10-10, 07:40:56
Reply #13

flood

  • Active Users
  • **
  • Posts: 36
    • View Profile
Ok i think i am understand what you want, when you rendering in compositing mode and see in beauty pass this is not  real what is looks like,  turn off composing mode and you will  see real image, what you saw it's some kind indirect pass what will compose with alpha. Then you render without compose mode you will notice what you do not have light bounce, to add it setup more lights or some hdri environment then you will start to see bounce and then you  can change to compositing mode, now alpha will have this indirect bounce

I tried rendering without compositing mode but the light bounce is still there.

EDIT : I set the backplate to black and now the light bounce is gone. It was white before.


2018-10-10, 08:54:48
Reply #14

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
That's strange. here how it works for me.

just white background in shadowcatcher and  direct visibility  with hdri in environment for light
http://imagizer.imageshack.com/img924/309/Fn5Xw2.jpg

this is how compositing looks, i've change direct visibility to black  for proper rendering alpha channel, it need in some case.
http://imagizer.imageshack.com/img922/7787/lNftla.jpg

Open exr in photoshop and apply alpha channel to mask layer
http://imagizer.imageshack.com/img921/4623/e5tzy4.jpg

with selected mask at layer cntl+l to adjust levels for mask to show less shadows
http://imagizer.imageshack.com/img922/4787/pKooIS.jpg

for  removing this bounce you need to use rayswitch material for shadowcatcher
« Last Edit: 2018-10-10, 09:00:57 by sprayer »