Assistance with LUTs designed for another color space such as Log

I’m working on a project to create ICC profiles for Capture One (or profiles for Lightroom) that would give me the look of LUTs (designed for Log color spaces) with my Fuji raw(RAF) files. It goes without saying that I can’t simply toss a LUT(designed for Log) onto my photo and expect the result to resemble a Log file with that same LUT applied. There has to be a conversion of some kind in between. This is how I found out about DarkTable.

I downloaded it for the first time today and was impressed to see its technical capabilities and that it not only accepts LUTs but also has some color space conversion options in the “input color profile” and “output color profile” modules as well as the “lut 3d” module. So my first couple of questions are:

  1. What options should be set if I wanted to use these LUTs, on my raw photos, and have them be as accurate as possible? Accuracte meaning they’ll look, as close as possible, to how the LUT would look on the Log footage they were designed for.
  2. What order should the modules be arranged in so as to produce the best accuracy?

Once all of that is finished and I have the look that I’m going for, can all of that be saved in an ICC format so that it can be used in Capture One (or profile for Adobe Lightroom)?

The LUTs you linked to don’t even specify what their intended input colorspace and transfer function are… They mention the A7S3, but beyond that… S-Log2? S-Log3? S-Gamut3 or S-Gamut3.cine ???

You would have to somehow convert to the appropriate gamut and transfer function, or chain your “look” LUT after a colorspace conversion LUT that converted from something easier to achieve in dt’s pipeline to whatever your “look” LUT wants, then use that chained LUT in dt.

I’ve been basically doing the exact opposite of you - generating HALD CLUTs by processing frames from a video in RawTherapee. In my case, I export one frame from video, assign an ICC profile that corresponds to S-Log2+S.Gamut to it, edit it, and then export with an ICC profile that corresponds to the desired output colorspace/transfer function. Some discussion of that kind of flow can be found buried in Converting S1H raw files to V-Log gamma

Edit: To clarify, I do the editing with a real image, then apply those edits to a level 16 HALD CLUT tagged with the same ICC profile.

2 Likes

I’m sort of with entropy512 here.

On the page of the luts I can’t read anywhere to what kind of source material they are supposed to be applied to. Stuff from a Sony a7s3 or fx6, yes. But those have 100+ shooting modes :).

Since it’s made for video, I assume there is a manual somewhere that says ‘use this picture profile, with these settings and this white balance’ or something similar.

If you want to ‘apply’ those luts to your raw footage, you need to get the raw footage to look like the Sony look as described first. No easy task.

If you set your camera to the exact look-settings as required, the jpgs it writes are having the look as well (my a7m2 does at least). So you have an example of the look you need to get before applying the lut.

But if you need to manually edit the raw to look like a look first, the need / use of the lut kinda goes away :).

What you are trying to do is replicate Sony’s raw processing of a certain picture profile perfectly, and then apply a transform on it. I see a difficult road with lots of ‘yeah but…’ on the way forward :).

You could try opening the raw in rawtherapee. It’s ‘auto match curve’ thing will try to get close to the preview jpg embedded in the raw. This way you have a clue to what needs to be done to your raw data to get it close to a picture profile. But all the color stuff is not auto-matched as far as I know, so you still are not exactly right as the Sony picture profile. But you are in the ballpark.

But these kind of luts loose their meaning for me if the source is already ‘in the ballpark’ instead of ‘exactly right’. To me you are better of trying to edit your raw files to the final look you want.
Shoot a picture as raw if jpeg, apply the lut too the jpeg and use that as an example of what you are trying to get too. Learn what you do and make a preset of the relevant modules you used so you an quickly to it again.

1 Like

The creator of those LUTs, that I linked, made the LUTs for S-Log2, S-Log3, and S-Log2/S.Gamut3.Cine (three separate sets of LUTs for each profile). But I just wanted to use those as an example. I might find LUTs designed for Arri LogC, BMPCC 6K, Rec.709 or anything else. I’m simply trying to find a way to be able to convert/transform the raw photo into any kind of Log (or Rec.709) format necessary to accept LUTs designed for that format.

The workflow would be:

  1. Import raw photo (like a Fuji RAF)
  2. Transform/convert to S-Log2 (or another Log)
  3. Apply LUT (designed for that Log)
  4. Save this whole thing as an ICC profile which is usable in Capture One or profile for Lightroom

Entropy512
Thank you for pointing me in the direction of the S1H post. I think that’s going to be a HUGE help as I think the guy who started that topic is looking for the same thing as me, but for different reasons. I need to read through that whole thing and if I’m still having issues, I can message the poster and see if he solved the issue.

jorismak
I like the idea of manually changing the raw to look like Log. This could be a great starting point. The only issue is that the LUTs may be designed to work with Sony’s S-Log2 colors (as an example) and even if I could get my Fuji raw photo to look like a Log shot using curves or something, it’s not possible to to align the colors with the limited tools. Even if I could match the colors in a Fuji raw photo to look like the colors in an S-Log2 still/jpeg, I’d quickly find with another sample image, the colors don’t line up.

In Davinci Resolve there is a feature called “color space transform”. According to the manual (page 3012), it states:

Lets you perform the kind of color transforms that LUTs do, but instead of using lookup tables, this plug-in uses the same math used by Resolve Color Management (RCM) in order to do extremely clean color transforms without clipping.
Exposes four pop-up menus that let you set an Input Colorspace, Input Gamma, Output Colorspace, and Output Gamma, in order to do controlled transforms from the Input settings to the Output settings, right within a grade. Resolve Color Management does not have to be enabled for you to use this filter.

This lets you transform your footage from one color space (like S-Log2) into another color space like Arri LogC. So if you have LUT designed for profile X but you shot in profile Y, you can simple transform the shot and use LUT X.

Another program which does something similar is called Cinematch. This program is great for people who shot using two different cameras (example: 1 Sony A7S3 and 1 Panasonic S1H) and need to make sure the clips look the same in terms of profiles.

I guess I’m wondering, if you can convert color spaces and camera profiles from one camera to another using those two tools above (for video), why can’t you also do something similar for raw pictures to look like Log video?

If you can get your hands on all the various color spaces, then transforming the raw into that color space shouldn’t be an issue, and many of the free software raw converters, darktable, rawtherapee, and photo flow , will happily do that. Since Rec709 is freely available, you can start there with ease.

I think the problem will be that each camera will have a unique sensor response, and even of they’re all in the same color space, they won’t be exactly the same. I also assume the S-log spaces/profiles you mention are finely tuned to a specific camera with specific settings.

That being said, all you can do is try! Get a bunch of shots and footage into rec709 and have at it!

1 Like

paperdigits

Thanks for your response. I understand that it’s not REALLY possible to convert things 100% because camera sensors are different and respond to things differently but I do think that seeing as Log footage has less information than a raw photo (that’s my understanding), I should have more than enough latitude as far as highlights and shadows go. And colors will be pretty close when transformed. Close enough for me anyway.

Resolve’s color space transform asks for two things for the input and output. Color space and gamma. Color space being things like rec.709, S.Gamut3.Cine, etc and gamma being things like S-Log2 or Arri LogC.

Would you happen to know what the color space and gamma is for a raw photo? Or at least where I can find that. My guess would be color space = sRGB and gamma = Linear but I’m not sure if it’s that simple.

1 Like

A raw photo before you put it in the processing pipeline has no color space, it is an array of mono chromatic measurements. Your raw converter assigns it an input, working, and output colors space. For darktable, rawtherapee, and a few others, you can set those parameters to be whatever you want. For darktable in particular the default working space is Rec2020. You can export into that color space as well, if you want to continue processing the image elsewhere, or set the working space to Rec709 and export it to a linear Rec 709 encoded tiff.

2 Likes

I think the issue at one time with Resolve was getting the raw into it…so it wouldn’t read your Fuji files and so the work around was to try to create a linear DNG for Resolve which it would read but there were some issues I think with clipping and perhaps others I can’t recall…so I think you could do all your conversions in Resolve but getting the data into it without issues might still be a challenge or maybe not…this was from something I read a while back and updates always keep improving things…

Color space ‘none’ (or at least different per camera model).

Gamma = 1.0 (linear)

Resolve apparently still doesn’t support X-Trans, so that can be problematic for Fuji users.

One could probably create linear DNGs in camera-native colorspace and use those - e.g. demosaic it but don’t perform colorspace conversion.

“Linear DNG” is the terminology used for a demosaiced DNG, although in reality, whether demosaiced or not, DNGs don’t actually have to be linear… In fact in that S1H thread, it appeared like Atomos was shoving V-Log/V-Gamut data into DNGs. The data was most definitely not linear, it was log-encoded.

I can tell you that in general, unless it has a “shaper LUT” on the input, you really don’t ever want a 3D LUT to be operating on linear data because you want the LUT’s samples to be more perceptually linear as opposed to mathematically linear. But actual S-Log isn’t supported in dt, so you’re going to want to do something that chains your “look” LUT after some other colorspace transform. For example, one option might be sRGB gamma and Rec2020 gamut - you can create a HALD CLUT that converts from this to S-Log2+S-Gamut3.Cine, then use ffmpeg’s lut3d filter to apply your “look” LUT to that. Now you have sRGB gamma + Rec2020 gamut → your “look”. I’m assuming you can tell dt that the LUT output is rec709 gamma + rec709 gamut (most cinematic “look” LUTs are intended for 709/709 output).

(For some standards and colorspaces, you can safely make an assumption whether the identifier is talking about gamut or transfer function. This isn’t the case for sRGB or Rec709 - both of these specify both a transfer function AND a gamut, and it’s possible to use one without the other.)

Thanks for the help!

My best workflow so far:

  1. Export sRGB 16-bit, uncompressed TIFF from Capture One. I used a colorchecker photo just for curiosity.
  2. Import into Davinci Resolve.
  3. Use resolve to make a color space transform in node 1 from sRGB/sRGB to the LUT’s gamma/gamut (S-Log2, Rec709, etc)
  4. Add node #2 and put LUT you want to copy in node #2.
  5. Add node #3 and transform from LUT’s profile (S-Log2, Rec709, etc) back to sRGB
  6. Copy this power grade onto a HALD 256x256x256
  7. Export that HALD image as a still (TIFF)
  8. Open the same colorchecker photo into 3D Lut Creator and choose graded HALD TIFF as input LUT in mask tab
  9. Make adjustments to curve. Usually this because the LUT starts with highlights pushed down and shadows pushed up and I didn’t want to “bake” that into my LUT export from Resolve.
  10. Export as LUT, or ICC profile (in my case), etc.
  • I used a color picker to make sure colors (HSL values) lined up both in Resolve and 3D Lut Creator.

Do you think I should make any changes or adjustments to this?

1 Like

Probably best if you can export a linear tiff in rec 709 or 2020, no? If you can’t do that in C1, you can do it in darktable or rawtherapee.

1 Like

If darktable lets you set the input and output gamut for the LUT module to Rec2020 - I’d suggest using that as the input and output for your designed LUT to avoid gamut clipping

Although an output of 709 might be fine, given that your “look” LUT probably is limited to 709 for the output gamut anyway, but there’s a good chance you want a wider input gamut

Thanks for the tip. I tried out your recommendation and it’s the closest I’ve gotten so far. So far, from what I can tell your suggested workflow is:

  1. Dark Table:
    1.1 Import image into Dark Table
    1.2 White balance. In my case this is easy because I’m using a ColorChecker Passport
    1.3 Input Color Profile:

    • 1.3.1 Input Profile - Standard Color Matrix
      1.3.2 Working Profile - sRGB (web-safe)
      1.3.3 Gamut Clipping - Off

    1.4 - Output Color Profile:

    • 1.4.1 Export Profile - HLG Rec2020 RGB

    1.5 Export:

    • 1.5.1 File Format - TIFF
      1.5.2 Bit Depth - 16-bit
      1.5.3 Compression - Uncompressed
  2. Resolve:
    2.1 Import TIFF into Resolve
    2.2 In Color tab ensure there are 3 nodes

    • 2.2.1 Node #1 Color Space Transform: Input color space = Rec2020. Input gamma = Linear. Output Color Space = Rec709. Output Gamma = Rec709
      2.2.2 Node #2 LUT or plug-in which contains look to copy
      2.2.3 Node #3 Color Space Transform: (I wasn’t sure if I should do anything here)

Please let me know if I missed anything so far.

I believe this should be something with a much wider gamut. The default in darktable is linear rec 2020