animation settings

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.
bartek_zgo
Posts: 122
Joined: Mon Oct 26, 2020 11:42 am

Re: animation settings

Post by bartek_zgo »

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:
out00.png
out01.png
out02.png
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.
User avatar
FarbigeWelt
Donor
Donor
Posts: 1060
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: animation settings

Post by FarbigeWelt »

Hi bartek_zgo

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
CodeHD
Developer
Developer
Posts: 480
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: animation settings

Post by CodeHD »

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.
CodeHD
Developer
Developer
Posts: 480
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: animation settings

Post by CodeHD »

FarbigeWelt wrote: Fri Jun 06, 2025 12:32 pm Your renders look to me as if Camera>Tonemapper applied somehow with different settings.
I will take this into account in the bug report.

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.
bartek_zgo
Posts: 122
Joined: Mon Oct 26, 2020 11:42 am

Re: animation settings

Post by bartek_zgo »

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:

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;
		}
The file is saved and md5sum reports an identical file. So LoadPersistentCache and SavePersistentCache do what they should do
bartek_zgo
Posts: 122
Joined: Mon Oct 26, 2020 11:42 am

Re: animation settings

Post by bartek_zgo »

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

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.
daros
Posts: 300
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: animation settings Fixed!

Post by daros »

Bartek has been able to fix the luxcore code!

We share the code on github now.
interior new 02.mp4
(1.03 MiB) Downloaded 98 times
CodeHD
Developer
Developer
Posts: 480
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: animation settings

Post by CodeHD »

bartek_zgo wrote: Tue Jun 10, 2025 8:43 am It looks that I have solved the issue.
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.
epilectrolytics
Donor
Donor
Posts: 813
Joined: Thu Oct 04, 2018 6:06 am

Re: animation settings

Post by epilectrolytics »

Thanks @daros & @bartek_zgo for your contribution, very much appretiated!
daros
Posts: 300
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: animation settings

Post by daros »

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.
flicker03.mp4
(981.06 KiB) Downloaded 78 times
here the obj.
scenev2.zip
(12.71 KiB) Downloaded 77 times
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.
Post Reply