Sign in to follow this  

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this