exr image output
-
- Posts: 116
- Joined: Mon Oct 26, 2020 11:42 am
exr image output
Hi,
I have a problem saving images as exr. They look to have a strange gamma. First I made render with png and gamma 2.2. I have flowing pipeline
film.imagepipelines.0.0.type = "NOP"
film.imagepipelines.0.1.type = "NOP"
film.imagepipelines.0.2.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.0.2.sensitivity = "100"
film.imagepipelines.0.2.exposure = 0.1
film.imagepipelines.0.2.fstop = 22
film.imagepipelines.0.3.type = "GAMMA_CORRECTION"
film.imagepipelines.0.3.value = "2.2"
film.outputs.0.type = "RGB_IMAGEPIPELINE"
film.outputs.0.filename = "c:\Bartek\stack\LuxCoreTests\exrGammaProblems\1_FI_68995_272448_0000.png"
Than I've changed extension to exr: As you can see the colors are washed out. This is because I have gamma 2.2 in exr and than XnView apply again gamma 2.2
So I remove gamma correction from XnView and get correct image: But this is not in 100% correct. Exr images should be saved with gamma 1.0, because all software (XnView, Gimp, Photoshop) apply 2.2 gamma correction to exr images. So logical solution is set 1.0 to gamma correction in image pipeline. But I get something strange: Could somebody explain to what I'm doing wrong? From my point of view, id should identical if I apply gamma correction during save process or read process as long as I apply it only once.
I have a problem saving images as exr. They look to have a strange gamma. First I made render with png and gamma 2.2. I have flowing pipeline
film.imagepipelines.0.0.type = "NOP"
film.imagepipelines.0.1.type = "NOP"
film.imagepipelines.0.2.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.0.2.sensitivity = "100"
film.imagepipelines.0.2.exposure = 0.1
film.imagepipelines.0.2.fstop = 22
film.imagepipelines.0.3.type = "GAMMA_CORRECTION"
film.imagepipelines.0.3.value = "2.2"
film.outputs.0.type = "RGB_IMAGEPIPELINE"
film.outputs.0.filename = "c:\Bartek\stack\LuxCoreTests\exrGammaProblems\1_FI_68995_272448_0000.png"
Than I've changed extension to exr: As you can see the colors are washed out. This is because I have gamma 2.2 in exr and than XnView apply again gamma 2.2
So I remove gamma correction from XnView and get correct image: But this is not in 100% correct. Exr images should be saved with gamma 1.0, because all software (XnView, Gimp, Photoshop) apply 2.2 gamma correction to exr images. So logical solution is set 1.0 to gamma correction in image pipeline. But I get something strange: Could somebody explain to what I'm doing wrong? From my point of view, id should identical if I apply gamma correction during save process or read process as long as I apply it only once.
Re: exr image output
I assume you want to have 2 image pipelines, one with gamma correction (likely for screen update) and one without for .exr saving. Something along the line of:
Code: Select all
film.imagepipelines.0.0.type = "NOP"
film.imagepipelines.0.1.type = "NOP"
film.imagepipelines.0.2.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.0.2.sensitivity = "100"
film.imagepipelines.0.2.exposure = 0.1
film.imagepipelines.0.2.fstop = 22
film.imagepipelines.0.3.type = "GAMMA_CORRECTION"
film.imagepipelines.0.3.value = "2.2"
##
film.imagepipelines.1.0.type = "NOP"
film.imagepipelines.1.1.type = "NOP"
film.imagepipelines.1.2.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.1.2.sensitivity = "100"
film.imagepipelines.1.2.exposure = 0.1
film.imagepipelines.1.2.fstop = 22
##
film.outputs.0.type = "RGB_IMAGEPIPELINE"
film.outputs.0.filename = "c:\Bartek\stack\LuxCoreTests\exrGammaProblems\1_FI_68995_272448_0000.png"
# The index of the image pipeline to save
film.outputs.0.index = 1
-
- Posts: 116
- Joined: Mon Oct 26, 2020 11:42 am
Re: exr image output
I have one image pipeline and I have started render twice. So I've changed the value of gamma corection. I put 1.0. I can try to remove it from pipeline but it should be the same.
film.imagepipelines.0.3.type = "GAMMA_CORRECTION"
film.imagepipelines.0.3.value = "1.0"
film.imagepipelines.0.3.type = "GAMMA_CORRECTION"
film.imagepipelines.0.3.value = "1.0"
Re: exr image output
Sorry ?bartek_zgo wrote: ↑Tue Nov 17, 2020 3:10 pm I have one image pipeline and I have started render twice. So I've changed the value of gamma corection. I put 1.0. I can try to remove it from pipeline but it should be the same.
film.imagepipelines.0.3.type = "GAMMA_CORRECTION"
film.imagepipelines.0.3.value = "1.0"
Like I wrote, define 2 image pipelines (you can have any number of image pipelines at the same) and use the one appropriate for the task you want perform.
-
- Posts: 116
- Joined: Mon Oct 26, 2020 11:42 am
Re: exr image output
I started render twice just for test. I don't need png with gamma 2.2. I only need exr with gamma 1.0. I know that I can define many pipelines but I want only one
Re: exr image output
If you want 2 types of outputs, one with gamma 2.2, one with gamma 1.0, you must define 2 image pipelines. Image pipelines don't have a cost so why exactly can't you use this solution ?bartek_zgo wrote: ↑Tue Nov 17, 2020 3:20 pm I started render twice just for test. I don't need png with gamma 2.2. I only need exr with gamma 1.0. I know that I can define many pipelines but I want only one
Re: exr image output
He is expecting to have same look for the render no matter he save it in EXR or PNG.Dade wrote: ↑Tue Nov 17, 2020 3:31 pmIf you want 2 types of outputs, one with gamma 2.2, one with gamma 1.0, you must define 2 image pipelines. Image pipelines don't have a cost so why exactly can't you use this solution ?bartek_zgo wrote: ↑Tue Nov 17, 2020 3:20 pm I started render twice just for test. I don't need png with gamma 2.2. I only need exr with gamma 1.0. I know that I can define many pipelines but I want only one
Re: exr image output
And it is a request that doesn't make sense because applications expect to have EXR files with gamma 1.0 and PNG with gamma 2.2.
-
- Posts: 116
- Joined: Mon Oct 26, 2020 11:42 am
Re: exr image output
Yes. This is what I want. Exr with gamma 1.0. All programs (by default) apply gamma correction 2.2 to exr. So the image should look identical (png and exr saved with gamma 1.0 with gamma correction 2.2 applied by viewing software)
-
- Posts: 116
- Joined: Mon Oct 26, 2020 11:42 am
Re: exr image output
I have defined multi pipelines as you asked.
So the image rgb_g22.png is my reference one. This is how the render should look like.
Than I have 2 exr files. One with gamma 1.0 another with gamma 2.2. If if open them with gimp neither of them lool like png file, but they should.
I mean. The exr with gamma 2.2 will not be correct, as gimp applies gamma correction 2.2 wile opening exr files. So in this case we have to times 2.2 gamma applied. But with rgb.exr (that has gamma 1.0) opened with gimp that applies gamma correction 2.2 I should see exactly the same result as rgb_g22.png.
I can not attach exr files so I send screens of this files opened with gimp.
Code: Select all
film.imagepipelines.0.0.type = "NOP"
film.imagepipelines.0.1.type = "NOP"
film.imagepipelines.0.2.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.0.2.sensitivity = "100"
film.imagepipelines.0.2.exposure = 0.1
film.imagepipelines.0.2.fstop = 22
film.imagepipelines.0.3.type = "GAMMA_CORRECTION"
film.imagepipelines.0.3.value = "1.0"
film.outputs.0.type = "RGB_IMAGEPIPELINE"
film.outputs.0.index = 0
film.outputs.0.filename = "c:\Bartek\stack\LuxCoreTests\exrGammaProblems\rgb.png"
film.outputs.1.type = "RGB_IMAGEPIPELINE"
film.outputs.1.index = 0
film.outputs.1.filename = "c:\Bartek\stack\LuxCoreTests\exrGammaProblems\rgb.exr"
film.imagepipelines.1.0.type = "NOP"
film.imagepipelines.1.1.type = "NOP"
film.imagepipelines.1.2.type = "TONEMAP_LUXLINEAR"
film.imagepipelines.1.2.sensitivity = "100"
film.imagepipelines.1.2.exposure = 0.1
film.imagepipelines.1.2.fstop = 22
film.imagepipelines.1.3.type = "GAMMA_CORRECTION"
film.imagepipelines.1.3.value = "2.2"
film.outputs.2.type = "RGB_IMAGEPIPELINE"
film.outputs.2.index = 1
film.outputs.2.filename = "c:\Bartek\stack\LuxCoreTests\exrGammaProblems\rgb_g22.png"
film.outputs.3.type = "RGB_IMAGEPIPELINE"
film.outputs.3.index = 1
film.outputs.3.filename = "c:\Bartek\stack\LuxCoreTests\exrGammaProblems\rgb_g22.exr"
Than I have 2 exr files. One with gamma 1.0 another with gamma 2.2. If if open them with gimp neither of them lool like png file, but they should.
I mean. The exr with gamma 2.2 will not be correct, as gimp applies gamma correction 2.2 wile opening exr files. So in this case we have to times 2.2 gamma applied. But with rgb.exr (that has gamma 1.0) opened with gimp that applies gamma correction 2.2 I should see exactly the same result as rgb_g22.png.
I can not attach exr files so I send screens of this files opened with gimp.