playing with caustics

Post your tests, experiments and unfinished renderings here.
User avatar
epilectrolytics
Donor
Donor
Posts: 561
Joined: Thu Oct 04, 2018 6:06 am

caustics from indirect light

Post by epilectrolytics » Mon Sep 09, 2019 9:27 am

While waiting for the SDS solution to mature I started experimenting with caustics from indirect light.
The first attempt made from two old scenes seemed to me as if the caustics were too weak.
room3b.jpg
Then I realized that when rendering with indirect PGI indirect caustic paths don't connect to lights but end with a cache lookup.
Also rendering a reference with Metropolis took too long on a scene that complex.

So I made a test scene with a glass cube in a room with an opening in a wall to another room illuminated by an area light.
indircauPCM.jpg
Test results:
Neither light tracing nor caustic cache render indirect caustics :cry:
But Metropolis sampling does, better with PathCPU than BiDir :)
PathOCL Metro shows the best caustics, but more fireflies and doesn't really converge even when approaching 100.000 samples.
Also it renders way brighter with brightness change during render :?:
indircauPOM.jpg
indicaustest_LuxCore.zip
(110.32 KiB) Downloaded 16 times
Conclusion: For difficult path combinations PathCPU+Metropolis is the way to go.

This makes me wish path guiding would be considered as the next render development project after Path Regularization is finished.
Because right now we are piling up quick fixes that cover single problems leaving others unsolved.
Like: PathOCL + PGI: Blazingly fast but unbiased and no good caustis
First fix: Hybrid Path with fast caustics but missing SDS
Second fix: Path Regularization for SDS (fast or slow, easy or tricky - yet unknown)
Still no indirect caustics.

Compared with this path guiding (Corona style) would be slower (CPU only) but faster than BiDir is now and cover all path type combinations.
Also it would work "under the hood" without requiring the user to decide which engine/sampler combination to use or long trial & error parameter tweaking sessions.
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 & Win10Pro PC 16GB Ryzen 2700X, 2 x RTX 2070

User avatar
epilectrolytics
Donor
Donor
Posts: 561
Joined: Thu Oct 04, 2018 6:06 am

Re: playing with caustics

Post by epilectrolytics » Tue Sep 10, 2019 10:00 am

Made an overnight render with BiDir (11000 samples, 80%OIDN) of the original scene and a realistic stone material and now caustics are not visible at all :cry:
In the simple test scene indirect caustics appear instantly so the engines work as expected, need to investigate further...
roomb4.jpg
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 & Win10Pro PC 16GB Ryzen 2700X, 2 x RTX 2070

provisory
Posts: 224
Joined: Wed Aug 01, 2018 4:26 pm

Re: caustics from indirect light

Post by provisory » Wed Sep 11, 2019 5:43 pm

epilectrolytics wrote:
Mon Sep 09, 2019 9:27 am
...
Then I realized that when rendering with indirect PGI indirect caustic paths don't connect to lights but end with a cache lookup.
...
Why don't you try it with Light Tracing?

User avatar
epilectrolytics
Donor
Donor
Posts: 561
Joined: Thu Oct 04, 2018 6:06 am

Re: playing with caustics

Post by epilectrolytics » Wed Sep 11, 2019 6:07 pm

I tested that in the simple scene posted above and found that light tracing (and caustic cache) don't work with with indirect light.
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 & Win10Pro PC 16GB Ryzen 2700X, 2 x RTX 2070

provisory
Posts: 224
Joined: Wed Aug 01, 2018 4:26 pm

Re: playing with caustics

Post by provisory » Wed Sep 11, 2019 8:46 pm

epilectrolytics wrote:
Wed Sep 11, 2019 6:07 pm
I tested that in the simple scene posted above and found that light tracing (and caustic cache) don't work with with indirect light.
Now I see you have already written.
You could try Glossy (or Disney) walls and door frame, and increased Glossiness Threshold of Light Tracing.

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

Re: playing with caustics

Post by Dade » Wed Sep 11, 2019 9:47 pm

provisory wrote:
Wed Sep 11, 2019 8:46 pm
epilectrolytics wrote:
Wed Sep 11, 2019 6:07 pm
I tested that in the simple scene posted above and found that light tracing (and caustic cache) don't work with with indirect light.
Now I see you have already written.
You could try Glossy (or Disney) walls and door frame, and increased Glossiness Threshold of Light Tracing.
The paths for "indirect caustics" are assigned to normal path tracing rendering (i.e. eye paths), not light tracing. Light tracing renders only light paths of the type:

[LuxCore v2.2 and v2.3] Light => Specular (or glossy-nearly-specular) bounce(s) => Diffuse (or glossy-not-nearly-specular) bounce => Eye (aka LS*DE)

[only LuxCore v2.3 with PSR] Light => Specular (or glossy-nearly-specular) bounce(s) => Diffuse (or glossy-not-nearly-specular) bounce => Specular (or glossy-nearly-specular) bounce(s) =>Eye (aka LS*DS*E)

Everything else is rendered by normal path tracing (i.e eye paths).
Support LuxCoreRender project with salts and bounties

User avatar
epilectrolytics
Donor
Donor
Posts: 561
Joined: Thu Oct 04, 2018 6:06 am

Re: playing with caustics

Post by epilectrolytics » Thu Sep 12, 2019 7:27 am

Dade wrote:
Wed Sep 11, 2019 9:47 pm
The paths for "indirect caustics" are assigned to normal path tracing rendering (i.e. eye paths), not light tracing.
Yep, that's what my testing suggested, thanks for confirmation!

Now the question is, why do indirect caustics work so much better in the simple test scene than in the original one?

Probably it is a problem with Metropolis sampling on glossy surfaces.
The simple test scene is all diffuse wall materials and works well.
In the original scene I use a metal shader for the door and the door frame.
That means several glossy bounces for eye paths before reaching a light source.
It seems to me Metropolis is struggling with that and converges slower.
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 & Win10Pro PC 16GB Ryzen 2700X, 2 x RTX 2070

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

Re: playing with caustics

Post by Dade » Thu Sep 12, 2019 7:47 am

epilectrolytics wrote:
Thu Sep 12, 2019 7:27 am
Now the question is, why do indirect caustics work so much better in the simple test scene than in the original one?
Are you sure the original scene should have caustics ?

I don't think so: you need to have a direct line of sight between the bottle/glass and the other room: from the rendering, it looks like they are inside door shadow.

Try to move the table a lot right/front so bottle/glass can see directly other room.
Support LuxCoreRender project with salts and bounties

User avatar
epilectrolytics
Donor
Donor
Posts: 561
Joined: Thu Oct 04, 2018 6:06 am

Re: playing with caustics

Post by epilectrolytics » Thu Sep 12, 2019 1:19 pm

Dade wrote:
Thu Sep 12, 2019 7:47 am
Are you sure the original scene should have caustics ?
I replaced door and table material with diffuse and sunsky with flat color, then rendered with LightCPU:
Screenshot.jpg
Caustics are weak but visible.
Probably I was expecting too much or it takes 100 000 samples to reach final brightness.

Looks like the engines work as expected, though any improvement of Metropolis sampling would be welcome, given that the new advancements since v2.2 like PGI, Hybrid and PSR don't help in scenes like these.
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 & Win10Pro PC 16GB Ryzen 2700X, 2 x RTX 2070

User avatar
epilectrolytics
Donor
Donor
Posts: 561
Joined: Thu Oct 04, 2018 6:06 am

Re: caustics from indirect light

Post by epilectrolytics » Thu Sep 12, 2019 6:08 pm

So here is the final version, a mix from PathCPU and PathOCL with PGI,
caustics look better than in the BiDir render and also the reflections help a lot.
room6b.jpg
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 & Win10Pro PC 16GB Ryzen 2700X, 2 x RTX 2070

Post Reply