Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LUT 3D] output image looks very different from what the output looked like from a 3DLUT creator app. #3062

Closed
chhil opened this issue Oct 3, 2019 · 17 comments
Assignees
Labels
bugfix pull request fixing a bug
Milestone

Comments

@chhil
Copy link

chhil commented Oct 3, 2019

Describe the bug
The LUT3D module output does not match the output of LUT in a 3D LUT creator app.

To Reproduce

Made changes to a raw file in darktable.
Exported output as tiff and imported it into 3D LUT creator.
Made changes in there and exported 3D LUT cube file.
Now in darktable on edited image I used the LUT 3D module as the next step.

The images below shows what the 3D LUT creator comparison of TIFF as before and the transformed as after.

image

The image below shows the before applying LUT and after applying LUT in darktable.

image
Left is after, right is before.

I tried changing opacity at 10% increments and could not get the output as the expected.

@chhil
Copy link
Author

chhil commented Oct 3, 2019

Here is the same LUT applied in GIMP using G'MIC. It has the desired output.

image

@chhil
Copy link
Author

chhil commented Oct 3, 2019

Ok figured out the problem.

The LUT 3D module should be the last one in your pipeline in my case. I think in general it would make sense to grade/apply LUT after all raw processing.

Image below I have moved the module just before the output profile.
image

Does the Lut 3D IOP order need to change? Or should the documentation indicate it?

@TurboGit
Copy link
Member

TurboGit commented Oct 3, 2019

The LUT 3D module should be between color input and color output.

Where was it for the buggy blue image?

@chhil
Copy link
Author

chhil commented Oct 3, 2019

I compressed history and got rid of Lut 3D.
Then I selected and enabled Lut 3d and selected the cube file.
In the pipeline it gets inserted outside color input and color output.
image

@TurboGit
Copy link
Member

TurboGit commented Oct 3, 2019

So that wrong indeed.

@chhil I think you have seen the numerous issues reported because of a bug in iop-order? So I think you can close all your recent reports, they all seems related to this issue being worked on.

@chhil
Copy link
Author

chhil commented Oct 3, 2019

I was going through the issues I had opened and I can't say if its IOP related or not.

This one for example is, will the insert order change and should I close this prior to that?

@wilecoyote2015
Copy link
Contributor

Interesting: The lut3d results were correct for me with my last build (maybe from one month ago), but with recent master I notice this issue, too.

Furthermore, changing the application color space has no effect. Hence, I'd guess that the color space transform into the application color space is not performed anymore?

@wilecoyote2015
Copy link
Contributor

Seems like the lut3d module is placed before input color profile in the new iop order.

@TurboGit
Copy link
Member

TurboGit commented Oct 4, 2019

@aurelienpierre : do you confirm that 3dlut must be between input & output color profile?

@wilecoyote2015
Copy link
Contributor

Seems reasonable to me, as an LUT represents a color space transform and hence it can only be applied on data that has been transformed into the source color space the LUT has been engineered for.

@aurelienpierre
Copy link
Member

LUT 3D should come right after colorin and colorchecker, before further colour grading, and colorout.

@TurboGit
Copy link
Member

TurboGit commented Oct 4, 2019

@aurelienpierre : so my proposed patch (#3075) is wrong as it comes just after colorin. it seems that mixing rules after/before in iop_order.c does not works properly.

@chhil
Copy link
Author

chhil commented Oct 4, 2019

LUT 3D should come right after colorin and colorchecker, before further colour grading, and colorout.

Should the position be based on a users workflow?
This is what I had done here, did all the tweaks in DT and then applied a LUT to it. So according to my flow it should be at the very end of the pipe.

I can understand someone has a image shot in say a cineD profile on camera and may apply a cineD to maybe a rec709 lut at early stage and then do the grade.

TurboGit added a commit to TurboGit/darktable that referenced this issue Oct 4, 2019
@TurboGit
Copy link
Member

TurboGit commented Oct 4, 2019

@chhil : you can always move it around to the position you want it to be.

We are just talking about a sensible default.

TurboGit added a commit to TurboGit/darktable that referenced this issue Oct 4, 2019
Take the opportunity to set a clean state as discussed on darktable-org#3075
with Aurélien Pierre.

For darktable-org#3062.
TurboGit added a commit to TurboGit/darktable that referenced this issue Oct 4, 2019
Take the opportunity to set a clean state as discussed on darktable-org#3075
with Aurélien Pierre.

For darktable-org#3062.
@TurboGit TurboGit self-assigned this Oct 5, 2019
@TurboGit TurboGit added the bugfix pull request fixing a bug label Oct 5, 2019
@TurboGit TurboGit added this to the 2.8 milestone Oct 5, 2019
@TurboGit
Copy link
Member

TurboGit commented Oct 6, 2019

Fix merged.

@TurboGit TurboGit closed this as completed Oct 6, 2019
@chhil
Copy link
Author

chhil commented Oct 6, 2019

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix pull request fixing a bug
Projects
None yet
Development

No branches or pull requests

5 participants
@TurboGit @chhil @wilecoyote2015 @aurelienpierre and others