Advertisement Jump to content
Sign in to follow this  

HDR, need details on all the tricks! (IMAGES)

This topic is 4986 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

HDR theory is quite simple, implementing it is harder. Two shots of what I've got so far: This is what I'm doing: 1. The scene is rendered into a HDR buffer (FLOAT16 format) that is in linear space (no gamma correction). 2. I meassure the log average luminance of the buffer using equation 1 in this paper. The previous frame's luminance is blended into this to get light adaptation over time. 3. Then I scale the HDR buffer into a smaller buffer (4x4 => 1x1 pixels), apply tonemapping according to equation 3 in the same paper. During this pass I also filter away LDR values (Lum < 0.85 at the moment). 4. Then I blur this buffer. 5. Finally I copy the HDR buffer to a LDR buffer, applying the same tonemapping and blending with the blurred HDR version. At the last step I gamma correct the RGB values. Now to the problems: In step 5, the blending between the buffers is problematic, simply adding them together produces way to bright areas. I've got something that works quite well, by scaling the blurred buffer depending on the inverse intensity of the HDR buffer. Is there a better way to blend these buffers? Due to light adaptation over time (or small movements) the average luminance changes from frame to frame. This is causing some areas to go from heavy bloomed to no bloom over some time, this doesn't look good. 3 shots showing what happens to the sky when coming from a dark area (no comments on the absence of cloud shading please :). 0s 1s 2s How do people "solve" this? Besides the fact that last image is to dark (I should set a limit on how high the average luminosity can be). It's quite hard to formulate a question here :) In essence I'm not happy with the look of my system at the moment, especially when moving around. I get spots of blooming that sort of disappears to quick or stays to long etc.. Anyone here implemented a HDR system for a "real" engine (not just a simple demo using one of the cube-maps) that might shed some light? Also I'm using a cubemap for applying sky-light, the map could be quite lowres but thanks to using FLOAT16 formats I don't get any filtering, is there a smart soution on how to filter them? Gotta go.. will probably clarify and ask more later..

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!