Luminance HDR - how to prevent highlights from blowing

I was going to write this as a bug over at LHDR’s SourceForge (eek) site, but SourceForge is down (yay) so I’ll post this here in hope that someone knows of a solution.

My biggest issue with Luminance HDR is its lack of support for controlling highlights. That’s one of the core reasons you’d go the HDR route, and yet I know of no solution to recover highlights if a tone-mapping operator blows them. The TMOs work fairly decently on medium dynamic range scenes, but try to process a high dynamic range scene and you have to resort to tricks in other programs to avoid clipping highlights. Let me explain.

Let’s use this HDR as an example, for no reason other than that I just had it open in the browser and it shows the problem ferpectly.
Direct link: http://bit.ly/as-hdr-mpumalanga_veld
From: http://adaptivesamples.com/2015/11/09/hdri-mpumalanga-veld/

Open it in Luminance HDR:


Other than the thermonuclear fusion in the heart of the sun, nothing is clipped.

Try the tone-mapping operators. Let’s use Mantiuk '06 as an example, default settings. Update preview:


The sun and surrounding is completely clipped. Try changing the Mantiuk '06 settings or the pre-gamma, nothing will bring that sky back.

No matter what settings I try for Mantiuk '06, the sun and surrounding sky are always clipped. Looking at the Levels histogram confirms this, see the spike at the right end:

LHDR lacks something as basic as a tone curve (I opened an issue for this ages ago), and using levels is a sure way of clipping things. Click the “Fix color cast” droplet icon - it makes the grass look lovely, but worsens the sky:

Mr Durand does somewhat well:


But you can’t get it from looking like that to looking well in LHDR. Your only option is to save it as a 16-bit TIFF and hope that using curves or other tools in other software can produce a good result:

Mr Reinhard can be used too, if you go the workaround way of using other software:

So the question is: does anyone know of a way to prevent clipping of the brightest areas in a HDR scene in LHDR when using Mantiuk, Fattal, etc?

1 Like

I’m not sure you’re going to have much luck with this in LuminanceHDR (I’ll play with your sample in a bit).

Is it that the application of the TMO precludes doing any further modifications to the tone curve during the mapping phase? Just thinking out loud here.

There was also a recent post pointing to work that adaptivesamples had done in creating HDRi entirely within Blender (which I can’t find at the moment).

(edit: ty @Tobias for the link):

On a funny side note, I was actually just reading about Pixar doing tonemapping and using wavelets for edge control:

I’m not familiar with the nitty-gritty of other tone mapping algorithms, but if you feed it the underexposed image where the sun is clearly different from the surrounding bright sky, and let tone mapping bring up the shadows, won’t the local contrast keep the sun separated from the sky?

Filmulator might be able to do it if you can get the program to read in the file. If you go into the database and tweak other parameters not accessible from the sliders, you may even be able to get it to look good. In addition to max drama (minimum layer mix constant) and overdrive (agitate count of zero), raise the development time (strengthens the effects) and development steps (keeps the simulation stable to prevent negative numbers), and reduce the exposure compensation so that the sun is clearly separated from the surroundings.

There was also a recent post pointing to work that adaptivesamples had done in creating HDRi entirely within Blender (which I can’t find at the moment).

Here:

1 Like

Filmulator might be able to do it if you can get the program to read in the file.

ImageMagick should be able to convert it to something more conmen:

I was going to write this as a bug over at LHDR’s SourceForge (eek)
site, but SourceForge is down (yay) so I’ll post this here in hope that
someone knows of a solution.

Shouldn’t you better report this bug at GitHub?

Unfortunately, right now Filmulator only supports raw files that LibRaw can handle.

I read that article, that’s where this HDR example image comes from. The article is nonsense though, it makes unsupported claims, and its about lightmaps not about tone mapping.

[quote=“patdavid, post:2, topic:724”]
Is it that the application of the TMO precludes doing any further modifications to the tone curve during the mapping phase?
[/quote]I don’t think the TMOs themselves are to blame, they are probably implemented in some way which for some of them chops the extremes off. There is also the complete lack of tone curve or highlight control in LHDR which adds to the problem. Then again, all of those TMOs are old while progress has been made in the HDR tone mapping field in the last 10 years.

@jdc is working on multiple image fusion support in rawtherapee also using wavelets.

@Tobias yes I forgot that it also has a GitHub page, but it’s a dead project so what’s the point.

Ideally I would like to see (some of) those TMOs implemented in RawTherapee. Tone mapping operators · Issue #2476 · Beep6581/RawTherapee · GitHub

1 Like

@Tobias yes I forgot that it also has a GitHub page, but it’s a dead project so what’s the point.

The last commit is form 24 Aug 2015. But you are right, it’s not very active.