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
Developer
Posts: 850
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Glass ad caustic issue

Post by TAO »

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?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Glass ad caustic issue

Post by Dade »

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
Developer
Posts: 850
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Glass ad caustic issue

Post by TAO »

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 270 times
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Glass ad caustic issue

Post by Dade »

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: viewtopic.php?f=5&t=1187
Support LuxCoreRender project with salts and bounties
User avatar
TAO
Developer
Developer
Posts: 850
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Glass ad caustic issue

Post by TAO »

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
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Glass ad caustic issue

Post by Dade »

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:

- viewtopic.php?f=5&t=1474 (check the orange juice glass rendering)
- viewtopic.php?f=5&t=2927 (but it can be used with path tracing too)
Support LuxCoreRender project with salts and bounties
User avatar
TAO
Developer
Developer
Posts: 850
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Glass ad caustic issue

Post by TAO »

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:

- viewtopic.php?f=5&t=1474 (check the orange juice glass rendering)
- viewtopic.php?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?
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Glass ad caustic issue

Post by B.Y.O.B. »

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
Developer
Posts: 850
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Glass ad caustic issue

Post by TAO »

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.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Glass ad caustic issue

Post by Dade »

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