Monday, April 29, 2024

Matching Hasselblad Phocus' "Nature" preset in RawTherapee...

Recently I've been taking a closer look at color management, color grading, and film emulations.  When a question came up about the possibility of matching Hasselblad Phocus "Nature" image tones in other image processing software, because the commenter seems to very much appreciate this look and see's it as very "film like", I thought it'd be interesting to see what I could do in RawTherapee.

The original conversation centered around LUTs and considered having someone (a pro, for instance) create a Phocus "Nature" emulation for LR/PS.  So that's where I started, where my target application would be RawTherapee in place of RentWare.  The only problem was, how?

I looked at exporting .xml files that Hasselblad uses to manage colors, but no one seems to know what the format is.  The one person talking about Phocus' .xml format indicated that all they could do was decode a file header, but that they had zero idea what the subsequent fields of information meant.

OK.  Blocked on that path. There are not enough hours left in this life for me to reverse engineer something as potentially complex as all that

Then I read that Phocus software can open non-Hasselblad file formats and I thought *bingo*, all I needed to do was grab a HaldClut template and apply the Phocus preset/look and import it straight into RawTherapee.  

I made HaldClut files for "Nature", "Product", and "Portrait"... and... nope... failure.  Nothing looked quite as expected. Applying these new Cluts did nothing to images in RawTherapee.  How could this be?  Phocus presets/looks seemed useless. So, no cigar.

Darn.  Now what? Decoding .xml was out.  HaldClut templates were seemingly out, too.  Perhaps the questioners idea of hiring a "pro" to come up with a color grade that matched Phocus' "Nature" was the best idea after all?

Being the cheapskate I am I couldn't let the idea go.  Loading up a few .tiff files I sat down to take another this time longer whack at all things Hasselblad Phocus.  Here's what I think I figured out.

Phocus -

  • Imports Hasselblad RAW in the camera-original output format
  • Performs a demosaic
  • Applies a tone curve <- Important observation #1
  • Applies a color grade <- Important observation #2
  • Saves the resultant image as yet a second RAW-ish format (a 'blad specific dng or tiff called FFF)
  • Then, and only then, provides users access to several Factory presets/looks as well as a suite of image controls for further processing an image

Then I considered the presets/looks and saw that various image processing tools were enabled.  Thinking that this is where the Hasselblad color "magic" lay, I scrolled through these now enabled tools. Turns out these tools are simply image controls a user can now apply, such as exposure and tints and sharpness.  With the exception of "Curves", NONE of the tools had any direct impact on color.

For instance "Product" and "Portrait" presets/looks modified sharpness one way or the other. I would have expected skin tone changes with the application of "Portrait" and maybe some color modifications with "Product."  This wasn't at all the case.  Further, applying the Factory "Nature" to an image showed only a gentle curves modification, but nothing else.

Fundamentally, Phocus is doing next to nothing color-wise when applying it's Factory presets/looks.  These are not really "looks" as we might know them from using other manufacturers equipment and software.  

Here's the trick/secret about Hasselblad Phocus: The software seems to assume the pre-applied tone curve and color grading are perfect starting points as is (see "Important observations #1 and #2 above). 

This left me to consider the "Nature" preset/look.  The "curve mode" determines changes in color and luminosity contrast.  Let me set this aside for a moment and I'll come back to this shortly.

At the base of all this, Phocus and LR/PS color profiles can look strikingly similar.  I see that when an Adobe CameraProfile->Adobe->AdobeStandard<camera-specific>.dcp is used and compare it with Hasselblad Phocus and its default colors.  In both applications colors can be gently muted and various pastel subtones can add a certain "richness" to images by default.

Now remember that both Phocus and LR/PS apply a demosaic, color base, tone curve, and a color grade also by default.  For my purposes it seems safe to say the the AdobeStandard<camer specific>.dcp output is equivalent to what 'blad's Phocus gives.

Finally getting to the crux of the matter and fully appreciating that the base starting points between Phocus/LR/PS are similar enough for government work and borrowing LR/PS camera profiles into RawTherapee:  To recreate Hasselblad Phocus Factory "Nature" look in RawTherapee could be as simple as applying the correct curve.  

And it helps to recall something important about curve modes and the implications of choices I make.  I noted that 'blad's software "Curves" was marked RGB.  In practice, different curve modes in RawTherapee act differently in the way they distort colors as the luminosity curve shapes are modified.  

In RawTherapee I discovered that choosing "Weighted-Standard" curve mode seems to be the Magic Ticket to matching Hasselblad Phocus RGB curve.  Which is to say that Phocus "Curves" doesn't strictly implement "Standard RGB", hence the "Hasselblad color palette" that some people seem to rave about.

The following illustrates how little I modified RawTherapee "curves" to match Hasselblad's Phocus.  It's not much, but it's enough to gently shift the colors as well as adding just the right amount of luminance contrast.

Matching Hasselblad Phocus Factory "Nature" in RawTherapee ~ Curves Illustration

 

Here is my proof of concept in RawTherapee.  I've checked this using various color combinations and the basic processing applies across the board.  The following also illustrates how various curve modes (including "Standard RGB") affect color contrast and color distortion and in most cases fail to properly match Hasselblad Phocus "Nature". 

Matching Hasselblad Phocus Factory "Nature" in RawTherapee ~ Curves Mode differences


To summarize, matching Hasselblad's Phocus "Nature" Factory preset/look in RawTherapee is, in the end, trivially easy.

  • Open RAW image in RawTherapee (RT)
  • Let RT demosaic the image as per normal
  • Under RT Color Management select CameraProfile->Adobe->AdobeStandard<camera-specific>.dcp
  • Under RT Color Management enable "Curve Tone", "Base", and "Look" tables
  • Under RT Exposure apply a gentle "Weighted-Standard" curve (see above)
  • Under RT LAB adjust Chromacity -1 or -2
  • Save this sequence for later use

Lastly, if I select auto lens correction, my preferred vignette, and sharpening (a deconvolution - ie: Capture Sharpen) when I save the process steps the whole exercise of matching Hasselblad's Phocus Factory "Nature" preset/look in RawTherapee becomes a one button exercise.

All of which roundly exceeds expectations.

 

Thursday, April 11, 2024

Read the Readme, Dumb~Me...

Important Note to Self: Read the ReadMe file!!!

I've experienced a couple challenges recently when trying Fuji film simulations in RawTherapee. Things just weren't working out as expected.

For instance, when downloading cinema oriented Fuji-look-alike LUTs I learned to be very careful to find out if the LUT collection was made for S-Log input.  Why?  S-Log on the video side produces a very flat file for a very specific set of reasons that have nothing to do with stills photography.  And I'm not sure how to create an S-Log image starting from a stills RAW.

No matter how hard I tried, applying a S-Log LUT to a stills image seriously distorts the colors and contrast.  What drives me crazy is that none of the cine LUTs I tried come with a ReadMe file that might explain any of this.  Apparently I'm not one of the "cool kids" who can figure this out before downloading and attempting something.  So to make my life easier I've learned to avoid cine LUTs in general.

Further narrowing my search a little to camera profiles and LUTs developed for stills work I have belatedly learned that some of these files were specifically designed for use with "linear" camera profiles in RentWare.  The devil is in the details.  This is very important as some camera profiles and LUTs both add not only the color grading/film simulation, but they're also managing the initial tone curve as well.  

Once I understood that some LUTs require a "linear" camera profile starting point I was able to achieve the film simulation I was looking for.  It's correct to the point I doubt anyone would be able to tell which camera was used with the Fuji film simulation.  

When working in RawTherapee I create a "linear" camera profile by simply de-selecting "Tone Curve" in the Color Management module.  There is no need to load a specially made for RentWare "linear" camera profile into RawTherapee.

One more step is required.  To ensure the camera profiles color grading function does not influence the film simulation result I simply  de-select "Look Table" in the Color Management module as well.  

Here's a quick look at how de-selecting these two components in Color Management compare to the RawTherapee default color managed state -

 

Using Fuji film simulations in RawTherapee

 

Resources -

An excellent look at how Fuji film simulations modify colors - 

https://www.imaging-resource.com/news/2020/08/18/fujifilm-film-simulations-definitive-guide 

Individual Cluts can be downloaded off this site.  I've found that I can load a RAW image into RawTherapee, deselect "Tone Cuve" and "Look Table" in the Color Management module, and then apply these film simulations without further image manipulation (as in the above image).


Another Fuji HaldCLut package - 

https://blog.sowerby.me/fuji-film-simulation-profiles/

Note: When using these HaldCluts I've found I need to lighten the tones while keeping the Color Management "linear."  I do this by modifying "Exposure" or by sliding the top end of the tone curve to the left using "Luminosity."  Doing these things allows me to match the output of the above Clut collection.


Thursday, April 04, 2024

Summary ~ a comment I posted to pixls.us

I realize that something I posted to pixls.us works as a kind of Summary of Findings.  So I thought it might be interesting to share it here.

Retromobile ~ 2024

In addition to the many good comments, I’ll throw in my $0.02 worth. Keeping mind anything I say is worth the price you paid for it (ie: $0).

From looking at lenses for going on four decades to find a certain “magic”, here’s what I’ve learned.

    Until surprisingly recently, lens designers I’ve talked with felt that correcting for 7th order effects, while “do-able”, was a little over the top. People told me it was “unnecessary.” Modern optics can be corrected for 11th or, gasp, 13th order effects. There are a few interesting reasons to do this now.

    In general, vintage lenses typically were designed for either resolution or contrast. Modern optics can be found that strike an interesting balance between resolution and contrast (see previous paragraph). Which leads me to think the computing required to design lenses for 11th order effects was rather too great for rooms filled with human calculators (see Nikon’s 1000 and 1 Night series).

    In the vast majority of imaging systems I’ve looked at, resolution limitations are found in light sensitive materials (ie: film or digital sensor) and not in the lenses themselves when operating at their optimum aperture. OK. That’s a strong caveat, but someone sent me years ago a 75mm f/8 wide angle lens that covers at least 4x5 inches that is diffraction limited from wide open. So “softness” at wide apertures for some vintage optics is there because they’ve been designed this way.

    This is why I feel many vintage lens manufacturers designed their optics to a customer base (sort of). I’m thinking of old Nikon optics where they were designed for under-corrected spherical aberration behind the point of focus as well as providing a veiling spherical aberration wide open. This was, I’m convinced, deliberate to satisfy the Japanese market which valued a “delicacy” of rendition. Canon OTOH went the over way because of their customer base and over-corrected for spherical aberration behind the point of focus. Old Canon lenses can appear sharp wide open, but deliver nasty soap-bubble-ish background rendition as a result. Pentax, again in broad, designed their lenses to be more neutral.

    Modern Voighlander Heliar lenses bear little to zero rendition resemblance to lenses made for large format film in the early to mid 20th century. Which is to say, be careful of thinking naming conventions will render a scene similarly across the ages. Another example of what i mean is anything labeled “Sonnar.” How well a lens is corrected is more a function of careful design. Don’t believe me? Compare early Zeiss, mid-century Soviet, and the (justifiably) highly regarded 10.5cm/105mm Nikkor-P “Sonnar” designs. Out of focus rendition, chromatic aberration, flare, and astigmatism are treated widely differently depending on who designed the lens and is not something inherent in the basic optical layout. The Kingslake comments previously noted elsewhere in this thread about the Tessar formula being another excellent example. I’ve not encountered such a consistently horrid lens (and I’ve owned far too many of them) as the Zeiss 50mm f/3.5 or f/2.8 Tessar coming from the former Eastern Bloc. They blew it. It never gets “sharp”, really. f/8 seems the best it can do for an acceptable image.

    Modern optics can suffer from a surprising level of field distortion (barrel or pincushion). It appears to me that lens designers sometimes rely rather strongly on software to correct this kind of distortion since it makes it easier/cheaper to correct for chromatic aberration, astigmatism, and flare. In general, vintage lenses can be surprisingly “rectilinear” and I’ve not found it necessary to lean heavily on distortion corrections.

    Many vintage and most modern optics appear to offer pretty good field flatness. Zoom lenses can be another matter, particularly those designed for SLR and early DSLR. No, not all suffer from this, but I can pretty much find a weak spot in just about any zoom. There’s nearly always a “hole” somewhere in the zoom range, or so it seems.

    Even knowing all these things, trying to see an advantage of one thing over another can be difficult. I would enjoy buying a beer for the person who could sit down next to me and tell me which image was made with which lens. It’s impossible, of course. But because we’re on the “inside” and it matters to us, we often place a LOT of emphasis on the lenses we choose. I can’t tell the difference between images made with a new Sigma 24mm f/3.5 DG DN and an early '80’s Nikon Nikkor 24mm f/2.8 Ai. I could say similar things about just any of the lenses I own, vintage or modern.

So after all these years and all this thrashing and whinging and wrangling where did I find the “magic” I was looking for? I found it in careful image processing. This means tightly controlled color management, color grading, sharpness and local contrast controls, etc, etc, etc. This means being clear with myself on what I seek in and how to express a subject/scene in the final result.

OK. Enough of that. There’s much more I could say, but why? I’ve already said too much.