animation settings
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
-
- Posts: 122
- Joined: Mon Oct 26, 2020 11:42 am
Re: animation settings
Hi Guys,
now I have simplified the problem. I have a scene (find in attachments) that I start using Luxcore UI. I start it 3 times and I get 3 different results. So the seed is constant, camera position is constant. I thought that the PhotonGI cache should resolve flickering issues but it looks that it makes flickering even stronger:
https://limewire.com/d/RmjLd#eqhZSE1yex
I do not add pgi file as it is heavy, and luxcore will create it after first render, but if it could be helpful for anyone just let me know.
now I have simplified the problem. I have a scene (find in attachments) that I start using Luxcore UI. I start it 3 times and I get 3 different results. So the seed is constant, camera position is constant. I thought that the PhotonGI cache should resolve flickering issues but it looks that it makes flickering even stronger:
https://limewire.com/d/RmjLd#eqhZSE1yex
I do not add pgi file as it is heavy, and luxcore will create it after first render, but if it could be helpful for anyone just let me know.
- FarbigeWelt
- Donor
- Posts: 1060
- Joined: Sun Jul 01, 2018 12:07 pm
- Location: Switzerland
- Contact:
Re: animation settings
Hi bartek_zgo
Your renders look to me as if Camera>Tonemapper applied somehow with different settings.
Your renders look to me as if Camera>Tonemapper applied somehow with different settings.
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
MacBook Air with M1
Re: animation settings
Thanks for the test scene. I can reproduce it in LuxCoreUI
- First time opening, it starts by computing Caustics Cache I get your first image as the result. A .pgi is created
- Second rendering, it starts immediately. I get your thrird image at the start. Seems like LuxcoreUI later crashed, maybe I accidentally closed I don't know
- Third rendering, the cache is loaded, Image 1 again by the looks of it
- Fourth rendering same as before, your image 1
I then deleted the files and re-extracted your zip file to delete the .pgi and make sure to undo anything implicitly changed, jsut to be sure.
- First time the cache is computed. I get your image 2
- Second time, I get your image 1
- Third time, I get your image 1
So, we have a test scene, and the issue can be reproduced. That is good!
I will put it into a GitHub Issue.
- First time opening, it starts by computing Caustics Cache I get your first image as the result. A .pgi is created
- Second rendering, it starts immediately. I get your thrird image at the start. Seems like LuxcoreUI later crashed, maybe I accidentally closed I don't know
- Third rendering, the cache is loaded, Image 1 again by the looks of it
- Fourth rendering same as before, your image 1
I then deleted the files and re-extracted your zip file to delete the .pgi and make sure to undo anything implicitly changed, jsut to be sure.
- First time the cache is computed. I get your image 2
- Second time, I get your image 1
- Third time, I get your image 1
So, we have a test scene, and the issue can be reproduced. That is good!
I will put it into a GitHub Issue.
Re: animation settings
I will take this into account in the bug report.FarbigeWelt wrote: Fri Jun 06, 2025 12:32 pm Your renders look to me as if Camera>Tonemapper applied somehow with different settings.
The fact that my two attempts leading to different results during the first try (where the cache is computed, not loaded), would suggest that it indeed may not be the cache loading after all.
-
- Posts: 122
- Joined: Mon Oct 26, 2020 11:42 am
Re: animation settings
In my opinion he is loading cache. There is no messages in log about building the cache and in Preproces() funcion I made a small chage:
The file is saved and md5sum reports an identical file. So LoadPersistentCache and SavePersistentCache do what they should do
Code: Select all
if (boost::filesystem::exists(params.persistent.fileName)) {
// Load the cache from the file
LoadPersistentCache(params.persistent.fileName);
SavePersistentCache("/tmp/cache.pgi");
return;
}
-
- Posts: 122
- Joined: Mon Oct 26, 2020 11:42 am
Re: animation settings
It looks that I have solved the issue.
The problem was with serialization and desalinization of causticPhotonsBVH.
It was missing photonTracedCount in serialization.
So when the cache was loaded from file, Luxcore was taking random number of photons. If the number was smaller than array size, the render was working but giving some randomic result. When the number was bigger than allocated memory it was crashing.
pgicbvh.h line line 57
The problem was with serialization and desalinization of causticPhotonsBVH.
It was missing photonTracedCount in serialization.
So when the cache was loaded from file, Luxcore was taking random number of photons. If the number was smaller than array size, the render was working but giving some randomic result. When the number was bigger than allocated memory it was crashing.
pgicbvh.h line line 57
Code: Select all
template<class Archive> void serialize(Archive &ar, const u_int version) {
ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(IndexBvh);
ar & entryNormalCosAngle;
ar & photonTracedCount; // <-- missing variable
SLG_LOG("[Deserialization] photonTracedCount = " << photonTracedCount);
if constexpr (Archive::is_loading::value) {
int i = 9;
SLG_LOG("[Deserialization] photonTracedCount = " << photonTracedCount);
}
}
Last edited by bartek_zgo on Tue Jun 10, 2025 8:46 am, edited 1 time in total.
Re: animation settings Fixed!
Bartek has been able to fix the luxcore code!
We share the code on github now.
We share the code on github now.
Re: animation settings
Very nice, thank you very much!
I'm currently working on another issue, but will try to test it later.
About sharing this fix, ideal at the moment would be to open a pull request on top of the branch "for_v2.11", the working branch for the next release.
From there, we can also include it in the bugfix branch "bugfix_v2.10", which is intended for bugfix releases like v2.10.1 etc.
-
- Donor
- Posts: 813
- Joined: Thu Oct 04, 2018 6:06 am
Re: animation settings
Thanks @daros & @bartek_zgo for your contribution, very much appretiated!
Re: animation settings
Hi to all. It seems however that in complex light situations flicker free animations are still tricky to achieve. The animation i published previously, by mistake, had a very low clamping value which made it so stable. With the correct clamping value, showing up lighting correctly, the flickering is still impressive even at 128 samples x pixel.
https://drive.google.com/file/d/1_f-Jry ... drive_link
The fix we did to the caustics caching resolved a strong flickering issue related to multiple CPU/GPU, loading the same PGI file, but still i have not been able to set this scene in the correct way. Is someone able to create a flicker free, or close to flicker free set-up of this scene? It roughly reproduces the main issues of the previous scene but in a much smaller file: small light sources, day light, caustics, glass features.
here the obj. glass is set to not cast shadows
Please do not replace emitter objects with different kinds of lights, try to keep it as it. Any help is very appreciated. If you feel there are settings satisfying that scene it would be interesting to understand which global illumination algorithm implementation could solve such kind of scenes with ease and without tweaking.
https://drive.google.com/file/d/1_f-Jry ... drive_link
The fix we did to the caustics caching resolved a strong flickering issue related to multiple CPU/GPU, loading the same PGI file, but still i have not been able to set this scene in the correct way. Is someone able to create a flicker free, or close to flicker free set-up of this scene? It roughly reproduces the main issues of the previous scene but in a much smaller file: small light sources, day light, caustics, glass features.
here the obj. glass is set to not cast shadows
Please do not replace emitter objects with different kinds of lights, try to keep it as it. Any help is very appreciated. If you feel there are settings satisfying that scene it would be interesting to understand which global illumination algorithm implementation could solve such kind of scenes with ease and without tweaking.