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.