Hybrid Back/Forward path tracing (aka BiDir without MIS)

Discussion related to the LuxCore functionality, implementations and API.
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by epilectrolytics »

kintuX wrote: Mon Jul 29, 2019 10:07 pmRough glass with Roughness @ 0.007
Umm, could you please enlighten me how different roughness values break energy conservation ??
I'm using values like this since the times of LuxRender and never run into such a problem until testing the hybrid engine.

Clear glass is not realistic because in reality every surface has some roughness.
Using Roughness values between 0.01 and 0.001 are the only way to get realistic reflections.
I'm aware that this ramps up render times considerably but definitely there should be no brightness issue!

Thanks for helping with the testing btw. :D
kintuX
Posts: 809
Joined: Wed Jan 10, 2018 2:37 am

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by kintuX »

epilectrolytics wrote: Tue Jul 30, 2019 6:23 am
kintuX wrote: Mon Jul 29, 2019 10:07 pmRough glass with Roughness @ 0.007
Umm, could you please enlighten me how different roughness values break energy conservation ??
I'm using values like this since the times of LuxRender and never run into such a problem until testing the hybrid engine.

Clear glass is not realistic because in reality every surface has some roughness.
Using Roughness values between 0.01 and 0.001 are the only way to get realistic reflections.
I'm aware that this ramps up render times considerably but definitely there should be no brightness issue!

Thanks for helping with the testing btw. :D
Well, you experienced it. And you can also look around to see what minute roughness does CG wise. Maybe MIS needs updating here (new studies are around). Even so, it's not observable by naked eye (just like with Fresnel ;) )... so this is just like pushing head through wall and no brute force will help you come out alive (need to make an opening first) :)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by Dade »

epilectrolytics wrote: Mon Jul 29, 2019 1:00 pm
Dade wrote: Wed Jul 24, 2019 9:03 am How do you get bright caustics ?
Finally I could create a file with settings where the caustics always show the brightness issue, at least on my PC (Win 1903, LuxCore build from 7/27/2019).
In only works in Blender with Hybrid PathOCL (when switching to PathCPU I got normal behavior but not tested for longer rendering).
Caustics start looking normal but somewhere during the first 1000 samples brightness increases.
testanim3.blend.zip
I get a totally burned rendering no matter of the settings:

bright.jpg

The image pipeline has a TONEMAP_LINEAR with a scale of 3000 (!). I assume you are using some kind of blender post processing. If I reduce the scale to 30 I get a normal result no matter how many samples I render:

normal.jpg

Going to check the differences between PATHCPU and PATHOCL, I may know what it is.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by Dade »

kintuX wrote: Mon Jul 29, 2019 6:14 pm Seems there's even a difference between PT CPU vs PT OCL.
I should have fixed this problem.

There is still a difference between PATHCPU/OCL and BIDIRCPU I need still to investigate.
Support LuxCoreRender project with salts and bounties
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by epilectrolytics »

Dade wrote: Wed Jul 31, 2019 12:57 pm I get a totally burned rendering no matter of the settings:
bright.jpg
The image pipeline has a TONEMAP_LINEAR with a scale of 3000 (!). I assume you are using some kind of blender post processing. If I reduce the scale to 30 I get a normal result no matter how many samples I render:
This is really weird.
Yes, the tonemap scale is 3000 (there's one distant light with gain=1 in the scene).
In Blender compositor I have a gamma node because LuxCore gamma is not exposed there but that does nothing, same result without Blender compositor.
When I export a config file and render in LuxCoreUI I don't get a blown out result but this:
Screenshot1.jpg
testanim3_LuxCore.zip
(42.84 KiB) Downloaded 195 times
(including tonemap scale = 3000).
Caustics look normal at render start but brighten up after 200 samples.

Update:
I can get consistent brightness out of this when changing path.hybridbackforward.partition from 0 to 0.8!
I thought this setting only affects PathCPU not PathOCL.
But the crazy brightness volatility in PathOCL appears only when light tracing is set to 100%.
The problem is that this does not help within Blender, here caustics remain inconsistent in PathOCL no matter the partition setting for PathCPU.

Currently I cannot render anything with rough glass and Hybrid in Blender because of this issue.
I tried an animation and already in frame#3 caustics disappeared totally (no world volume involved):
Screenshot2.jpg
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by B.Y.O.B. »

epilectrolytics wrote: Wed Jul 31, 2019 3:39 pm I can get consistent brightness out of this when changing path.hybridbackforward.partition from 0 to 0.8!
I thought this setting only affects PathCPU not PathOCL.
But the crazy brightness volatility in PathOCL appears only when light tracing is set to 100%.
So you change to CPU, set partition, then change back to OCL and something is different?
This shouldn't be possible.
https://github.com/LuxCoreRender/BlendL ... ig.py#L254
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by epilectrolytics »

B.Y.O.B. wrote: Wed Jul 31, 2019 3:46 pm So you change to CPU, set partition, then change back to OCL and something is different?
This shouldn't be possible.
Yes, it is very confusing.
In LuxCoreUI it works after changing the config file.
Apparently changing the partition in Blender (PathCPU) alone does not register for rendering in PathOCL, after the partition change I have to render PathCPU first and then change to PathOCL in order to get it work differently.
I could get a render with no brightness change from my testanim3.blend file for the first time by this weird procedure.

This is getting over my head.

Later I will test the new build and see if it does improve things...
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by epilectrolytics »

Dade wrote: Wed Jul 31, 2019 1:47 pm
kintuX wrote: Mon Jul 29, 2019 6:14 pm Seems there's even a difference between PT CPU vs PT OCL.
I should have fixed this problem.
Testing the latest build from today I can confirm that PathCPU and PathOCL now show same caustic brightness.

Regarding the "caustics getting too bright, sometimes during render" issue I found out this:
Screenshot.gif
With hybridbackforward.partition set to 0, in PathOCL (which should not be affected by this setting) the render starts with normal caustic brightness but soon gets brighter :?
(scene provided above.)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by Dade »

I have:

1) downloaded the latest daily build binaries for Windows (https://github.com/LuxCoreRender/LuxCor ... opencl.zip);
2) downloaded your test scene (download/file.php?id=5288);
3) done multiple renders with LuxCoreUI.

They were all fine and with the same brightness. Can anyone reproduce the problem following the above steps ? Can you ?

I have also run the rendering under Valgrind without any error. I'm sincerely starting to doubt there is a problem at all.
epilectrolytics wrote: Wed Jul 31, 2019 3:39 pm Update:
I can get consistent brightness out of this when changing path.hybridbackforward.partition from 0 to 0.8!
I thought this setting only affects PathCPU not PathOCL.
But the crazy brightness volatility in PathOCL appears only when light tracing is set to 100%.
100% light tracing is path.hybridbackforward.partition set to 0.0 or 1.0 for you ? Anyway nothing change here.
Support LuxCoreRender project with salts and bounties
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: Hybrid Back/Forward path tracing (aka BiDir without MIS)

Post by epilectrolytics »

Dade wrote: Thu Aug 01, 2019 9:16 am I have:

1) downloaded the latest daily build binaries for Windows (https://github.com/LuxCoreRender/LuxCor ... opencl.zip);
2) downloaded your test scene (download/file.php?id=5288);
3) done multiple renders with LuxCoreUI.

They were all fine and with the same brightness. Can anyone reproduce the problem following the above steps ? Can you ?

I have also run the rendering under Valgrind without any error. I'm sincerely starting to doubt there is a problem at all.
If you and no one else can reproduce it you should not waste any more time on this, probably I have a corrupt installation or something.
I just tested again (latest build, original test scene) and got a normal render out of the file with partition=0, after switching to PathCPU a normal rendering too, switching back to PathOCL again and bang then the caustics started to overblow after 200 samples.
Setting partition=0.8 fixed things in the next attempt.
As I have a workaround with this I'm ok when we leave it at that, if there really is something wrong someone else will stumble upon it sooner or later.

Sorry for wasting your time with this.
Dade wrote: Thu Aug 01, 2019 9:16 am 100% light tracing is path.hybridbackforward.partition set to 0.0 or 1.0 for you ? Anyway nothing change here.
100% light tracing is partition=0 here, 0.8 means 20% light and 80% path.
Post Reply