Page 1 of 2
Color LUT and floating point
Posted: Wed Aug 04, 2021 10:40 am
by daros
Hi, is it possible that when custom Lut is applied using Color LUT image pipeline, the resulting image is not floating point anymore?
Thanks
Re: Color LUT and floating point
Posted: Wed Aug 04, 2021 10:54 am
by daros
By the way we tried even using OCIO and the problem is the same... the resulting image is not floating point anymore.
Re: Color LUT and floating point
Posted: Wed Aug 04, 2021 11:02 am
by daros
Linear
Linear -20% exp
LUT applied (lut pipleine or ocio identical results)
LUT applied - 20% ep
The LUT - 20% exposure shows clearly that the bright area is completely flattered.
Re: Color LUT and floating point
Posted: Wed Aug 04, 2021 11:13 am
by bartek_zgo
We have checked 2 modes of applying lut files:
First:
Code: Select all
film.imagepipelines.0.0.type = "NOP"
film.imagepipelines.0.1.type = "INTEL_OIDN"
film.imagepipelines.0.1.prefilter.enable = "1"
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 = "TONEMAP_LINEAR"
film.imagepipelines.0.3.scale = "0.39"
film.imagepipelines.0.4.type = "TONEMAP_OPENCOLORIO"
film.imagepipelines.0.4.mode = "LUT_CONVERSION"
film.imagepipelines.0.4.lutfile = "/mnt/z/Felix/Data/Configs/LutFiles/burn_v01.cube"
Second:
Code: Select all
film.imagepipelines.0.0.type = "NOP"
film.imagepipelines.0.1.type = "INTEL_OIDN"
film.imagepipelines.0.1.prefilter.enable = "1"
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 = "TONEMAP_LINEAR"
film.imagepipelines.0.3.scale = "0.39"
film.imagepipelines.0.4.type = "COLOR_LUT"
film.imagepipelines.0.4.file = "/mnt/z/Felix/Data/Configs/LutFiles/burn_v01.cube"
film.imagepipelines.0.4.strength = "1.0"
The result is identical
Re: Color LUT and floating point
Posted: Thu Aug 05, 2021 8:04 am
by daros
Hi Dade, could you please help on this? This OCIO or LUT stuff is really impressive for us but if we are enot able to keep the bit depth it is useless. Thanks
Re: Color LUT and floating point
Posted: Thu Aug 05, 2021 9:36 am
by Dade
I need the scene, the .zip includes only the .cube file.
Re: Color LUT and floating point
Posted: Thu Aug 05, 2021 1:33 pm
by bartek_zgo
Here you are!
Re: Color LUT and floating point
Posted: Fri Aug 06, 2021 10:20 am
by Dade
I'm unable to replicate your results.
This is an exposure 0.1 rendering without LUT:
This is an exposure 0.06 rendering without LUT:
This is an exposure 0.06 rendering with LUT:
The last image is clearly different from your result.
The images where saved with:
Code: Select all
film.outputs.0.type = "RGB_IMAGEPIPELINE"
film.outputs.0.filename = img.jpg
Do you have problems displaying EXRs ? Because you were saving .exr instead of .jpg.
Re: Color LUT and floating point
Posted: Mon Aug 09, 2021 7:56 am
by bartek_zgo
I think Dade we misunderstood. We are saving exr images. Why? Because they are 16-bit floating points. So let say that we obtain a burnt image like the first one in your last post. Than we open it with photoshop and change exposure. If we render without lut, it is working. We can recover burnt areas. If we add lut files, we can not recover them. If we will save output as jpg, we will not be able to recover any pixel that is white.
So I know that changing the exposure during render I can fix the image. But that is not the point. We want to recover render that is overexposed.
Re: Color LUT and floating point
Posted: Mon Aug 09, 2021 10:42 am
by Dade
bartek_zgo wrote: Mon Aug 09, 2021 7:56 am
We can recover burnt areas. If we add lut files, we can not recover them.
Yes, because LUT are expecting values between [0.0, 1.0], they are not defined outside that range. Because of this, the values are clamped between [0.0, 1.0]:
https://github.com/LuxCoreRender/LuxCor ... ut.cpp#L80
The code linked above is my code but the proof it is correct is in the test with OpenColorIO: it produces exactly the same result (and it is written by other people).
It is your procedure to be wrong, you need to adjust exposure before LUT (like I did in my test above), not after. LUT expects values between 0.0 and 1.0 so you can use them only
after tone mapping (i.e. exposure adjustment), not before.