Page 3 of 6

Re: reading flm files

Posted: Mon Mar 15, 2021 3:14 pm
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.

Re: reading flm files

Posted: Mon Mar 15, 2021 4:23 pm
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.

Re: reading flm files

Posted: Tue Mar 16, 2021 7:47 am
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?

Re: reading flm files

Posted: Tue Mar 16, 2021 10:21 am
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 ?

Re: reading flm files

Posted: Tue Mar 16, 2021 12:50 pm
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.

Re: reading flm files

Posted: Wed Mar 17, 2021 9:22 am
by daros
Hi, Bartek could you please share the exr?

Re: reading flm files

Posted: Wed Mar 17, 2021 9:29 am
by bartek_zgo
Here they are.

Re: reading flm files

Posted: Wed Mar 17, 2021 11:27 am
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.

Re: reading flm files

Posted: Wed Mar 17, 2021 1:32 pm
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.

Re: reading flm files

Posted: Thu Mar 18, 2021 11:55 am
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