PDA

View Full Version : Full shadow mode



Marius Roth
02-18-2016, 09:50 AM
Hi all,

Don't get my head around it: I have this bowl-like building, on which i want a shadow (and only the shadow) to run across; Denis Pontonnier's sunsky plug-in is great for the animation (as always) but i don't get the shadow buffer i expect:
132448

132449

(i tinted the shadows blue and put on shadow-catcher material on the vertical walls)
So, why this happens? I tried different combinations on shadow settings per object, variations in double sideness, ray recursion, switching to default lights and such.

The effects seems to happen were the diffuse value of the wall is - 0, but that's only a guess.

So, guesses, anyone? As always, project is running late .. :king:

Sensei
02-18-2016, 07:25 PM
You should attach scene to play with..

"Shadow" in 3d gfx is something that is calculated this way: when ray from camera hit surface, there is send as many rays as there is light sources, each one in direction which is negative "light sample" (only in the case of distant light it's constant value, and easy to tell value). Typically it's somehow correlated to light angle (rotation). In the case of point light it's normalized vector between world spot info and light source position.
If there is obstacle between spot info world position in mentioned direction, then it's in "shadow" (and colored accordingly to Light Properties > Shadow Color).
Many people that don't understand it, complain that f.e. shadow catcher doesn't "work with GI".
(and even after explaining it, they still don't understand it, demanding to work it with GI in "the next release"..)

Example: clear scene in Layout, make ball, turn smoothing, adjust Light Properties, Shadow Color to red.
From your point of view half of sphere should be red, right? But it's not red. It's not in shadow from above algorithm point of view.
But if there is ball, and ground plane below it: this plane has red shadow.

shenhua
02-19-2016, 10:34 AM
I haven't red the whole thread, kinda busy now, so sorry if I'm repeating after Sensei here.

But if I were you, Marius, I would check if it's perhaps the self shadow issue? If the shadow is projected by self shadowing (you can go to object property and check/uncheck it to see if it's that particular shadow). And if it the self shadow, and you don't have it properly giving the shadow you might have the problem I had recently and try to experiment with "shadow offset" and put it above 100mm and such. Again, just a shot in the dark but you might want to check that.

Marius Roth
02-20-2016, 10:49 AM
Hi Sensei, Shenua,

thanks for the tips. With our explanation i understand the algorithm-way of thinking for shadows much better, sensai. I tried shadow offset which works in one direction as you see in the pictures, but minus-values don't work there.
As solution for my problem i ended up with feeding the diffuse-shade buffer through a gradient (to adjust contrast) and mixing it with the shadow buffer (later on i removed shadow buffer from this node setup, because it was not necessary) with the image filter Node - Thanks again Denis Pontonnier!

132505
132508
132507

shenhua
02-20-2016, 01:29 PM
Nice. Glad you've managed to work around the issue. I also have those moments when I think that I'd be like a coal miner without a hand without Denis' plugins :)