Film simulation and HaldCLUTs

I’m looking for some for some further insight into how to use HaldCLUTs in RawTherapee. Most of the discussions I’ve seen/read focus on the mapping of the “input” colours to the “output” colours via a CLUT. But what I am not seeing is any discussion of what is the appropriate starting point for the application of the film simulation and how the film simulation affects tonality. With the respect to the starting point, I am aware that the position of the film simulation is fixed in the tool chain but my point is more that it doesn’t make any sense to do a bunch of tone curve adjustments in conjunction with the application of the HaldCLUT if you are striving for accuracy in your simulation. And – correct me if I’m wrong – essentially all a HaldCLUT for a b&w simulation contains is a tone mapping. So why would one fiddle with tone if the end goal was to apply a film simulation?

I’m talking around my confusion here, so let me ask a very specific question: If my end goal is to produce an accurate as possible rendition of Tri-X, how should I proceed? I assume that I should start with a neutral profile and then choose and apply an appropriate film simulation. And that’s it. Except for exposure compensation any further adjustments – tone curves, contrast etc – will take me away from an accurate simulation. Is this correct or am I not understanding something here?

I don’t usually start from an exactly neutral profile but the key point should be that I start with a camera standard input profile and no tone curves. Is this correct? But what about white balance? The final result depends upon my choice of white balance.

By extension then, the process for a colour film simulation would be start with a neutral profile. Find the correct while balance? And then apply the simulation.

Any insights and wisdom would be appreciated.

The answer isn’t great: it depends on the LUT. Different types of LUTs expect different input to produce the intended output.

I believe most of the film haldcluts are meant to be applied after the display transform, in so called “display referred.”

RawTherapee has a fixed processing pipeline, so it applies them in the optimal spot for the application.

well you’re not wrong, but in this situation with RawTherapee’s HaldCLUT files, they expect sRGB colourspace as input, so some sort of tone mapping is required to get your RAW file in the right range to begin with.

it also pays to realise that the results from these LUTs are going to be pretty arbitrary. Tri-X is a negative film stock and there are still a ton of variables between getting a negative result out of the film tank and turning that into a print, and all of those variables will effect the tonality of the final image.

arguably the most important and likely the most difficult thing you need to get right if you wish digital B&W images to pass alongside film prints or scans is the grain structure.

not necessarily. Colour film was either daylight or tungsten balanced. It was/is possible to make adjustments when prints are made, or by using filters on your lens, but leaving the WB alone is how you get those super warm golden hour shots, like this film scan of a shot I took on Superia X-TRA 400:

in general when it comes to LUTs and film emulation in photography, you’ll be hard pushed to find anything that’s as robust as what they have in the cinema space. For the former its basically all artistically motivated, where as the latter had very specific technical requirements when producing film prints from digital intermediate processes.

So I naively ask how do I do this? Up until output, which I have set as RTv4-sRGB, my working profile is ProPhoto. So is this an incorrect choice if I want to use film simulation? I see from the toolchain pipeline that film simulation is part of the RGB processing just prior to the LAB processing – so right in the middle of things. Or perhaps I need to use my specific camera profile and tone curve first rather than go for “Camera Standard” (without a tone curve).

I realize for the reasons you stated that the results are going to be pretty arbitrary. But what I am trying to understand is what do I have to do to match as closely as possible the output that the author of the LUT intended. Once I have that then I can tweak it as I see fit (or not). In my current state of thinking, I am close to thinking that the whole process is flawed since the appropriate “before” image appears undefined. But rationally, I don’t believe that to be true. So my question becomes: what am I not understanding?

With respect to the colour film simulations, maybe I should have said “appropriate” white balance rather than “correct” white balance. I would think that the appropriate white balance to choose would be the colour balance of the film you were trying to emulate. Then I would expect that the simulation would appropriately track the film when developing a sunset shot using a simulation of a film with a daylight balance and the input white balance is also set to daylight.

I know absolutely nothing about RawTherapee sorry, except for the fact they offer a handy collection of film simulations that I can use in darktable. I can only assume that the RawTherapee devs have come up with a sensible solution that doesn’t involve you having to worry about managing any colour space transformations yourself.

well a jpg straight out of your camera made with the default profile will probably get you as close as anything. These artistic LUTs really could be anything, you can read more about it here.

if you want more accurate results I would suggest using a tool like DaVinci Resolve to build your own HaldCLUTs using other people’s painstaking film emulation efforts that you can then bring back into a stills workflow in RawTherapee or darktable.

This has been a topic of discussion several times. The answer is more or less that no one knows; the RT CLUTs are not meant to be exact.

The “correct” starting point for applying the HaldCLUT is the one the author used when creating the HaldCLUT. Unfortunately, I don’t know the origins of the CLUTs so I can’t tell you what exactly that is. It’s reasonable to assume that there should be no non-linear tone or artistic color adjustments prior to the application of the HaldCLUT.

RawTherapee handles the color space conversion from the working space to the intended transformation space and back to the working space. In case anyone is curious, HaldCLUTs don’t contain any color space information, so RawTherapee looks at the file name to determine what the transformation space is. The default color space is sRGB. I don’t know if any of the HaldCLUTs in the film simulation pack use anything other than sRGB, but you’ll see the color space in the name if one does.

1 Like

Thank you all for taking the time and effort to respond. Reading your responses and following up on the references (some of which I had seen previously) has been very instructive. And a bit of a rabbit hole as well. However none of them really directly and explicitly addressed my concern about the appropriate starting point in RT except for:

That’s sort of the conclusion I was reluctantly coming to. But while not ideal, I can accept that.

you just need to find better LUTs if you’re that concerned with being accurate.

or better yet, if you’re only interested in Tri-X you just need a roll of that and a colour checker and you can make your own LUT. If accuracy is your primary concern it would absolutely be worth doing. It’s not difficult. You could even do different LUTs for different developers if you want to.

In fact, in vintage early 1970s Tri-X the shadows (toe) and highlights part of the H&D curves [anachronistic terminology intentional] could be moved around a non-trivial amount by using different developers and ASA (now ISO) values for exposure. A “perfect” replication of most black and white films has to take into account specific developer type and time/temperature conditions. In principle, it is easier to approximately match color films than black and white films since the chemicals were highly standardized and color accuracy and quality would go away if the time and temperature conditions were varied much.


Thank you for the additional comments. I found the comment re matching colour films quite interesting.

Perhaps I have unintentionally misled with respect to my focus on accuracy and Tri-X. Rather what I was trying to do was to precisely frame my question and so I chose a very particularly case. The conclusion that there is an uncertainty involved because we lack knowledge of the initial setup for producing the LUT and also the details of the intent is OK. That that is the case means that I have indeed correctly understood the limitations of these LUTs and I have not misunderstood some key concept in their use (in RT).

1 Like

I think all your initial assumptions were pretty much correct. Whenever I use those luts in dt it is never in conjunction with another tonal curve, but in place of it. The look of the curve is baked in to the lut, so you don’t want to place another curve on top of it.

Film stock white balance was typically either tungsten or daylight (~3000k, ~5500k), so set your wb to that if you want to stay true to the process. Otherwise set it according to what looks best.

Adjusting exposure is like raising iso.

Channel mixer used in a certain way can be a bit like applying a filter over your lens.

1 Like

FWIW… I always use those LUTs (the RT HALDClut collection) with sigmoid applied as well. I’m not trying to accurately emulate anything, but I find they give very nice result in some cases with this flow.
This one for example - [Capture Challenge] Charge your battery and take some photos - #1421 by 123sg (the colour shot) and this one - [Capture Challenge] Charge your battery and take some photos - #1437 by 123sg

Well - I think it’s nice anyway. :wink:

Rules are made to be broken :wink:

1 Like