Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

At the moment I use an image based light in my game for environment lighting. I sample a sky cubemap to get diffuse and specular lighting. At the moment I use a HDR rendering pipeline - the skybox uses 16 bits of storage. I draw to a 16 bit rendertarget, then at the end use a tonemapping operator to scale the values into the 0.0 - 1.0 range to be drawn to the backbuffer.

Recently I noted that most of my rendering pipeline was basically made pointless when I removed the bloom postprocessor. Nothing is actually done with the higher dynamic range values - they just get processed down to lower dynamic range values at the final stage of post processing.

Would I be right in saying that I might as well just use a low dynamic range pipeline and manually tonemap my skyboxes in Photoshop? This would make the pipeline much simpler. Is there any reason other than bloom why I might want to have HDR data?

share|improve this question
    
Note that HDR pipeline does require HDR data. You can use traditional 8 bits per channel textures but still benefit from HDR pipeline. –  msell Sep 29 '13 at 14:57

1 Answer 1

up vote 24 down vote accepted

There are many places where HDR makes a difference besides providing source data to base a bloom filter on. Essentially, anyplace where lighting values are scaled or added together is going to look different, and will be more realistic / physically correct when done in HDR.

One of the most obvious places where it matters is with environment reflections. As you may know, most non-metal materials have a very low specular reflection at normal incidence - like 2% to 5%. So the reflection will only be 2% to 5% as bright as the environment it's reflecting. If you don't have an HDR environment (including sky, light sources, etc. with realistic brightness levels), this will lead to unnaturally dark, washed-out-looking reflections. With an HDR environment, the reflection looks natural and maintains contrast despite the low overall specular level.

Here's an example I rendered using a gray sphere with a 5% spec and an environment map from one of Paul Debevec's HDR light probes. There is no tone mapping or bloom in this image.

Comparison of LDR and HDR reflection

This problem shows up with any shiny surface; cars, glass windows, and water are common cases. You can hack around this a bit by scaling or otherwise altering an LDR cubemap, but the benefit of an HDR cubemap is that it "just works" regardless of material or lighting environment.


Aside from reflections, HDR is important just for light accumulation to function correctly. When you have a scene with multiple sources of light, perhaps ambient and directional, or several converging spotlights, etc., there can be places where the total amount of light goes over 1.0, even if none of the individual lights has a brightness over 1.0. It improves the visuals if you use tone mapping to reign in the excess brightness smoothly, rather than simply saturating to 1.0 and clipping anything over that.

Comparison of tonemapping or not, from Uncharted 2

Here's an example from Uncharted 2 (this image can be found on slide 126 of John Hable's GDC talk). As you can see, without tone mapping, the areas on the character's cheek and forehead where the lighting gets too bright show an unpleasant yellow tinge (due to the red and green channels saturating before the blue) as well as complete loss of detail in the saturated region.


Finally, one more place where HDR shows up is postprocessing effects like motion blur and depth of field. Although it can be expensive, doing your whole postprocess chain in HDR leads to much more realistic results. Here is an example of what happens with motion blur:

Comparison of LDR and HDR motion blur

When doing a blur, bright areas of an HDR image will remain bright and hard, while in an LDR image they will soften and dim. As shown above, the HDR postprocessing is a better simulation of what would happen in a real camera, so it looks more "filmic".

So there's much, much more to HDR lighting and rendering than just bloom.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.