Glass ad caustic issue

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
User avatar
TAO
Developer
Posts: 595
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Glass ad caustic issue

Post by TAO » Sat Apr 17, 2021 11:44 pm

I have a problem with the glass, when i use RoughGlass caustic is much better than Clear Glass and with thin glasses, i can not get good results. is the same when two glasses are inside each other.
Screenshot 2021-04-18 014044.jpg
Can anyone put me in the right direction here?
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 590#p30154

User avatar
Dade
Developer
Posts: 5236
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Glass ad caustic issue

Post by Dade » Sun Apr 18, 2021 9:06 am

Have you enabled light tracing (aka hybrid rendering) ? Otherwise rough glass caustics are a lot easier to render for plain path tracer than sharp glass one.

Try to use a point light: at that point caustics can not be rendered at all without light tracing.
Support LuxCoreRender project with salts and bounties

User avatar
TAO
Developer
Posts: 595
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Glass ad caustic issue

Post by TAO » Sun Apr 18, 2021 9:23 am

Here is my scene, i do not know why the vine render in the blank after it goes behind the glass. can you take a look at the scene, please?
Caustic.zip
(508.57 KiB) Downloaded 24 times
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 590#p30154

User avatar
Dade
Developer
Posts: 5236
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Glass ad caustic issue

Post by Dade » Sun Apr 18, 2021 10:26 am

TAO wrote:
Sun Apr 18, 2021 9:23 am
Here is my scene, i do not know why the vine render in the blank after it goes behind the glass. can you take a look at the scene, please?
Caustic.zip
You need to enable hybrid path/light tracing with the following .cfg properties:

Code: Select all

# For CPU rendering
path.hybridbackforward.enable = 1
path.hybridbackforward.partition = 0.8
path.hybridbackforward.glossinessthreshold = 0.05
# Or for CPU+GPU rendering
path.hybridbackforward.enable = 1
path.hybridbackforward.partition = 0.0
path.hybridbackforward.glossinessthreshold = 0.05
The result will be (in a couple of seconds of rendering):

ff0.jpg

Notice how the rough glass caustic is noisy because it is still done trough normal path tracing (it has U/V roughness is 0.1). If you set

Code: Select all

path.hybridbackforward.glossinessthreshold = 0.11
It will be done with light tracing too:

ff1.jpg

Hybrid Back/Forward path tracing (aka BiDir without MIS) is described here: https://forums.luxcorerender.org/viewto ... f=5&t=1187
Support LuxCoreRender project with salts and bounties

User avatar
TAO
Developer
Posts: 595
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Glass ad caustic issue

Post by TAO » Sun Apr 18, 2021 10:44 am

Great thank you i get the caustic result, what about the black color with vine when it is inside of the glass.
Also, there is a strange color in the middle of the glass.
Screenshot 2021-04-18 124324.jpg
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 590#p30154

User avatar
Dade
Developer
Posts: 5236
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Glass ad caustic issue

Post by Dade » Sun Apr 18, 2021 2:08 pm

TAO wrote:
Sun Apr 18, 2021 10:44 am
what about the black color with vine when it is inside of the glass.
It is an SDS, something not even plain BiDir can render. You need to use shadow transparency for the glass or caustic cache:

- https://forums.luxcorerender.org/viewto ... f=5&t=1474 (check the orange juice glass rendering)
- https://forums.luxcorerender.org/viewto ... f=5&t=2927 (but it can be used with path tracing too)
Support LuxCoreRender project with salts and bounties

User avatar
TAO
Developer
Posts: 595
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Glass ad caustic issue

Post by TAO » Sun Apr 18, 2021 3:02 pm

Dade wrote:
Sun Apr 18, 2021 2:08 pm
TAO wrote:
Sun Apr 18, 2021 10:44 am
what about the black color with vine when it is inside of the glass.
It is an SDS, something not even plain BiDir can render. You need to use shadow transparency for the glass or caustic cache:

- https://forums.luxcorerender.org/viewto ... f=5&t=1474 (check the orange juice glass rendering)
- https://forums.luxcorerender.org/viewto ... f=5&t=2927 (but it can be used with path tracing too)
Thank you i did not see that option in the wiki so i missed it, is this a common parameter and can be added to all materials?
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 590#p30154

User avatar
B.Y.O.B.
Developer
Posts: 4049
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Glass ad caustic issue

Post by B.Y.O.B. » Sun Apr 18, 2021 3:27 pm

TAO wrote:
Sun Apr 18, 2021 3:02 pm
is this a common parameter and can be added to all materials?
Yes, it's this one: https://github.com/LuxCoreRender/LuxCor ... s.cpp#L535
Note that it's a color.

User avatar
TAO
Developer
Posts: 595
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Glass ad caustic issue

Post by TAO » Sun Apr 18, 2021 6:30 pm

It is much much better and almost most part working but still, I'm not able to get rid of the black parts. Vine inside the glass and button of the glass.
Screenshot 2021-04-18 202323.jpg
that's my parameters with PATHOCL

Code: Select all

path.hybridbackforward.enable = 1
path.hybridbackforward.partition = 0.0
path.hybridbackforward.glossinessthreshold = 0.05
For Material, add:

Code: Select all

scene.materials.glass-right.transparency.shadow = 0.85 0.85 0.85
of course, i tried to tweak the parameters with no luck.
the only option that works a bit was transparency but made the vine a bit unrealistic.
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 590#p30154

User avatar
Dade
Developer
Posts: 5236
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Glass ad caustic issue

Post by Dade » Sun Apr 18, 2021 8:08 pm

Try to rise the glasses if the bottom is touching the aground plane, it can be a problem.

I assume you have already raised the path max. depth too.
Support LuxCoreRender project with salts and bounties

Post Reply