Page 12 of 17

Re: A baking test scene

Posted: Mon Dec 16, 2019 4:13 pm
by Racleborg
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 :)

Re: A baking test scene

Posted: Wed Dec 18, 2019 10:21 am
by Dade
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.

Re: A baking test scene

Posted: Wed Dec 18, 2019 11:29 am
by Racleborg
.......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

Re: A baking test scene

Posted: Wed Dec 18, 2019 11:38 am
by Racleborg
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.

Re: A baking test scene

Posted: Wed Dec 18, 2019 2:03 pm
by epilectrolytics
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!

Re: A baking test scene

Posted: Thu Dec 19, 2019 10:08 am
by Dade
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.

Re: A baking test scene

Posted: Thu Dec 19, 2019 11:04 am
by Dade
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

Re: A baking test scene

Posted: Thu Dec 19, 2019 11:13 am
by Racleborg
it was an overflow of accumulated luminance in Metropolis sampler.
I can no longer produce the problem this end.

Thank you for fixing :D

Re: A baking test scene

Posted: Thu Dec 19, 2019 11:14 am
by Racleborg
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

Re: A baking test scene

Posted: Thu Dec 19, 2019 11:21 am
by Sharlybg
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: