Page 2 of 6

Re: Two well known luxcore problems.

Posted: Mon Aug 23, 2021 1:27 pm
by Sharlybg
He was talking about SDS caustics.

Re: Two well known luxcore problems.

Posted: Mon Aug 23, 2021 1:38 pm
by Dade
Sharlybg wrote: Mon Aug 23, 2021 10:19 am
Dade wrote: Mon Aug 23, 2021 9:44 am
Sharlybg wrote: Mon Aug 23, 2021 9:08 am It is this issue : viewtopic.php?f=5&t=3003&p=27539&hilit= ... ass#p27539
There is no test scene in the linked post.
here you go RoughBall.blend
I fixed a bug in rough glass material. This was before the fix:

old.jpg

and this is now:

new.jpg

Re: Two well known luxcore problems.

Posted: Mon Aug 23, 2021 1:57 pm
by Sharlybg
Wait do you mean that now Luxcore glass behave like that : https://youtu.be/JtBTffVVa-c

Re: Two well known luxcore problems.

Posted: Mon Aug 23, 2021 4:22 pm
by Martini
Dade wrote: Mon Aug 23, 2021 1:38 pm I fixed a bug in rough glass material. This was before the fix:

old.jpg

and this is now:

new.jpg
Hi Dade, I have built that commit but it seems still not correct. :?

From what I can guess/observe by looking at the render result, it looks like the transmission is not present in the rough glass, and perhaps the normals are a bit weird also.

In this rendering I have placed some metal materials next to the rough glass for comparison. The object is just a cube with a bevel and solidify modifier, to give the surface a real thickness, in this way you can see the transmission effects of the glass more easily. And the UV grid on the ground plane allows you to see what is reflected vs. what is transmitted.
roughglass.blend
(348.61 KiB) Downloaded 229 times
roughglass.jpg
Edit: and here is the equivalent in Cycles. Also interesting to note is the different roughness values to achieve the same look.
roughglass-cycles.jpg

Re: Two well known luxcore problems.

Posted: Mon Aug 23, 2021 4:31 pm
by TAO
Dade wrote: Mon Aug 23, 2021 1:38 pm
Sharlybg wrote: Mon Aug 23, 2021 10:19 am
Dade wrote: Mon Aug 23, 2021 9:44 am

There is no test scene in the linked post.
here you go RoughBall.blend
I fixed a bug in rough glass material. This was before the fix:


old.jpg


and this is now:


new.jpg
great, is it available in GitHub yet?

Re: Two well known luxcore problems.

Posted: Mon Aug 23, 2021 4:53 pm
by Martini
TAO wrote: Mon Aug 23, 2021 4:31 pm great, is it available in GitHub yet?
Yes, my rendering above is done with the new code.

Re: Two well known luxcore problems.

Posted: Tue Aug 24, 2021 10:42 am
by Dade
I'm looking at the code, it is based on the old Lux version and there are parts that doesn't make very much sense. For instance, try to render rough glass with an IOR of 1.0 and it will clearly fail because how the code is written. I have looked at old Lux code and it is the same (it should also produce the same results).

I will wait for the new Disney support for transmission or I will just have to rewrite this thing from scratch.

Re: Two well known luxcore problems.

Posted: Tue Aug 24, 2021 11:59 am
by Martini
Dade wrote: Tue Aug 24, 2021 10:42 am For instance, try to render rough glass with an IOR of 1.0 and it will clearly fail because how the code is written. I have looked at old Lux code and it is the same (it should also produce the same results).
Well, don't feel too bad - I tried it in Cycles too, and their Multiscatter GGX method also gives black results with IOR of exactly 1.0. :roll:

Dade wrote: Tue Aug 24, 2021 10:42 am I will wait for the new Disney support for transmission or I will just have to rewrite this thing from scratch.
Do you know if the Disney implementation will support multiscattering? Otherwise it might have a similar darkening issue (although the transmission might work better).

Re: Two well known luxcore problems.

Posted: Tue Aug 24, 2021 2:08 pm
by Dade
Martini wrote: Tue Aug 24, 2021 11:59 am
Dade wrote: Tue Aug 24, 2021 10:42 am For instance, try to render rough glass with an IOR of 1.0 and it will clearly fail because how the code is written. I have looked at old Lux code and it is the same (it should also produce the same results).
Well, don't feel too bad - I tried it in Cycles too, and their Multiscatter GGX method also gives black results with IOR of exactly 1.0. :roll:
That is quite strange ... must be the same method.
Martini wrote: Tue Aug 24, 2021 11:59 am
Dade wrote: Tue Aug 24, 2021 10:42 am I will wait for the new Disney support for transmission or I will just have to rewrite this thing from scratch.
Do you know if the Disney implementation will support multiscattering? Otherwise it might have a similar darkening issue (although the transmission might work better).
No, I think default Disney has a normal GGX distribution (by default, to maintain compatibility, it can not be even changed in order to match all other Disney materials implemented in other application).

Re: Two well known luxcore problems.

Posted: Tue Aug 24, 2021 2:24 pm
by Martini
Dade wrote: Tue Aug 24, 2021 2:08 pm
Martini wrote: Tue Aug 24, 2021 11:59 am
Dade wrote: Tue Aug 24, 2021 10:42 am I will wait for the new Disney support for transmission or I will just have to rewrite this thing from scratch.
Do you know if the Disney implementation will support multiscattering? Otherwise it might have a similar darkening issue (although the transmission might work better).
No, I think default Disney has a normal GGX distribution (by default, to maintain compatibility, it can not be even changed in order to match all other Disney materials implemented in other application).
Ah, that must explain why they have this: :idea:
Cycles Principled Shader Distribution setting
Cycles Principled Shader Distribution setting

And I guess that means we would have to do something similar (at least for the Disney material). Maybe for roughglass it's OK for LuxCore to use Multiscatter GGX exclusively?