Page 1 of 2

Glass ad caustic issue

Posted: Sat Apr 17, 2021 11:44 pm
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?

Re: Glass ad caustic issue

Posted: Sun Apr 18, 2021 9:06 am
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.

Re: Glass ad caustic issue

Posted: Sun Apr 18, 2021 9:23 am
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 285 times

Re: Glass ad caustic issue

Posted: Sun Apr 18, 2021 10:26 am
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

Re: Glass ad caustic issue

Posted: Sun Apr 18, 2021 10:44 am
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

Re: Glass ad caustic issue

Posted: Sun Apr 18, 2021 2:08 pm
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)

Re: Glass ad caustic issue

Posted: Sun Apr 18, 2021 3:02 pm
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?

Re: Glass ad caustic issue

Posted: Sun Apr 18, 2021 3:27 pm
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.

Re: Glass ad caustic issue

Posted: Sun Apr 18, 2021 6:30 pm
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.

Re: Glass ad caustic issue

Posted: Sun Apr 18, 2021 8:08 pm
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.