base curve instance being the inverse of another base curve

Given a base curve module instance, how can a second base curve module instance be created that is the inverse of the first, such that the net effect is the unit transformation?

I tried a straightforward approach where I created a node in the second base curve module instance for each node in the first instance, and used the inverse factor. Say in the first instance the node is at 85 / 98, then in the second I created 85 / 73 (73 = 85 * 85/98). But the result was far off from being a net unit transformation. I suspect the reason is that base curve’s input is the ‘high’ dynamic range of the camera space, but the output is the standard dynamic range of the export color space. The 2nd base curve instance has to take this into account, but I don’t know how. I looked at base curve’s implementation in src\iop\basecurve.c (function apply_curve), but that didn’t help me to come up with a solution.

The use case is that it is my decision that I want to do certain image modifications in Lightroom rather than Darktable, before I do the rest in Darktable. But I only want the effect of my explicit Lightroom edits, not the effect of Lightroom’s implicit / always-enabled panels (modules in Darktable lingo) (except for demosaic, which is arguably unavoidable). It seems like Lightroom always does what Darktable calls base curve.

For example, starting with a raw image in Lightroom, disabling all panels (modules in Darktable lingo), exporting as a TIFF, importing into Darktable, and comparing that with what Darktable displays for the same raw image with all modules disabled that can be disabled except for “base curve”, shows that the two images look pretty similar, ignoring details. Thus it seems that Lightroom always does what Darktable calls “base curve”. Thus, I would like to inverse in Darktable the effect of the ‘base curve’ that Lightroom stubbornly applied. As described, the effect of the base curve module in Darktable seems to be pretty close to the ‘base curve’ of Lightroom.

Howdy, welcome to the forum.

You’ve hit upon one of the downfalls of proprietary software: lightroom is a black box and what exactly it does we do not know. Not only does lightroom not show us I’m the app, but we also can not read the source code.

Certainly it is your choice to do some base processing in lightroom, and you have to live with the consequences of those choices.

Lightroom’s output will also be affected by its colour profile, i.e. “Adobe Standard” or “Adobe Colour”. Many factors at play, and as @paperdigits said, we know nothing of them. To reverse the process in another software seems impossible to do.

To me, it is good enough when I can invert Lightroom’s “base module”, as demonstrated by applying in Darktable the base module to the raw image and comparing to Lightroom’s export. For my purposes, the two images are close enough. Anyway, to me the question really is as stated in the first parahraph of my post. It doesn’t matter what the use case is.

I think you have an error in your reasoning. The inverse of 64→74 is not 64→54. Instead, it is 74→64.

What is it exactly that lightroom is giving you in this scenario?

can LR not be set neutral ie use a linear profile…I think it can and then you won’t have that to contend with??

@bastibe yes, that was it!