Download

How would you recreate the look of HDR photography?

I am fond of that surreal look that HDR photography can provide. Here are a few examples:

I have little idea of how it might be done. UE4’s HDR seems to do the opposite of photography HDR. Would UE4’s LDR (if that exists) produce similar effects as these photographs?

Would it have to be shader-based, material-based, postprocess, something else? If you have any hunches, tell us below!

You can make tonemaps in photoshop for your in-game cameras… That would be a start, using photoshop’s HDR filters.
The final touches could be done with postprocess shaders yep.

See LUT textures, here:

what you’re describing isn’t really HDR, though it’s often mistakenly called this, it’s just a very stylised tonemap bringing the range of a HDR image very close together, UE4 does a much more natural tonemap keeping the range consistent in the shadows and mid tones and crushing together only the highlights and overbrights

if you want to try this yourself my first thought would be a post process, either before tonemap or replacing the tonemapper, you’d mask out certain ranges of the frame (0 - 0.5, 0.5 - 1, 1 - 1.5 etc) then bring the exposure down for each one so they’re all a similar brightness, then combine

I loved the pictures. It’s a great therapy for eyes and minds.

Efects like this looks very impressive seen through a VR device.
This could be put into feature request! Could not?

-luny

Is there a difference between a tone map and a LUT? Is it that the tone map has the same effect on the whole image?

That type of photography has what I’ve heard called a surreal electric look, using tehtehteh’s advice will produce that result?

Tone mapping and LUTs are both used in UE4 to adjust the colors of the final image, but in different ways:

  • Tonemapping is the general term for mapping a high dynamic range to a lower dynamic range.
  • LUT stands for lookup table and in the case of UE4 LUTs are used to do final color correction on the tonemapped image.

For example take two highlights, one with an intensity of 1 and another with an intensity of 2. Without tonemapping both would result in a value of 1 on your screen. With tonemapping these are compressed into the available range based on the overall intensity of the whole image.

A LUT on the other hand takes those LDR values and converts them to something else. This allows you to do various image adjustments in an external image editor (for example photoshop) and bake them into a single small texture. (The look up table)

In unreal both of these work the same for the whole image. The posted images use a different tone mapper that instead looks at the surrounding pixels and only adjusts the intensity based on those, this results in the strong haloing effect visible here. The big difference is that two pixels with the same original intensity can be tonemapped to different LDR values based on their neighbours.

To properly implement this in unreal you would have to replace the tonemapper, which is probably not easy. Additionally, these types of local filters are far more expensive to render as they have to calculate a lot more per pixel. However, if you only care about the general look and not so much about being 100% accurate, a simpler approach could be to raise the saturation in the existing tonemapper and to add an unsharp mask effect via a post process material to get a similar haloing.

Tonemapping and LUTs really just affect the colours though, the other half of HDR is the low contrast enhancements (aka. clairty / details) which I would assume would need to be applied as a post-process, but I haven’t seen implemented by anyone yet.

So, for example, the first highlight with an intensity of 1 might become 0.6 and the second highlight with an intensity of 2 might become 1?

Do tonemapping and LUT have to be applied to all that is seen or can I make different objects with different tone mapping and LUTs coexist together at the same time and scene? Can you make, say, a character be low dynamic range and the gun he’s holding high dynamic range? Or at least use a technique to produce a similar effect?

Accurate as in photorealistic? No, no interest in that at all. What I like about HDR photography is the surreal look, the vividness and the details; That’s what I want to use.

I’m not sure how much I care about the haloing. Won’t an unsharp mask make the graphics smudgy?

Correct, although by default the differences will probably be a bit smaller, additionally 2 probably won’t get mapped to 1 yet, as otherwise everything above 2 would still be clamped.

The way they are implemented in unreal is applied to the full image, as this is usually what you’d want and faster. If you build you own implementation you can obviously mask stuff out any way you’d like. Your second question seems to indicate you do not fully understand what HDR is. In unreal everything is always rendered in HDR. However, the output sent to your screen is always LDR. So you will always have to do some form of tonemapping to map the HDR data to LDR, the main visual difference is the result of the method you use to do so.

I wouldn’t call this kind of extreme tonemapping photorealistic anyway, what I meant is how accurately you want to mimic the effect from a technical point of view.

Unsharp masking is a sharpening technique, here’s an extreme example of the effect from wikipedia. Notice how the bottom looks sharper but also has similar haloing as the images you posted. The local adaption of the tonemapping in the images you posted has a similar effect, which causes both the sharp look as well as the haloing.

In general I would recommend the following approach depending on your needs and skill level:

  • Adjust the existing tonemapper to raise the overall vividness of the image.
  • If that’s not enough: try using a post process material to do various effects not possible with the tonemapper. (such as unsharp masking)
  • If that’s still not enough: dive into the source code and replace the tonemapper with your own.