reading flm files

Discussion related to the LuxCore functionality, implementations and API.
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 15, 2021 3:04 pm Could you be so kind and explain why I can not merge images produced by image pipelines?
I've done some simple test. I grab 3 images written by image pipelines 1-3 (from previous post). Merge them manually. And than compare to the image produced by luxcore when all radiance groups are enabled. They look to be identical. So where is the problem? It will not work when I will start to multiply them?
For a long list of reasons, for instance, just try to use an image pipeline with AUTOLINEAR tone mapper and you will see.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: reading flm files

Post by B.Y.O.B. »

Note that you can use the standalone OIDN executable from their github release section. It's a simple command line tool.
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: reading flm files

Post by bartek_zgo »

For a long list of reasons, for instance, just try to use an image pipeline with AUTOLINEAR tone mapper and you will see.
Yes, I understand that in general case it may will not work. But in this specific case (this specific pieline, OIDN, LUXLINEAR, LINEAR) why it will not work?
So if it will not work could you give me some guideline how to implement this pipeline?
I read n RADIANCE_GROUP files taken from film after merge. I sum RGB for each pixel. Than I use the formula for LUXLINEAR https://github.com/LuxCoreRender/LuxCor ... ar.cpp#L57
But the image is still too bright. What I'm doing wrong?
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 16, 2021 7:47 am I read n RADIANCE_GROUP files taken from film after merge. I sum RGB for each pixel. Than I use the formula for LUXLINEAR https://github.com/LuxCoreRender/LuxCor ... ar.cpp#L57
But the image is still too bright. What I'm doing wrong?
Missing gamma correction ?
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 »

First I wold like to ask if it wold be possible to give some warning when somebody pass useless property:

Code: Select all

film.imagepipelines.000.2.type = "TONEMAP_LINEAR"
film.imagepipelines.000.2.value = 0.39 //WRONG

film.imagepipelines.000.2.type = "TONEMAP_LINEAR"
film.imagepipelines.000.2.scale= 0.39 //OK
But this was just a small issue.

The main question is, why images written by pipeline are different that the one saved by film.
I have folowing pipelines:

Code: Select all

film.imagepipelines.1.0.type = "NOP"
film.imagepipelines.1.radiancescales.1.enabled = 1
film.imagepipelines.1.radiancescales.2.enabled = 0
film.imagepipelines.1.radiancescales.3.enabled = 0
film.outputs.5.type = "RGB_IMAGEPIPELINE"
film.outputs.5.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_multilight_74956_12.exr"
film.outputs.5.index = 1
film.imagepipelines.2.0.type = "NOP"
film.imagepipelines.2.radiancescales.1.enabled = 0
film.imagepipelines.2.radiancescales.2.enabled = 1
film.imagepipelines.2.radiancescales.3.enabled = 0
film.outputs.6.type = "RGB_IMAGEPIPELINE"
film.outputs.6.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_multilight_74956_13.exr"
film.outputs.6.index = 2
film.imagepipelines.3.0.type = "NOP"
film.imagepipelines.3.radiancescales.1.enabled = 0
film.imagepipelines.3.radiancescales.2.enabled = 0
film.imagepipelines.3.radiancescales.3.enabled = 1
film.outputs.7.type = "RGB_IMAGEPIPELINE"
film.outputs.7.filename = "/home/node/matadorNode/tmp/0_FI_68803_271618_0000_multilight_74956_16.exr"
film.outputs.7.index = 3
And this produce a correct images:
pipeline outpu.PNG
Than I open the film from flm file.
I save each RADIANCE_GROUP by calling:
film->SaveOutput(fileName, OUTPUT_RADIANCE_GROUP, and Properties with id set to 1, 2, 3
And this is what I get:
film output.PNG
I thought that I will get identical images.
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: reading flm files

Post by daros »

Hi, Bartek could you please share the exr?
bartek_zgo
Posts: 116
Joined: Mon Oct 26, 2020 11:42 am

Re: reading flm files

Post by bartek_zgo »

Here they are.
Attachments
from_flm.zip
(3.31 MiB) Downloaded 147 times
from_pipelines.zip
(3.28 MiB) Downloaded 142 times
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: reading flm files

Post by daros »

The ones from the pipline seems to be fine.
The from FLM is very strange...it seems that somewhat has been inverted but i cannot figure our what.
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 16, 2021 12:50 pm

Code: Select all

film.imagepipelines.1.radiancescales.1.enabled = 1
film.imagepipelines.1.radiancescales.2.enabled = 0
film.imagepipelines.1.radiancescales.3.enabled = 0
Radiance scale index starts from 0, not 1 (https://github.com/LuxCoreRender/LuxCor ... e.cpp#L548) :idea: It is the same for all indices.
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 »

Sorry but completely don't understand. I set radiance group id for each emitter material in scene by emitter.id = 1, 2, 3. I have left the 0 not used. I have read somewhere that 0 is default. So if forget to set emitter.id for some material it will go to group 0. But I dont think that this is an issue. The images that are written by the pipelines are CORRECT. The problem is only with film->SaveOutput(fileName, OUTPUT_RADIANCE_GROUP, and Properties with id set to 1, 2, 3) this images looks strange
Post Reply