reading flm files

Discussion related to the LuxCore functionality, implementations and API.
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: reading flm files

Post by bartek_zgo »

I think I found something. Could you explain me what is the difference between 2 approaches?
In the scene I have to radiance groups.
In the first approach I define 2 image pipelines. In first one I enable radiance group 0 and disable 1. In second pipeline 0 is disabled 1 is enabled

Code: Select all

film.imagepipelines.1.0.type = "NOP"
film.imagepipelines.1.radiancescales.0.enabled = 1
film.imagepipelines.1.radiancescales.0.globalscale = 1
film.imagepipelines.1.radiancescales.0.rgbscale = 1 1 1
film.imagepipelines.1.radiancescales.1.enabled = 0
film.outputs.5.type = "RGB_IMAGEPIPELINE"
film.outputs.5.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_multilight_0.exr"
film.outputs.5.index = 1
film.imagepipelines.2.0.type = "NOP"
film.imagepipelines.2.radiancescales.0.enabled = 0
film.imagepipelines.2.radiancescales.1.enabled = 1
film.imagepipelines.2.radiancescales.1.globalscale = 1
film.imagepipelines.2.radiancescales.1.rgbscale = 1 1 1
film.outputs.6.type = "RGB_IMAGEPIPELINE"
film.outputs.6.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_multilight_1.exr"
In the second approach I save radiance groups directly:

Code: Select all

film.outputs.6.index = 2
film.outputs.7.type = "RADIANCE_GROUP"
film.outputs.7.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_radiance_group_0.exr"
film.outputs.7.id = 0
film.outputs.8.type = "RADIANCE_GROUP"
film.outputs.8.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_radiance_group_1.exr"
The images are different. I thought they will be identical. How can I convert images writen as output RADIANCE_GROUP to images saved by image pipelines?

Why I wan to do this? If I merge this 2 images written by image pipelines I get the same result as render output. If I merge 2 radiance groups, I get something different.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: reading flm files

Post by Dade »

As I have already told you, indexes start from 0, not 1. You need to start from "film.imagepipelines.0", not "film.imagepipelines.1".
Support LuxCoreRender project with salts and bounties
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: reading flm files

Post by bartek_zgo »

Dade, this is not an issue. I start form 0 but I didn't want to post everything:

Code: Select all

film.imagepipelines.0.0.type = "NOP"
film.imagepipelines.0.1.type = "INTEL_OIDN"
film.imagepipelines.0.2.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.0.2.sensitivity = "100"
film.imagepipelines.0.2.exposure = 0.04
film.imagepipelines.0.2.fstop = 22
film.imagepipelines.0.3.type = "TONEMAP_LINEAR"
film.imagepipelines.0.3.scale = "0.39"
film.outputs.0.type = "RGB_IMAGEPIPELINE"
film.outputs.0.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000.exr"
film.outputs.0.index = 0
film.outputs.1.type = "MATERIAL_ID"
film.outputs.1.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_idmaterial.png"
film.outputs.2.type = "OBJECT_ID"
film.outputs.2.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_idobject.png"
film.outputs.3.type = "ALBEDO"
film.outputs.3.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_albedo.exr"
film.outputs.4.type = "AVG_SHADING_NORMAL"
film.outputs.4.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_avgShadingNormal.exr"
film.imagepipelines.1.0.type = "NOP"
film.imagepipelines.1.radiancescales.0.enabled = 1
film.imagepipelines.1.radiancescales.0.globalscale = 1
film.imagepipelines.1.radiancescales.0.rgbscale = 1 1 1
film.imagepipelines.1.radiancescales.1.enabled = 0
film.outputs.5.type = "RGB_IMAGEPIPELINE"
film.outputs.5.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_multilight_0.exr"
film.outputs.5.index = 1
film.imagepipelines.2.0.type = "NOP"
film.imagepipelines.2.radiancescales.0.enabled = 0
film.imagepipelines.2.radiancescales.1.enabled = 1
film.imagepipelines.2.radiancescales.1.globalscale = 1
film.imagepipelines.2.radiancescales.1.rgbscale = 1 1 1
film.outputs.6.type = "RGB_IMAGEPIPELINE"
film.outputs.6.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_multilight_1.exr"
film.outputs.6.index = 2
film.outputs.7.type = "RADIANCE_GROUP"
film.outputs.7.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_radiance_group_0.exr"
film.outputs.7.id = 0
film.outputs.8.type = "RADIANCE_GROUP"
film.outputs.8.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_radiance_group_1.exr"
film.outputs.8.id = 1
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: reading flm files

Post by Dade »

bartek_zgo wrote: Mon Mar 29, 2021 1:53 pm Dade, this is not an issue. I start form 0 but I didn't want to post everything:
It is, you are not defining the radiance scales of image pipeline "0". You must.
Support LuxCoreRender project with salts and bounties
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: reading flm files

Post by bartek_zgo »

In the documentation it is written that it takes default value "1". I will prepare a zip with scene for you
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: reading flm files

Post by bartek_zgo »

Here you can find my scene: https://files.fm/u/uaw4n44j8

I have noticed one issue that I'm currently investigating. This zip was created on linux, and rendered with luxcore 2.5rc1. And the result is strange. I thought that file multilight_0.exr will be identical to radiance_group_0.exr.

What is strange, on my windows machine I have luxcore_2.5alpha0 and the files looks almost identical! I will try to install latest version on my windows machine too.
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: reading flm files

Post by bartek_zgo »

OK. Forget about difference between windows and linux. I think they are the same. I have vary powerful machine with linux and I render until 1024 spp, on windows machine I have a small laptop so I stopped render after 16 samples. So at the beginning multilight_*.exr == radiance_group_*.exr. More time the render takes, radiance_group_0.exr becomes more green, and radiance_group_1.exr becomes more cyan.
So I'm asking again. With my settings what is the difference between multilight_0.exr and radiance_group_0.exr. Should they be identical or not? If not, how to convert radiance_group_0.exr to multilight_0.exr?
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: reading flm files

Post by bartek_zgo »

Here is a preview of files that I'm talking about. In previous post you can find link to zip that contains scene + exr files.
luxcore_multilight.PNG
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: reading flm files

Post by bartek_zgo »

I found out, that I can save different image pipelines using film->SaveOutput and passing properties with index=X. That could solve my problem. But is it possible to give some names to this pipelines? I open flm file after merge. I found that there are 10 or 20 pipelines inside. Can I name them? Identifying by id is not very nice. Let say that during scene creation I add film.imagepipelines.1.name = "light_1". Can I read this information from flm file?
Still it wold be nice to understand why this images are different.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: reading flm files

Post by Dade »

bartek_zgo wrote: Tue Mar 30, 2021 9:45 am Still it wold be nice to understand why this images are different.
I have told you why and how to fix the problem multiple times and you continue to do what you want so, I will do one last time than you are on your own.

Image pipeline names are tags (like textures, materials, etc.). Not numbers. The numbers are just a convention I used in my examples. So, for instance, "1" is different from "01" and "ABC" is a valid name.
However they are reference by position so, in the context of references, "0" is the first one defined (even if its tag name is "1").
Support LuxCoreRender project with salts and bounties
Post Reply