Page 1 of 2

Problem with scene export

Posted: Thu Jul 29, 2021 6:10 am
by Flink
Hi all,
I noticed a problem with the scene export from Blender, when a smoke simulation is used. It makes no difference if the export is to .bcf or text.
The log message from LuxcoreUi is the following:

Code: Select all

[SDL][157.115] Loading serialized image map: LUXCORE_DENSITYGRID_140587595809288density
[SDL][157.131] Texture definition: 140587595809288density
RenderConfig loading error: 
Unknown storage type in ImageMap::AllocImageMap(): 3
I'm using Blender 2.93 and latest BlendLuxCore on Linux and Win 10. Attached is an example scene and a zip. file of the exported files in text format.
The .bcf file is to big to attache.
Am I doing something wrong or is it some kind of bug?

Re: Problem with scene export

Posted: Thu Jul 29, 2021 10:55 am
by Dade
It was a regression I should have fixed now.

Re: Problem with scene export

Posted: Thu Jul 29, 2021 2:43 pm
by Flink
Wow ... that was fast :D
Thank you for the fix Dade, I will test it with the next build.

Re: Problem with scene export

Posted: Fri Jul 30, 2021 7:16 am
by Flink
I did a few tests with the latest build. When using LuxCoreUi everything is fine now :-)
But a test of the network render throws the following error:

Code: Select all

[SDL][] Loading serialized image map: LUXCORE_DENSITYGRID_140255153988616density
[SDL][] Texture definition: 140255153988616density
std::bad_cast
Traceback (most recent call last):
  File "pyluxcoretools.zip/pyluxcoretools/renderfarm/renderfarmnode.py", line 168, in __HandleConnection
    config = pyluxcore.RenderConfig(renderConfigFile)
RuntimeError: std::bad_cast
Is this error maybe related to the fixed regression?

Re: Problem with scene export

Posted: Fri Jul 30, 2021 11:44 am
by Dade
Flink wrote: Fri Jul 30, 2021 7:16 am I did a few tests with the latest build. When using LuxCoreUi everything is fine now :-)
But a test of the network render throws the following error:

Code: Select all

[SDL][] Loading serialized image map: LUXCORE_DENSITYGRID_140255153988616density
[SDL][] Texture definition: 140255153988616density
std::bad_cast
Traceback (most recent call last):
  File "pyluxcoretools.zip/pyluxcoretools/renderfarm/renderfarmnode.py", line 168, in __HandleConnection
    config = pyluxcore.RenderConfig(renderConfigFile)
RuntimeError: std::bad_cast
Is this error maybe related to the fixed regression?
Are you using the .bcf format for network rendering ? Are you sure to use exactly the same LuxCore version (i.e. binaries) on all computers involved ?

Re: Problem with scene export

Posted: Fri Jul 30, 2021 7:33 pm
by Flink
I have double checked everything now.
Downloaded the latest build, deleted the whole BlendLuxCore folder from Blender addons folder and reinstalled the BlendLuxCore Addon.
After this I recreated the test scene, wrote a fresh .bcf and started the NetNode and NetConsole on the same computer from Blender.
So this is 100% the same LuxCore version, but i recieve the same error message. Besides this I noticed that it is not related to the smoke volume. Even the default cube produces the error.

Do you have any idea Dade what can cause the problem?

Re: Problem with scene export

Posted: Sat Jul 31, 2021 1:50 pm
by Dade
Flink wrote: Fri Jul 30, 2021 7:33 pm Do you have any idea Dade what can cause the problem?
I have isolated the problem but, at the moment, it doesn't make any sense. I'm still looking for the explanation.

Re: Problem with scene export

Posted: Mon Aug 02, 2021 9:51 am
by Dade
Dade wrote: Sat Jul 31, 2021 1:50 pm
Flink wrote: Fri Jul 30, 2021 7:33 pm Do you have any idea Dade what can cause the problem?
I have isolated the problem but, at the moment, it doesn't make any sense. I'm still looking for the explanation.
It is a general problem, not related to this particular scene (i.e. it happens with any scene). If you start the node without GUI, with something like:

Code: Select all

python3 ~/projects/luxcorerender/LuxCore/lib/pyluxcoretools.zip netnode
It works.

If you use the PySide2 GUI, it doesn't. It looks like PySide2 is seriously breaking, among other things, the standard output and printing/parsing numbers. It is something new, probably due to a new version. It looks like a PySide2 bug and I'm looking for a work around.

Re: Problem with scene export

Posted: Mon Aug 02, 2021 2:54 pm
by Dade
Dade wrote: Mon Aug 02, 2021 9:51 am It looks like a PySide2 bug and I'm looking for a work around.
I have found a work around. For some unknown reason, I need to import pyluxcore before PySide2 in Pyhton code or it will break a lot of system stuff.

May be we share some dependency with Qt or there some stupid interaction with global locale (... as usual). Anyway, the new code should now work.

Re: Problem with scene export

Posted: Tue Aug 03, 2021 6:42 am
by Flink
Thank you for your support Dade. I can confirm, that your workaround works. But there still seems to be a problem with the blender add on.
If I start the netnode/netconsole in the blender AddOns folder from a terminal, everything is working. No matter if I'm using the version with or without ui.

But if I'm starting from the button in the Blender AddOn I'm still getting the same error.

I have no idea why this is happening, because the Blender AddOn uses the same binaries, I used before form the terminal. Really strange.
Sorry for being annoying with this problem :roll: