How to activate caustic cache in LuxCoreUI?

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

How to activate caustic cache in LuxCoreUI?

Post by epilectrolytics »

Starting to test the new version 2.6alpha I ran into a problem, with 2.6a on my Windows PC and also with 2.5 on my Mac.

Setting up a simple scene using caustic cache in Blender 2.92 works as expected, SDS caustics show up in the render.
Then I export the scene with LuxCore filesaver into text format and open it with LuxCoreUI where it renders, but without SDS paths.
Obviously caustic cache is not used though in the render.cfg it is enabled.

Is this a bug or an I doing something wrong, like the cache has to be activated somewhere in LuxCoreUI?
Screen Shot.jpg
Attachments
2cubestest_LuxCore.zip
(328.75 KiB) Downloaded 137 times
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: How to activate caustic cache in LuxCoreUI?

Post by Dade »

The problem is here:

Code: Select all

path.photongi.photon.maxcount = 2e+07
"path.photongi.photon.maxcount" is an integer parameter, not a floating point one so this is read as "2", not as "20000000". If you look at the log, you will see as the scene is rendered tracing one single photon :!:

Looking at the code, I assume this may happen because BlendLuxCore is setting the properties as string or float (?), not as integer so it should be fixed in BlendLuxCore.

As workaround you can just edit the .cfg and write the correct number. Setting a smaller number of photon count in Blender may also work because it will not trigger the scientific notation format.
Support LuxCoreRender project with salts and bounties
epilectrolytics
Donor
Donor
Posts: 790
Joined: Thu Oct 04, 2018 6:06 am

Re: How to activate caustic cache in LuxCoreUI?

Post by epilectrolytics »

Dade wrote: Thu Apr 22, 2021 1:06 pm The problem is here:
Thanks for the explanation!
With the workaround I can now continue testing :)
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: How to activate caustic cache in LuxCoreUI?

Post by B.Y.O.B. »

Dade wrote: Thu Apr 22, 2021 1:06 pm Looking at the code, I assume this may happen because BlendLuxCore is setting the properties as string or float (?), not as integer so it should be fixed in BlendLuxCore.
This value is the output of the round() function. According to the Python documentation it returns an integer if the ndigits argument is omitted, which is the case here:
https://github.com/LuxCoreRender/BlendL ... ig.py#L453
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: How to activate caustic cache in LuxCoreUI?

Post by Dade »

B.Y.O.B. wrote: Thu Apr 22, 2021 3:46 pm
Dade wrote: Thu Apr 22, 2021 1:06 pm Looking at the code, I assume this may happen because BlendLuxCore is setting the properties as string or float (?), not as integer so it should be fixed in BlendLuxCore.
This value is the output of the round() function. According to the Python documentation it returns an integer if the ndigits argument is omitted, which is the case here:
https://github.com/LuxCoreRender/BlendL ... ig.py#L453
Actually, it was a Boost Python problem in priority of Property class constructors: the "double" constructor was always used for "int". I should have found the fix of this problem however it is undocumented stuff.
Support LuxCoreRender project with salts and bounties
Post Reply