A baking test scene

Discussion related to the LuxCore functionality, implementations and API.
Racleborg
Posts: 609
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Mon Dec 16, 2019 4:13 pm

Unread post by epilectrolytics » Mon Dec 16, 2019 4:09 pm

Racleborg wrote: ↑Mon Dec 16, 2019 2:45 pm
So I’m working on baking caustics but even though I can get some quite dramatic one in the preview the're not rendering. Could you please tell me what I'm doing wrong? Thank you
I have not yet looked into baking via LuxCoreUI, if caustics are not yet implemented it will not work.
While the second image looks like correct caustics the first one shows apparently the light trace brightness issue that I have reported repeatedly in the respective thread.
The dramatic caustics in the first image, even though it's probably incorrect, looks funky!
This is really very interesting stuff, thanks for your relentless testing!
Well, I'm having a lot of fun! Thanks for all the info :)

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

Re: A baking test scene

Post by Dade » Wed Dec 18, 2019 10:21 am

epilectrolytics wrote:
Mon Dec 16, 2019 4:09 pm
first one shows apparently the light trace brightness issue that I have reported repeatedly in the respective thread.
I was able to reproduce (for the first time) this problem with BAKECPU and caustic baking. I had a precise idea in mind of why it was happening (i.e. a multi-thread problem), wrote a load of code to fix it ... and it wasn't that.

After further investigations, it doesn't seem to be multi-threads related (i.e. it happens also with a single thread rendering) but it seems to be related to the image resolution, it happens quite fast at 2K or 4K renderings, it doesn't happen or it is very slow at small resolutions. Quite strange stuff, looking into it.
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 609
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Wed Dec 18, 2019 11:29 am

.......but it seems to be related to the image resolution, it happens quite fast at 2K or 4K renderings
The scene that I linked to with this issue is only 1920 x 1080

https://1drv.ms/u/s!AhdwgLaw01tLpwY7HHh ... 0?e=GljwMU

Racleborg
Posts: 609
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Wed Dec 18, 2019 11:38 am

Also, (in the linked scene), to get the 'dramatic' caustics, then turning the sun gain down to 0 then back to .0001 creates them every time! To get rid of them again just start rendering.

epilectrolytics
Donor
Posts: 703
Joined: Thu Oct 04, 2018 6:06 am

Re: A baking test scene

Post by epilectrolytics » Wed Dec 18, 2019 2:03 pm

Dade wrote:
Wed Dec 18, 2019 10:21 am
I was able to reproduce (for the first time) this problem with BAKECPU and caustic baking.

Quite strange stuff, looking into it.
Thanks for looking into it!

This is a really nasty thing and hard to catch.

My observation is that light tracing always shows a slight brightness variation, just in my last animation, clear glass with DOF I noticed that on close inspection the caustics vary from frame to frame by a small amount like 5% or so.
Once I use rough glass the variations become stronger, same with volumetrics.

Really explosive events like that shown above by Racleborg happen rarely to me, normally when I use PathCPU with light tracing at 100% for testing.
I think I noticed too that the behavior changes with the resolution.

Caustics baking will be another killer feature, providing one more way for SDS rendering (with higher specular depth) and will even work outside LuxCore!

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

Re: A baking test scene

Post by Dade » Thu Dec 19, 2019 10:08 am

Fu@@ing 32bit floating points: it was an overflow of accumulated luminance in Metropolis sampler. Metropolis has a small warm up where it evaluates the average image luminance (i.e. <accumulated luminance> / <sample count>).

There was an overflow in two cases:

1) high resolution images where there were a lot of accumulated samples (the warm up length was 4 * <image width> * <image height> samples);

2) samples with high values, for instance when rendering with Sun light source.

I have placed a cap on the warm up samples count so #1 can not happen. In theory, #2 could still happen but only in the case of sun with some absurd gain value.
Support LuxCoreRender project with salts and bounties

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

Re: A baking test scene

Post by Dade » Thu Dec 19, 2019 11:04 am

Very first caustic baking and glTF export: https://skfb.ly/6PzuS

As far as I know, it has never been done before. The baked map alone is quite a beauty:

plane.jpg

For reference, this is the original rendering with LuxCoreRender:

cube.jpg
Support LuxCoreRender project with salts and bounties

Racleborg
Posts: 609
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Thu Dec 19, 2019 11:13 am

it was an overflow of accumulated luminance in Metropolis sampler.
I can no longer produce the problem this end.

Thank you for fixing :D

Racleborg
Posts: 609
Joined: Sat Apr 07, 2018 10:31 am
Location: UK

Re: A baking test scene

Post by Racleborg » Thu Dec 19, 2019 11:14 am

s far as I know, it has never been done before. The baked map alone is quite a beauty:
looks amazing!

Very exciting stuff! :D

User avatar
Sharlybg
Donor
Posts: 2075
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: A baking test scene

Post by Sharlybg » Thu Dec 19, 2019 11:21 am

As far as I know, it has never been done before. The baked map alone is quite a beauty:
Always at the edge of innovation :geek:
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

Post Reply