Page 1 of 2

Disable self shadow?

Posted: Mon Jul 08, 2019 6:01 pm
by Egert_Kanep
Seems that this feature is not currently implemented, but I was wondering if there could be a workaround.

I have a simple scene where I need to extract shadows for only one object, be it either using shadowcatcher or using aov shadowmasks. My problem that I am facing is that another object is casting it's shadow on sphere's shadow and there is no way to separate these two, at least I haven't figured it out yet.

Does anyone have ideas?

Re: Disable self shadow?

Posted: Mon Jul 08, 2019 6:15 pm
by Dade
Egert_Kanep wrote: Mon Jul 08, 2019 6:01 pm My problem that I am facing is that another object is casting it's shadow on sphere's shadow
Make the "other" object invisible to the light source :?: It may work, I'm not totally sure to understand the type of result you are looking for.

Re: Disable self shadow?

Posted: Mon Jul 08, 2019 6:25 pm
by Egert_Kanep
Ideal case would be to have wall cast shadow on sphere, but not onto itself. So that wall and ground would only recieve shadow from that sphere. If that makes sense.

Note: wall and ground are one mesh

Re: Disable self shadow?

Posted: Mon Jul 08, 2019 7:10 pm
by kintuX
Egert_Kanep wrote: Mon Jul 08, 2019 6:01 pm Seems that this feature is not currently implemented, but I was wondering if there could be a workaround.

I have a simple scene where I need to extract shadows for only one object, be it either using shadowcatcher or using aov shadowmasks. My problem that I am facing is that another object is casting it's shadow on sphere's shadow and there is no way to separate these two, at least I haven't figured it out yet.

Does anyone have ideas?
For such "magic" there's a Front/Back Opacity node. ;)
e.g.
F-B_opacity~disableselSshadow.jpg

Re: Disable self shadow?

Posted: Mon Jul 08, 2019 7:39 pm
by Egert_Kanep
I am aware of that node. Doesn't do what I was talking about. You see now, that sphere is missing shadow from the wall

Re: Disable self shadow?

Posted: Mon Jul 08, 2019 7:46 pm
by CodeHD
Is there a feature like in another rendering engine/software that you are referring to? I think I know what you mena, but I'm trying to think if this is even possible to define in a general case... :?:

Re: Disable self shadow?

Posted: Mon Jul 08, 2019 7:50 pm
by lacilaci
Wow, even if there was a rayswitch, I have no idea how would you put this together.

Maybe another feature I proposed would help, "exclusive/inclusive" lighting. making a list of objects that are affected/unaffected by a light...?

Both rayswitching and exclusive lighting is already on github, but I don't think it's doable before 2.3 since this probably cuts deep in the shading core. Who knows, Dade is the master here.

Re: Disable self shadow?

Posted: Mon Jul 08, 2019 8:13 pm
by Egert_Kanep
Maybe I got a solution, a bit wonky, but I'll give it a try

Re: Disable self shadow?

Posted: Mon Jul 08, 2019 9:30 pm
by kintuX
Egert_Kanep wrote: Mon Jul 08, 2019 7:39 pm I am aware of that node. Doesn't do what I was talking about. You see now, that sphere is missing shadow from the wall
Right... Would help, if you took a moment and be up to the point - had shown what you already know, provide clear example and possibly an engine which does, how it's done what you're asking for.

Simple, most practical solution is to split objects or just render twice & comp it :roll:

Re: Disable self shadow?

Posted: Tue Jul 09, 2019 7:47 am
by Egert_Kanep
Hey, thanks for taking time to help, now I have an example of the result I am trying to achieve done with clarisse.

So sphere is receiving all shadows and casts shadows. Wall and ground (one mesh) is casting shadows, but not receiving self shadows. Then we get a rendering where sphere has wall shadows on it and casts shadows onto ground, which is what I am trying to figure put how to do with Lux.

It is a bit if a niche case, but for doing vfx, it is very handy