Camera Raw/Lightroom: Creating profiles using a Look Table

  • 1
  • Question
  • Updated 3 months ago
  • Answered
  • (Edited)
I have been reading the ACR and Lightroom Profile SDK and tried producing a profile that would invert an image using a Look Table. It seemed to me to be quite simple, but it didn't work.

My logic was that the HSV look table should be easy to produce inverted colour: if the hue <= 180 then add 180, otherwise subtract 180. Leave the saturation and value unchanged. I decided the look table only needed two entries, so my csv file contained:

2, 1, 1, 0
180, 1, 1
-180, 1, 1

This didn't seem to do anything. Reading a bit more from the dng spec 1.4.0.0 suggested that each hue value should have at least two saturation values, so I changed the csv file to:

2, 2, 1, 0
180, 1, 1
180, 1, 1
-180, 1, 1
-180, 1, 1

This at least made a visual change to the image when applied as a profile, but nothing like a negative of the image. Adding another hue division:

3, 2, 1, 0
180, 1, 1
180, 1, 1
180, 1, 1
-180, 1, 1
-180, 1, 1
-180, 1, 1

changed the image a bit more. Then trying four hue divisions changes the image again, but adding more hue and/or saturation divisions resulted in no further changes to the image's appearance when applied as a profile. I created another profile with a reversed point curve to visualise what I was actually trying to achieve.

These are the preset previews for profiles I created using ACR (Invert LT21 - Look Table 2 hues, 1 saturation, Invert LT22 - Look Table 2 hues, 2 saturations, etc) All have a single value division. The last one, Invert PC is the point curve inversion (a proper negative).



Anyone got any clues as to where I'm going wrong in my thinking or have I totally missed the mark somewhere?
Photo of Anthony Blackett

Anthony Blackett

  • 104 Posts
  • 38 Reply Likes

Posted 4 months ago

  • 1
Photo of Nathan Johnson

Nathan Johnson

  • 24 Posts
  • 22 Reply Likes
When you do a point curve inversion, you are also inverting the value (i.e. the brightness). So things that are dark become bright, and things that are bright become dark. Since your looktable contains only one value division, you are not changing the value at all (just the hue).  That is the biggest reason your image does not appear inverted.

Having experimented quite extensively with look tables, I can also tell you that the looktable method is not a good way to convert color negatives for a few reasons. The first is that it does properly deal with the effect of the orange mask. And second, because of the way the looktable interpolates between defined points. Because there is a limit to the definition of these look tables, you will run into issues... practice on a color wheel, and you will see what I mean. 

source: I tried this method of negative inversion when I first began developing Negative Lab Pro for Lightroom, but abandoned it because of the limitations. 

-Nate
Photo of Cameron Rad

Cameron Rad

  • 116 Posts
  • 28 Reply Likes
Dope product Nate!
Photo of john beardsworth

john beardsworth

  • 1136 Posts
  • 271 Reply Likes
The profile is also applied at the end of the LR process, so the sliders would still operate counter-intuitively
Photo of Cameron Rad

Cameron Rad

  • 116 Posts
  • 28 Reply Likes
@john That's the RGB Lookup Table, this is talking about the HSL look table.
Photo of john beardsworth

john beardsworth

  • 1136 Posts
  • 271 Reply Likes
Thanks for pointing that out, Cameron. I'd forgotten about that area and had a happy half playing, oops experimenting with it.
Photo of Victoria Bampton - Lightroom Queen

Victoria Bampton - Lightroom Queen, Champion

  • 4676 Posts
  • 1797 Reply Likes
That looks great Nathan, I look forward to playing!