darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.54k stars 1.13k forks source link

3dLUT import and Export Feature #4166

Closed arunonnet2003 closed 3 years ago

arunonnet2003 commented 4 years ago

Hi team, I would like to request 3D LUT import export feature in the 3d LUT module of the darktable. As of now we can easily import 3D LUT but cannot export it.

Da vinci Resolve is a good software to look into, just that it is for videos and needs a beefed up spec for laptop or pc.

This request would make it possible to import images do color correction and export Luts that can be used jn compatible softwares and cameras on wide scale.

In case of clarification and expected results i can chime in the development part of it. In retrospective this feature request helps me in creating LUTs from still images from still Camera on Location Recce and have a desired look developed in darktable that can be slapped on footage after shoot. I am a Cinematographer and would be happy to see this functionality improve Thanks. Arun Kumar Pandey.

MStraeten commented 4 years ago

i dont get, what's the benfit do this in a raw converter instead of in one of several available third party tools? you can do it already in three steps: Just save your edit as a style, apply it to a haldclut png and then use this to convert it into the lut format you need ...

arunonnet2003 commented 4 years ago

Hi there, I tried the same but could not manage exact results in between Darktable, Gimp and Da vinci Resolve. May be i am missing some steps or not doing it right. There is no tutorial available for the same. What modules can be exported? What can not? What to switch on or off while Applying style to haldclut? And hence this request. Thanks for Pinging in. Arun Kumar Pandey

On Fri, 24 Jan 2020 at 4:29 PM, Martin Straeten notifications@github.com wrote:

i dont get, what's the benfit do this in a raw converter instead of in one of several available third party tools? you can do it already in three steps: Just save your edit as a style, apply it to a haldclut png and then use this to convert it into the lut format you need ...

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/darktable-org/darktable/issues/4166?email_source=notifications&email_token=AOLF7S6X5MLESAH4F6UFV73Q7LC2TA5CNFSM4KKIPEOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ2N3ZA#issuecomment-578084324, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLF7S2P7ZV4TBSQG3ZHHJTQ7LC2TANCNFSM4KKIPEOA .

-- Best Regards, Arun Kumar Pandey.

MStraeten commented 4 years ago

if you cant get similar results generating luts using these steps manually i doubt an integrated darktable module would get better results, since it just would implement these steps.

rabauke commented 4 years ago

I think this feature is beyond the scope of darktable. Furthermore, it seems to be an illdefined task to create a lut from a series of processing steps in a raw converter, which may include various local adjustments.

arunonnet2003 commented 4 years ago

Hi there, I am a cinematographer, i use my a6300 on location recce and taking stills of location and characters in spaces to prep for my shoot. Now post this i would like it to be handled in a stills only pipeline rather than doing it in resolve. If luts in/out is incorporated with all color only modules following this import/export, i wont need a beefy system on set in a remote place with resolve(an overkill) to edit and create LUTs. And I am assuming there wouldbe many like me to have this functionality work out. I am not a programmer, otherwise i would have built or developed this myself to ease out life out of a complex da vinci resolve pipeline. Thanks.

On Thu, 30 Jan 2020 at 12:44 AM, Heiko Bauke notifications@github.com wrote:

I think this feature is beyond the scope of darktable. Furthermore, it seems to be an illdefined task to create a lut from a series of processing steps in a raw converter, which may include various local adjustments.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/darktable-org/darktable/issues/4166?email_source=notifications&email_token=AOLF7S2YY4LT3ZXPCAAYPZLRAHISLA5CNFSM4KKIPEOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKIMRXQ#issuecomment-579913950, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLF7S7WDOBYI43KHGWXRODRAHISLANCNFSM4KKIPEOA .

-- Best Regards, Arun Kumar Pandey.

rabauke commented 4 years ago

What you prose here is not feasible (as far as I understand color managment in still and video). You will usually not get the same results when you apply the same lut to still and to video footage because they are represented in different color spaces. It might be possible when you can somehow normalize your footage to the same color space, e.g. reg lin 2020.

By the way, you actually can create luts with darktable by applying color modifications to a neutral hald lut. Ensure to apply suitable input and export colorspaces in darktable.

arunonnet2003 commented 4 years ago

HI there, “You will usually not get the same results when you apply the same lut to still and to video footage” : Darktable has already figured that by providing us to tweak the input, working and output colorspace.

“when you can somehow normalize your footage to the same color space” : yes of course, again Darktable provides multiple instance of 3dLUT modules in which we can Log-Delog-Color Correct in multiple instance to export module specific data.

“you actually can create luts with darktable by applying color modifications to a neutral hald lut” …. :-). My request came only after I was not able to create matching LUT’s since I was not specific as to which modules export as Local or Global Color Adjustments(had matched the color transformation but local contrast was different). I have tried this and found that Darktable has travelled half way to incorporate (input) 3D LUT module very well, that matches exactly with Photoshop, Lightroom and Da Vinci Resolve.

My request comes in a perview to define 3d Export Module with only adjustments that are related to Global Color Adjustments. Again taking care of Input and Working Color Space, since 3dLuts are output working space independent. I have already done successful round tripping in Lightroom, Da Vinci Resolve, Lutify.me and VideoLUT with known tweaks to get desired result.

And liked Darktable for what it provides, I am fairly upto date on all modules present, just that I felt the requested functionality would complete its 3DLUT module to its desired functionality as in other application of same genre.

THANKING YOU, For your time and ear on this, Arun Kumar Pandey.

Sent from Mail for Windows 10

From: Heiko Bauke Sent: Thursday, January 30, 2020 11:37 PM To: darktable-org/darktable Cc: arunonnet2003; Author Subject: Re: [darktable-org/darktable] 3dLUT import and Export Feature (#4166)

What you prose here is not feasible (as far as I understand color managment in still and video). You will usually not get the same results when you apply the same lut to still and to video footage because they are represented in different color spaces. It might be possible when you can somehow normalize your footage to the same color space, e.g. reg lin 2020. By the way, you actually can create luts with darktable by applying color modifications to a neutral hald lut. Ensure to apply suitable input and export colorspaces in darktable. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

MStraeten commented 4 years ago

You wrote, you tried the way i described earlier and his wasn’t sufficient. There isnt magic within darktable that can generate stuff you arent able to do yourself by the described way.

arunonnet2003 commented 4 years ago

Hi there, Thanks for pinging in. I am sure someday somebody will figure it out, i am hopeful that someday magic will happen as it has been happening from centuries before their justifications in Science. 😄🙏 Thanks for hearing it out. Yours, AKP.

On Fri, 31 Jan 2020 at 10:53 PM, Martin Straeten notifications@github.com wrote:

You wrote, you tried the way i described earlier and his wasn’t sufficient. There isnt magic within darktable that can generate stuff you arent able to do yourself by the described way.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/darktable-org/darktable/issues/4166?email_source=notifications&email_token=AOLF7S2A6N4HZXBADJELVQTRARNAVA5CNFSM4KKIPEOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKPLWNA#issuecomment-580827956, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLF7SYG3ABBSVB6ZRLCJUDRARNAVANCNFSM4KKIPEOA .

-- Best Regards, Arun Kumar Pandey.

phweyland commented 4 years ago

Trying to understand... A first glance, the user would have to identify the first and the last modules he wants to simulate by a lut on the pixel pipe. He would have to define also the color space on which the lut should apply.

dt should be able to find the input and output color spaces along with the input and output pixels and transform both input and output pixels into the required lut color space. Remains just to calculate the 3d lut equivalent...

Some additional assumptions: no local adjustments, no clipped pixel, no out of gamut pixel, ...

Is that correct ?

rabauke commented 4 years ago

@phweyland Probably more or less correct. In my view, however, there is not need for a specific additional functionality in darktable. You actually can create the lut without any additional new features for darktable:

phweyland commented 4 years ago

Export image to create the lut with export color space the wanted color space of the lut.

I understand the previous steps but I'm not sure about the last one. The pixel pipe has yet some shadows for me. Have you already got a working lut that way?

arunonnet2003 commented 4 years ago

Hi there,

Yes, LUT is very much limited to color transformations only that are applied globally to an entire image. ( eventhough limited in its scope it opens a wide range of presets available in fly to see on top of images)

Color space will already be defined in DT as working space. Input and Output will set the limits for pixel transformations in terms of color from its default state of its entry into dt pixelpipe.

OpenColorIO, imagemagick, gross grade, GIMP Gmic are few opensource projects incorporating this feature in its list.

All major applications depend on multiple transformations to work on log images-normalization as separate process. It is beneficiary on part of dt to define input working space since normalization can happen at that stage if required. And further all global color transforms can be exported as the 3D LUT transformation in 33x3 (widely accepted Lut export format in .cube extension).

Thanks for bringing in the hope.

On Tue, 4 Feb 2020 at 3:28 AM, Philippe notifications@github.com wrote:

Trying to understand... A first glance, the user would have to identify the first and the last modules he wants to simulate by a lut on the pixel pipe. He would have to define also the color space on which the lut should apply.

dt should be able to find the input and output color spaces along with the input and output pixels and transform both input and output pixels into the required lut color space. Remains just to calculate the 3d lut equivalent...

Some additional assumptions: no local adjustments, no clipped pixel, no out of gamut pixel, ...

Is that correct ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/darktable-org/darktable/issues/4166?email_source=notifications&email_token=AOLF7S7JAAGLML5IIWFOLSTRBCHPNA5CNFSM4KKIPEOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKVRUAY#issuecomment-581638659, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLF7S3PXIP43COWJW3QJWDRBCHPNANCNFSM4KKIPEOA .

-- Best Regards, Arun Kumar Pandey.

rabauke commented 4 years ago

@phweyland Just tried my approach as sketched above. Yes it works quite well, though you should not expect perfect match between the application of an editing stack including all individual darktable modules and the application of a single lut file. In my simple test I observed some brightness differences which were recognizable by careful direct comparison.

arunonnet2003 commented 4 years ago

Thanks for trying, Brightness variation should also be a virtue of a change from an initial pixel input to a final pixel out in terms of LUT being applied on an image outside of DT. In my testing out the haldClut way of exporting LUT, i also faced change in brightness value, since the colors matched. Of how much i could gather the local contrast module tweaked certain parametres that could not be replicated via the LUT. Not sure what but in tactfully breaking down modules and their operations in pixelpipe i am sure we would be able to pinpoint the cause of the variation. Thanks, Keep trying till we get there. I am happy and would invite to test out trial modules from my end to pinpoint a desired behaviour out of 3d lut import export module. 👍🏻

On Thu, 6 Feb 2020 at 1:08 AM, Heiko Bauke notifications@github.com wrote:

@phweyland https://github.com/phweyland Just tried my approach as sketched above. Yes it works quite well, though you should not expect perfect match between the application of an editing stack including all individual darktable modules and the application of a single lut file. In my simple test I observed some brightness differences which were recognizable by careful direct comparisson.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/darktable-org/darktable/issues/4166?email_source=notifications&email_token=AOLF7SZVLPPLV5FUZ44OHJ3RBMISPA5CNFSM4KKIPEOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEK4WP5I#issuecomment-582576117, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLF7S6R73CATVJOYMXBBCLRBMISPANCNFSM4KKIPEOA .

-- Best Regards, Arun Kumar Pandey.

phweyland commented 4 years ago

Just tried my approach as sketched above. Yes it works quite well

What is the color profile you select for colorout ? for export selected ? Both should matter, right ?

arunonnet2003 commented 4 years ago

Hi there, Of how much i remember these setting have me exact colors but non localised contrast Input profile: standard color matrix Working profile: rec 709 gamma Output profile: rec 709 gamma

I mean the color mapping was accurate except that i had to tweak contrast in resolve to match it.

🤞🏻Thanks

On Mon, 10 Feb 2020 at 12:49 AM, Philippe notifications@github.com wrote:

Just tried my approach as sketched above. Yes it works quite well

What is the color profile you select for colorout ? for export selected ? Both should matter, right ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/darktable-org/darktable/issues/4166?email_source=notifications&email_token=AOLF7S4LROW2OWV42GM3TIDRCBJLLA5CNFSM4KKIPEOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELGVNBQ#issuecomment-583882374, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLF7S3HCLFWVG46DTWCZV3RCBJLLANCNFSM4KKIPEOA .

-- Best Regards, Arun Kumar Pandey.

github-actions[bot] commented 4 years ago

This issue did not get any activity in the past 30 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

johnny-bit commented 3 years ago

With lua scripts there's a new "exportLUT" script (documented here: https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/exportlut/) which automates creating luts from styles.

Given that we have lut3d module (import luts) and that script (+ info in this issue on creating luts) would this be enough to consider this issue solved and close it?