Author Topic: Problem with Alpha that has "holes"  (Read 2203 times)

2018-11-25, 10:32:19

hummus

  • Active Users
  • **
  • Posts: 5
    • View Profile
Hi,

I have a very simple scene - a ball on a surface with a single light. The surface has noise on it so that the shadow on it will be rough and will look like shadow on grass. I am using the Corona Shadow Catcher on it.
The final image of the ball and the shadow will be composited on a photo of grass.
The problem is - the alpha channel has holes in it where the shadow is. So the lit grass from the photo show through the holes of the alpha - where they should actually be included in the shadow of the ball.
It looks as if the shadow catcher only catches shadows on faces facing the light source but not in the volume of the whole shadow.
Does anyone know of this problem and how to correct it?

Thanks!

2018-11-26, 09:26:37
Reply #1

hummus

  • Active Users
  • **
  • Posts: 5
    • View Profile
Did a small similar test with Vray (teapot instead of sphere) - and that alpha worked fine. Opaque the way it should be.
Any ideas on what's wrong with the Shadow Catcher (Corona 1.7.4)?

2018-11-26, 10:07:41
Reply #2

hummus

  • Active Users
  • **
  • Posts: 5
    • View Profile
Some comparisons:
Simple teapot on a surface with a large noise level (to see the problem more clearly)
When rendered with Vray using the MtlWrapper, Matte Surface (alpha contribution -1), including shadows and affect alpha - I get a proper opaque alpha with jaggered edges like I want.
When rendered with Corona using the Shadow Catcher - I get "holes" in the alpha channel.

In short - the Shadow Catcher isn't working well.
Using Corona 2.0, Vray 3.60

2018-11-26, 10:38:12
Reply #3

Frood

  • Active Users
  • **
  • Posts: 2001
    • View Profile
    • Rakete GmbH
I think this is correct/expected. You get non black alpha only where there is actually some shadow on the plane from non-shadowcatcher objects (for good reasons, shadowcatcher does not cast shadows on itself or other objects with shadow catcher material applied.)


Good Luck



Never underestimate the power of a well placed level one spell.

2018-11-26, 10:48:40
Reply #4

hummus

  • Active Users
  • **
  • Posts: 5
    • View Profile
If this is the correct way ShadowCatcher works then it's a problem. It doesn't imitate real world. If I place a ball on the grass, the grass-blades faces that don't point towards the light source - in real world - will still be in the shadow. Using the Shadow-Catcher they'll be lit. This would be wrong.
What, then, would be Corona's method of solving this wrong behavior? A different material other than Shadow-Catcher?

Thanks.

2018-11-26, 13:21:31
Reply #5

Frood

  • Active Users
  • **
  • Posts: 2001
    • View Profile
    • Rakete GmbH
Using shadowcatcher is far from reality anyway But what's even more off from reality is the plane imitating the grass of the original image. If you would be able to model the grass exactly like it is in the original image, everything would be ok because the self-shadow of the grass should already be in the image and you would only get additional shadow on the blades where the pot casts some. But of course you cannot. BTW: the alpha of the teapot itself is also "wrong" for the same reason.

With shadow catcher you get the shadow cast by scene objects, that's the intention of shadow catcher: to catch shadows. It is no wrong behaviour what you see. If the plane would cast shadows on itself, you would get double shadows - that would be wrong (even though it may be a valid, quick aproximation in this case, that's what you are after).
Additionally you could also say that the result you would like to see (continuous shadow) is wrong because when you compose that part, you would remove valid existing reflections present in the backplate grass as well. So talking about real world in this context is more talking about fakes and workflows.

I'd also like to see some more advanced matte/shadow material with a few more fake-tweaks (include/exclude objects/self-shadow, more shadow control generally) since I regulary hit the limits doing more complex scenes but was not able to turn it into a reasonable and realizable feature request yet.

In your case - depending on the actual scene and detail level - I would propably just remove the noise from the plane and mask the edges with some grass brush in post (or geometry in the scene), you need to do that for the object itself anyway.


Good Luck



Never underestimate the power of a well placed level one spell.

2018-11-26, 13:35:38
Reply #6

hummus

  • Active Users
  • **
  • Posts: 5
    • View Profile
Actually - my initial setup was with scattered grass blades - and I got exactly the same result. The problem is with the material shader and not the geometry. I switched to noise because it was simpler to do for a large area when all that was important is the jaggered edges of the shadows.

Also - I cannot do it in a fake setup because it's not a still I'm after - but an animation - so the ball bounces and rolls.
I was actually really looking forwards to rendering this using Corona but may go back to VRay since I don't think I can rely on this odd behavior of the matte/shadow.
Maybe it's the correct way the shadow-catcher works, but the matte solution for Vray does it correctly - the way I need it. I think the proper fix for the shadow catcher is - instead of focusing only on the areas that get the shadow - it should otherwise focus on the areas that don't get light. Sounds like it's the same thing but it's not.


2018-11-26, 13:50:10
Reply #7

Frood

  • Active Users
  • **
  • Posts: 2001
    • View Profile
    • Rakete GmbH
does it correctly - the way I need it

Yes, legitimation enough.


Good Luck



Never underestimate the power of a well placed level one spell.

2018-11-30, 16:48:58
Reply #8

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13777
  • Marcin
    • View Profile
Looks like what the user would like to do here is catching the shadows, which the shadowcatcher is casting on itself. Looks like currently it is not possible.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us