Filesaver problems

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
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Filesaver problems

Post by TAO »

I tried to create a simple test scene for testing the displacement with just one plan and one shader. as long as i render it in Blender it was okay but when i try to save it by FileSaver it saves the completely wrong file with 3 objects and wrong materials.
I do not know why but i attached the project and lux Scene file for more investigation.
Screenshot 2021-03-25 142912.jpg
Screenshot 2021-03-25 143131.jpg
00001.zip
(2.19 MiB) Downloaded 137 times
LuxCore_Displace.blend
(987.13 KiB) Downloaded 129 times
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Filesaver problems

Post by B.Y.O.B. »

Filesaver won't help you investigate shapes anyway, it only saves the end result mesh of the shape evaluation.
I would recommend to check the LuxCore samples, the LuxCore shape source code and the BlendLuxCore implementation instead.
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Filesaver problems

Post by TAO »

I was wonder because the export scene can not be render with luxCore Stand alone
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Filesaver problems

Post by Dade »

TAO wrote: Thu Mar 25, 2021 1:43 pm I tried to create a simple test scene for testing the displacement with just one plan and one shader. as long as i render it in Blender it was okay but when i try to save it by FileSaver it saves the completely wrong file with 3 objects and wrong materials.
I do not know why but i attached the project and lux Scene file for more investigation.
You have some locale related problem in .scn:

Code: Select all

scene.objects.25263679124080.material = "Material2526377125768"
scene.objects.25263679124080.ply = "mesh-00002.ply"
scene.objects.25263679124080.camerainvisible = 0
scene.objects.25263679124080.id = 1326,487202
scene.objects.25263679124080.transformation = 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
Notice the "," in "scene.objects.25263679124080.id = 1326,487202".

And there are problems in in .ply too:

Code: Select all

element vertex 4,225
property float x
property float y
property float z
property float nx
property float ny
property float nz
property float s
property float t
element face 8,192
property list uchar uint vertex_indices
end_header
You have "," to separate integer thousands, etc.
Support LuxCoreRender project with salts and bounties
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Filesaver problems

Post by TAO »

Oh, I did not see that coming because this problem is fixed in MaxLuxCore, did not expect that to happen in the blender too.
Why is happen with blender I'm using the English version of windows and with no other language pack installed on my PC.
That is a bit strange.
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Filesaver problems

Post by TAO »

B.Y.O.B. wrote: Thu Mar 25, 2021 1:49 pm Filesaver won't help you investigate shapes anyway, it only saves the end result mesh of the shape evaluation.
I would recommend to check the LuxCore samples, the LuxCore shape source code and the BlendLuxCore implementation instead.
Thank you for the explanation but why there are 3 objects exported by FileSaver?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Filesaver problems

Post by Dade »

TAO wrote: Thu Mar 25, 2021 10:26 pm
B.Y.O.B. wrote: Thu Mar 25, 2021 1:49 pm Filesaver won't help you investigate shapes anyway, it only saves the end result mesh of the shape evaluation.
I would recommend to check the LuxCore samples, the LuxCore shape source code and the BlendLuxCore implementation instead.
Thank you for the explanation but why there are 3 objects exported by FileSaver?
Because they are defined, even if not all used. In LuxCore, this is true for all geometries, textures, materials, etc.: if you define them they exist, even if not directly used in the current rendering (they may be in the future, after a scene edit).

You have to call RemoveUnusedImageMaps()/RemoveUnusedTextures()/RemoveUnusedMaterials()/RemoveUnusedMeshes() to remove all definition not used by the current rendering.
Support LuxCoreRender project with salts and bounties
User avatar
TAO
Developer
Developer
Posts: 851
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: Filesaver problems

Post by TAO »

Dade wrote: Sat Mar 27, 2021 11:37 am
TAO wrote: Thu Mar 25, 2021 10:26 pm
B.Y.O.B. wrote: Thu Mar 25, 2021 1:49 pm Filesaver won't help you investigate shapes anyway, it only saves the end result mesh of the shape evaluation.
I would recommend to check the LuxCore samples, the LuxCore shape source code and the BlendLuxCore implementation instead.
Thank you for the explanation but why there are 3 objects exported by FileSaver?
Because they are defined, even if not all used. In LuxCore, this is true for all geometries, textures, materials, etc.: if you define them they exist, even if not directly used in the current rendering (they may be in the future, after a scene edit).

You have to call RemoveUnusedImageMaps()/RemoveUnusedTextures()/RemoveUnusedMaterials()/RemoveUnusedMeshes() to remove all definition not used by the current rendering.
I see that's why there is 3 object instead of 2 when I save the scene by filesaver in a blender. honestly, I expect just 2 objects one for plane and one for displacement, and not 3.
Unfortunately, I got bad news from my family I'll try to check later.
Thank you.
Post Reply