Page 1 of 8

Shadow Terminator problem

Posted: Wed Aug 07, 2019 9:20 am
by Dade
Introduction

This was the starting point in a quite extreme case:

old.jpg

Fixing a couple of problems

As first step I have fixed 2 problems:

1) the self-shadow problem in 2 triangles with a glancing angle with the light source (i.e. see the noise due to some self-intersection of shadow rays);
2) the horrible bounce back of light intensity on the edge.

and the result is:

new1.jpg

Note: the black triangles on the edge are unavoidable, their geometric normal points away from the light source so there is no way to fix them aside increasing tessellation and/or using softer shadows (due to a larger light source, etc.).

"Taming the Shadow Terminator" ... when using bump/normal mapping

This is another test:

bump-plain.jpg

Now look what happen if I add bump mapping:

bump-old.jpg

Lights magically appears from no where and start to illuminate also over the shadow termination. This is what

"Taming the Shadow Terminator"
by Matt Jen-Yuan Chiang, Yining Karl Li and Brent Burley

https://www.yiningkarlli.com/projects/s ... nator.html

can fix. This is the same rendering using the shadow terminator avoidance factor described in the paper:

bump-new.jpg

Better, now the renderings with and without bump mapping match each other.

P.S. this code is not part of beta3 but only available in daily builds.

Re: Shadow Terminator problem

Posted: Wed Aug 07, 2019 9:46 am
by lacilaci
Wow, never realized that the original shading was so insane! :D

Can't wait to test

EDIT:

Not being part of beta3 means I won't be able to use it in the build for 2.8 that Simon is preparing?

Re: Shadow Terminator problem

Posted: Wed Aug 07, 2019 10:29 am
by B.Y.O.B.
Hi, great work, this is definitely an improvement (although I still dream of a fix like in Thea render).

However, I have a scene here that shows some regressions.
Files attached.
lacilaci wrote: Wed Aug 07, 2019 9:46 am Not being part of beta3 means I won't be able to use it in the build for 2.8 that Simon is preparing?
I would include it if there were no regresssions.

Re: Shadow Terminator problem

Posted: Wed Aug 07, 2019 11:30 am
by FarbigeWelt
B.Y.O.B. wrote: Wed Aug 07, 2019 10:29 am Hi, great work, this is definitely an improvement (although I still dream of a fix like in Thea render).

However, I have a scene here that shows some regressions.
Files attached.
lacilaci wrote: Wed Aug 07, 2019 9:46 am Not being part of beta3 means I won't be able to use it in the build for 2.8 that Simon is preparing?
I would include it if there were no regresssions.
What regressions do you mean? The ‚spheres‘ look better overall in the New than in the Old.

Re: Shadow Terminator problem

Posted: Wed Aug 07, 2019 11:34 am
by FarbigeWelt
Finally, I can finish the crescent moon I started over a half year ago. 8-)
Great work, Dade! And thank you for the nice introduction.

Re: Shadow Terminator problem

Posted: Wed Aug 07, 2019 12:17 pm
by B.Y.O.B.
FarbigeWelt wrote: Wed Aug 07, 2019 11:30 am What regressions do you mean?
Flip between the images and look at the right side. The ground plane (flat shaded) shows some very weird tiled shadowing artifacts with the new code.

Re: Shadow Terminator problem

Posted: Wed Aug 07, 2019 2:35 pm
by lacilaci
So aside some shading issues which B.Y.O.B reported already, this is really really cool.

Even hard sunlight is handled well without going into crazy polycounts!!!
shadowTM.jpg

Re: Shadow Terminator problem

Posted: Wed Aug 07, 2019 2:37 pm
by Dade
B.Y.O.B. wrote: Wed Aug 07, 2019 10:29 am However, I have a scene here that shows some regressions.
I should have fixed this problem:

ok.jpg

Re: Shadow Terminator problem

Posted: Wed Aug 07, 2019 4:16 pm
by FarbigeWelt
Dade wrote: Wed Aug 07, 2019 2:37 pm
B.Y.O.B. wrote: Wed Aug 07, 2019 10:29 am However, I have a scene here that shows some regressions.
I should have fixed this problem:


ok.jpg
This tops everything! That is perfect! Congratulations! 🍾

Re: Shadow Terminator problem

Posted: Wed Aug 07, 2019 6:37 pm
by Sharlybg
What a time to be alive. Thanks you so much ;)