Shadow Terminator problem

Discussion related to the LuxCore functionality, implementations and API.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

So, I'm playing around with new build and it seems this terminator treatment introduces new problems to bump mapping!

some black spots on bump map and darkening of edges appear..

here's strong bump mapping with old behavior:
bumpheavy_OLD.jpg
of course it looks wrong with the terminator but overal the bump is pretty much perfect (aside being overdone)

here's again strong bump mapping with newest luxcore and shadow terminator treatment:
bumpheavy.jpg
now shading looks ok without terminator but bump mapping is all kind of wrong and it gets way too dark especially at glancing angles

This is pretty bad issue cause it's visible even with a very weak bump mapping:
bump.jpg
this is without bump map:
nobump.jpg
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

for comparison, here's how strong bump map looks like in cycles:
cycles_heavy_bump.jpg
sadly I don't know how they go about this issue.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

And, of course here's a simplified scene:
bumpproblemscene.blend
(4.68 MiB) Downloaded 157 times
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

and here's also a comparison how bump mapping and this shadow terminator treatment is handled in cycles:

before fix
Image

after
Image

So I hope this can be fixed in luxcore
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Shadow Terminator problem

Post by Dade »

lacilaci wrote: Thu Aug 08, 2019 6:04 am And, of course here's a simplified scene:
bumpproblemscene.blend
Are you sure to have posted the right scene ? I press F12 and I get a rendering without any bump mapping.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

Dade wrote: Thu Aug 08, 2019 2:16 pm
lacilaci wrote: Thu Aug 08, 2019 6:04 am And, of course here's a simplified scene:
bumpproblemscene.blend
Are you sure to have posted the right scene ? I press F12 and I get a rendering without any bump mapping.
shit, It probably didn't package the texture... I'll check that out
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

Ok, here's a file with packed texture. I also had to change the texture cause the file was too big.

here's old bump map behavior:
The attachment bumpheavy_OLD.jpg is no longer available
here's latest build:
bumpheavy_OLD.jpg
aand this hopefuly works now:
bumpheavy.jpg
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Shadow Terminator problem

Post by Dade »

As far as I can see, the problem is in the old rendering, not in the new one. This is a rendering with old code (different scale and lighting just to show better the topic):

old.jpg

See how all bump image pixel are lighted ? This should ring a bell, with a such brutal bumps, something should be in shadow. This is the some rendering with the new code:

new.jpg

See how some bump image pixels is now totally in shadow ? Focus on the red circled area, the old code render all bright while the new one (correctly) cast shadows on the bump back sides.

Clearly, if you scale up the bump map the difference will be greater and greater.
lacilaci wrote: Thu Aug 08, 2019 6:10 am and here's also a comparison how bump mapping and this shadow terminator treatment is handled in cycles:

[...]

So I hope this can be fixed in luxcore
It works really well in LuxCore, this is a rendering with the old code:

old2.jpg

and this with the new one:

new2.jpg

The rendering with the new code is clearly better and doesn't suffer of the shadow terminator (with bump map) problem.

Just switch between the 2 renderings and you will clearly have the feeling that old code was creating light from nowhere.

About Cycles, you are comparing 2 totally different test scenes, repeat the same tests with Cycles and you should get exactly the same results, as far as I know.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Shadow Terminator problem

Post by lacilaci »

cycles full lighting:
cyc.jpg
luxcore full lighting:
lux.jpg
cycles direct only:
cyc_direct.jpg
luxcore direct only:
lux_direct.jpg
I cannot match skylight and sun white balance exactly but to me it seems pretty clear which surface looks more correct.
provisory
Posts: 235
Joined: Wed Aug 01, 2018 4:26 pm

Re: Shadow Terminator problem

Post by provisory »

The light softness is very different. Try with a distant mesh light instead.
Post Reply