Page 1 of 1
How to activate caustic cache in LuxCoreUI?
Posted: Thu Apr 22, 2021 10:25 am
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?
Re: How to activate caustic cache in LuxCoreUI?
Posted: Thu Apr 22, 2021 1:06 pm
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.
Re: How to activate caustic cache in LuxCoreUI?
Posted: Thu Apr 22, 2021 1:12 pm
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

Re: How to activate caustic cache in LuxCoreUI?
Posted: Thu Apr 22, 2021 3:46 pm
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
Re: How to activate caustic cache in LuxCoreUI?
Posted: Fri Apr 23, 2021 10:39 am
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.