Page 3 of 8

Re: Shadow Terminator problem

Posted: Fri Aug 09, 2019 11:01 am
by Dade
lacilaci wrote: Fri Aug 09, 2019 10:45 am cycles full lighting:

luxcore full lighting:
The bump mapping scale of LuxCore scene is something like 10x larger, are you sure it is the same scene ?

And Cycles is clearly lacking of the Shadow Terminator fix:

Image

Re: Shadow Terminator problem

Posted: Fri Aug 09, 2019 11:03 am
by lacilaci
Dade wrote: Fri Aug 09, 2019 11:01 am
lacilaci wrote: Fri Aug 09, 2019 10:45 am cycles full lighting:

luxcore full lighting:
The bump mapping scale of LuxCore scene is something like 10x larger, are you sure it is the same scene ?

And Cycles is clearly lacking of the Shadow Terminator fix.
same scene, opened and rendered with cycles, same texture, same mapping and I tried to match bump strenght as best I could. With luxcore those dark areas appear even with very low bump values.

I tried hdri as well and it looks to me as if it is the reflection of bright light is turning black in luxcore

Re: Shadow Terminator problem

Posted: Fri Aug 09, 2019 11:05 am
by lacilaci
Dade wrote: Fri Aug 09, 2019 11:01 am
lacilaci wrote: Fri Aug 09, 2019 10:45 am cycles full lighting:

luxcore full lighting:
The bump mapping scale of LuxCore scene is something like 10x larger, are you sure it is the same scene ?

And Cycles is clearly lacking of the Shadow Terminator fix
Yes, it's still not in master. But on the second page of this thread I posted pics from developers where they have it implemented and it's not turning bump mapping black.

Re: Shadow Terminator problem

Posted: Fri Aug 09, 2019 11:25 am
by Dade
lacilaci wrote: Fri Aug 09, 2019 11:03 am same scene, opened and rendered with cycles, same texture, same mapping and I tried to match bump strenght as best I could. With luxcore those dark areas appear even with very low bump values.
Your LuxCore material has 10x UV scale applied:

desktop.jpg

I have no idea how to check Cycles settings but I have such strong feeling the 10x factor is not there ... I mean look at the renderings you posted.

Re: Shadow Terminator problem

Posted: Fri Aug 09, 2019 11:49 am
by lacilaci
Of course you think it's wrong, because the difference in how bump mapping behaves is huge!

So here comes proof:

Cycles using texture as diffuse:
cycles_diffuse.jpg
Luxcore using texture as diffuse:
luxcore_diffuse.jpg
Clearly, mapping is identical just observe the pattern. Now just switch to bump instead of diffuse:

Cycles bump:
cycles_bump.jpg
luxcore bump:
luxcore_bump.jpg
Believe me now?
Sorry for the yellow cast on luxcore, but we don't have a good white balance controls for sun in luxcore :|

Take that scene of mine, and use some hdri with sun and then render in viewport realtime and slowly rotate the hdri in world controls. It should look like the sun's reflection is turning black...

Re: Shadow Terminator problem

Posted: Fri Aug 09, 2019 3:41 pm
by Dade
Can you do a test using an UV scale of "1" (i.e. no scale) ? I'm pretty sure you will get the same result out of Cycles and LuxCore (shadow terminator aside).

LuxCore scales the strength of the bump by 10 if you scale the UV by 10. This is a side effect of how the code is written (and probably was written in old Lux, I don't really remember). The logic was to scale all bumps (not only UV width/height but also how much they are deep or rise).

As another proof, if you scale the UV by 10 and compensate dividing strength by 10, you should already get the same Cycles results out of LuxCore.

To recap, all the following cases should produce the same results between Cycles and LuxCore:

1) UV scale 1, strength 1 (both for Cycles and LuxCore);

2) UV scale "X" (both for Cycles and LuxCore), strength 1 for Cycles, strength "1/X" for LuxCore;

My thesis is that this problem has nothing to do with shadow terminator fix, it is just very visible thanks to the shadow terminator fix.

Re: Shadow Terminator problem

Posted: Fri Aug 09, 2019 3:57 pm
by marcatore
Interesting this question of the UV scale... I haven't checked if it's already written somewhere...but it's quite not intuitive just looking the UI of the nodes needed for the bump.

Probably something that should have a warning or a rewrite.

Re: Shadow Terminator problem

Posted: Fri Aug 09, 2019 4:25 pm
by lacilaci
Alright, first some tests:

cycles as diffuse map:
cycles_diffmap.jpg
luxcore as diffuse map:
luxcore_diffmap.jpg
just so we know we have same scaling of 1...

cycles at scale 1:
cycles_scale1.jpg
luxcore at scale 1:
luxcore_scale1.jpg
we can already see some "patches" almost as if some clamping is happening to bump in the texture or inverted values, I don't know but clearly there is a difference..

cycles at scale 10:
cycles_scale10.jpg
luxcore at scale 10 and 1/10 of bump height to compensate for the weird behavior you described:
luxcore_scale10_compensated_strenght.jpg
here we see that not only is bump on luxcore much weaker now, but still very "patchy" and not making much sense, especially those darkening areas..

then there's this:
Dade wrote: Fri Aug 09, 2019 3:41 pm
LuxCore scales the strength of the bump by 10 if you scale the UV by 10. This is a side effect of how the code is written (and probably was written in old Lux, I don't really remember). The logic was to scale all bumps (not only UV width/height but also how much they are deep or rise).
Image

I hope that is just not true as it makes absolutely no sense and I have no way of knowing of such behavior as a user...

And lastly:

I also don't think this issue exist because of the shadow terminator problem. I think there was always something wrong with bump mapping in luxcore! It's unpredictable and weird at times.

EDIT:

I should mentioned that I tried, reseting normals, texture space, different gamma settings in both cycles and luxcore, all kinds of different strenght values in both cycles and luxcore to try and get matching behavior.

In cycles I always get predictable results but I have no idea what luxcore does. Sometimes, some values in some cases work, other times it's just all kinds of weird.

Re: Shadow Terminator problem

Posted: Fri Aug 09, 2019 5:21 pm
by Racleborg
I am not sure if this is relevant to the currently discussed Bump issue, but I don't appear to be getting any Bump effect be with the Checkerboard Texture like it does with other textures such as Distorted Noise?

(Images attached)

Thanks

Re: Shadow Terminator problem

Posted: Sat Aug 10, 2019 8:09 am
by provisory
I think it is related, that strong bump mapping flips normals:

Without bump:
no-bump.jpg

With bump:
with-bump.jpg

Edit: blend file attached