Sign in to follow this  
Yours3!f

question about HDR rendering

Recommended Posts

Hi,

recently I've read a pdf file about Cryengine 3's key rendering features. I read the part about the HDR too, and there it says that the whole rendering is done in high dynamic range and then they do tone mapping and do the blurring.
When I used OGL 2.1 fixed pipeline with shaders what I did was that I rendered everything in the color range 0.0 - 1.0 and the lights (if needed) above 1.0, in which case it was blurred. Now as far as I know what I did is LDR rendering and using tone mapping to select parts of the image where colors were greater than 1.0 and blur them. How do I use the whole HDR color range (from 0.0 to ~10^38), and then how do I convert it so that colors will be in the 0.0 - 1.0 range? To addition it was mentioned that all this HDR rendering is gamma correct. What do they mean by that?

Best regards,
Yours3!f

Share this post


Link to post
Share on other sites
To utilise the float buffer with full range you first need to do an exposure post process where you scale the values down then you do the split between values 0-1 and >1, blur the >1 part and blend them together. The exposure function usually takes a parameter to specify how bright you want the final scene to be (analogous to exposure length in a camera I think). In the past I have derived this parameter by doing a down scale of my full HDR colour buffer to 1 pixel and using this value to determine how bright the image is on average. There are better methods than this though. You can also limit the speed at which the parameter can change to simulate the eye adjusting to changes in scene brightness.
I don't know anything about gamma correction though.

Share this post


Link to post
Share on other sites
thank you both :)

@Pixar
I've just finished reading that topic, it is great, however I still have a question:
[quote]your geometry will be lit and shaded in various ways, which can cause pixels to have very high or very low brightness[/quote]
when I render a texture the colors will be in the range 0...1, so the scene won't contain larger values right?
I mean in LDR I have 0...1 where 0.5 is grey, and in HDR I have 0...10^38 so is 10^19 grey?

Share this post


Link to post
Share on other sites
[quote name='Yours3!f' timestamp='1306353330' post='4815748']
thank you both :)

@Pixar
I've just finished reading that topic, it is great, however I still have a question:
[quote]your geometry will be lit and shaded in various ways, which can cause pixels to have very high or very low brightness[/quote]
when I render a texture the colors will be in the range 0...1, so the scene won't contain larger values right?
I mean in LDR I have 0...1 where 0.5 is grey, and in HDR I have 0...10^38 so is 10^19 grey?
[/quote]
No, the full range of HDR is utilised when you light your scene. The textures are the albedo used, the lights provide the brightness. The exception to this is if you are using textures for environment mapping (e.g. a cube map used as a reflection).


Share this post


Link to post
Share on other sites
[quote name='Yours3!f' timestamp='1306353330' post='4815748']
I mean in LDR I have 0...1 where 0.5 is grey, and in HDR I have 0...10^38 so is 10^19 grey?
[/quote]
There is no notion of grey in linear HDR space, there is only luminance. Shades of grey are subjective terms of how you [i]see [/i]light, but they aren't an actual property of light itself. Light only becomes "grey" after the tonemapping pass. And since this final pass depends on exposure, any luminance value could essentially map to any shade of grey. So 10^19 could be black, it could be white or it could be anything inbetween - it depends on your exposure.

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