I made styles which mimic Fujifilm Film Simulations without LUTs

I had a few weeks off work last year and I always wanted this, so I made it happen: Fujifilm Film Simulations (all except Sepia and Nostalgic Neg) as darktable styles, without using LUTs and reasonably high accuracy.

I also made an interactive tool to compare the styles vs. the corresponding out-of-camera JPEG and Darktable defaults.

And you can download them here.

They need Darktable 5.4 because they rely on AgX, other than that they have no dependencies.

To make them, I wrote a Python tool I called dtsolve, which you can use to make your own styles for your own camera brands. I know that @Ge0rG is currently trying that for Samsung NX and already contributed a few README improvements.

Have fun :slight_smile: .

34 Likes

That’s awesome! Thanks for sharing. Can you post some samples?

1 Like

There’s a sample in the linked post, but I concede that it’s a bit contrived, so here’s another one.

This was one of the first pictures I took when I got the camera and it has been part of my benchmark of testshots for the Film Sim styles. It was shot with Velvia and this is the (downscaled) OOC JPEG:

Darktable 5.4 defaults (AgX + autotuning + fixing color calibration + lens correction):

With the style I made:

(the Velvia style in particular has a larger difference to the OOC around highlights, but I don’t think it hurts in most cases)

I’d post another one, but I’m too new to post more than 4 pictures in the same post :smile: .

3 Likes

When darktable abandoned the HaldCLut project, I created DTStyles with Andy. Here is the article (in French):

based on this video:

1 Like

What does this mean?

This is amazing! I can’t wait to play with this once I’m back at my computer!

I’ve tried similar things in the past, based on darktable-chart, or LUTs. But your solution looks so much better than mine. Awesome!

If you’re asking about the HaldClut branch: there was a proposal to use LUTs in darktable that wasn’t accepted in the master branch at the time!
It was intended to be equivalent to RawTherapee’s ā€œFilm Simulationā€!
Some of the algorithms from this development are in the 3DLut module.

1 Like

@bastibe, that’s the method I used back then. I was never satisfied with the DTS styles produced.

I’m also going to test this method, especially if it allows you to create DTStyles with the pipettes.

I think that fujifilm applies a DCP profile before the film simulation, the risk with this method is that you are copying your camera DCP profile applied by fujifilm + the film simulation.

In thery the most robust way to use dtsolve is to feed a raw file with a DCP profile applied.

1 Like

Hmmm… Can you elaborate? I’m not exactly sure where a DCP profile would fit in, but if I understand you correctly, it’d indeed make sense to exclude that from the solving process (by applying it beforehand).

In which case… how can I obtain the DCP profile for my camera? :slight_smile:

Install AdobeDNGConverter

Thinking again, I wonder: doesn’t darktable apply its equivalent of the DCP (as a color matrix) via the input color profile module already?

In the forums here, there seems to be a bit of confusion between DCPs-for-neutralising-an-image-for-further-processing and DCPs-for-mimicing-a-specific-OOC-look.

In any case, I did try the dtstyle files against my old Canon’s RAW files and I didn’t notice any adverse color cast or anything.

A DCP profile is something that fix the simple color matrix imprecision.

Rawtherapee and ART supports and have DCP profiles for a lot of camera models.

simple matrix

DCP profile

The difference in hue and saturation in the second image is what you are carry to other cameras, for me it should be removed from the equation

1 Like

Thanks a lot for the references and the explanations.

I toyed around a bit by taking the X-T4 DCP profile from RawTherapee and converting it to ICC using dcamprof dcp2json and dcamprof make-icc.

The colours (without applying the styles) are vastly different from darktable’s defaults. I’m not sure if that is correct (for whichever value of correct). I also cannot spot a visual difference between the DCP-converted-to-ICC for the Canon EOS 400D (my previous camera), the one for the X-T4 and a random Sony profile I picked from RawTherapee’s folder. That means that either it doesn’t matter much or I my conversion workflow is severely borked.

I’m not sure what gets conserved when you convert to icc. The dcp profiles are dual illuminant and have tone curves and look tables to handle hue shifts… I’m not sure that command in dcam is going to give you an icc ā€œequivalentā€ to what you see with the DCP on a given image…

1 Like

Wow, this is amazing!

As many others, I also tried to solve it using LUTs. I was happy with my most recent results, but having something that directly uses more ā€œnativeā€ modules is nicer!

One thing that I did for my current LUTs is to factor out the tone curve after the DT tone mapper and make a LUT that is mostly color changes. This way, I can easily shift between LUTs without changing the overall tone of the image and needing to redo my edits (tone equalizer, exposure, AGX, etc.). The approach I followed was:

  1. Shot an IT8 Advanced Target (ISO 12641-2), I used only the values of patches.
  2. Export the raw with AGX (using the defaults)
  3. Do an interpolation from raw → OOC using only the gray patches from the chart and L component of Lab.
  4. Apply the inverse of the 3 to the OOC, but only to the L, to get OOC’.
  5. Interpolate raw → OOC’ and apply it to a cube LUT (I use a RBFInterpolator between the color patches)

I believe I can do something similar using dtsolve, right? I’m trying to understand the code better and how to use it!

(Just as a reference, this is my current LUTs meant to be used after AGX and in linear ProPhoto RGB.)

1 Like

You can. With a finished style like those I shared, you could just apply them to an image and then save a new style excluding the AgX module.

dtsolve has words in the README on the approach of making styles, which should explain the procedure. Basically, with dtsolve, the approach is to first solve the tone curve (using a monochrome reference image) and then solve the colour modifications (using a colourful reference image or even a test chart shot) while keeping the tone curve fixed. That leads to faster convergence and since the two are mostly orthogonal, it works out nicely.

There’s currently no way to then exclude the tone curve from the final dtstyle, but that can easily be done with a text editor or with a small code change.

5 Likes

thank so much for this. I love how these render colours, especially skin tones.

A question regarding AGX (which I love using)

I’m currently using the Auto Applied Scene referred defaults.

So

  1. turn off auto applied scene defaults,
  2. reset history
  3. before I apply the preset, I get tool tip mismatch warning for sig, film, base, etc.
  4. I run the style anyway :wink:
  5. I get a pleasing result.
  6. AGX is activated, with a steep contrast curve (orange warning)

Do I just ignore those warnings?
I want to be sure I end up with all active modules you intended.

Any advice how best to use them appreciated

I apply ā€˜auto tune levels’ to bring AGX back into a more usable curve. This doesn’t seem to affect the result, but gives me a more natural curve to continue editing with

(is this wrong?)

Noticed it leaves orphaned instances in the history stack. I created duplicates and made one with just AGX tone modules (see pic)

thanks again!


1 Like

You’re welcome! :slight_smile:

If you reset history, you don’t need to turn off the auto-applied defaults. he style will override the AgX settings completely.

Also, with the 1.1 release I just pushed, you probably don’t need to reset history at all (unless you want to for other reasons, e.g. because you are using the color correction module and want to get rid of that before applying the style).

The 1.1 release fixes that, too.

Yeah, that tone curve is really steep in all modules and that’s simply what the solver came up with…

The styles take care of that.

Now this seems interesting. I would expect there to be a difference between the auto curve and the style. But it’s possible that it’s not visible in your particular image.

I let the solver find the AgX curve with a luma shot which went from all dark to blown out highlights in a single gradient image, so the AgX curve the styles come with are aimed at covering every situation. It seems that the Fujifilm Film Sims indeed have a very peculiar tone curve (from AgX’ perspective anyway).

All that warning says is merely that the shoulder is not a shoulder.

Not sure what you mean by orphans :). The disabled filmic rgb, sigmoid and base curve modules are intentional, to not cause issues for people who are still on ā€œsigmoid-ā€ or ā€œfilmic enabled by defaultā€ settings. Mixing AgX and sigmoid/filmic/base curve is generally a bad idea, so the styles protect you against that by forcing them to be disabled.

1 Like