question about HDR rendering

Started by
5 comments, last by Yours3!f 12 years, 10 months ago
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
Advertisement
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.
http://www.gamedev.net/topic/532960-hdr-lighting--bloom-effect/
thank you both :)

@Pixar
I've just finished reading that topic, it is great, however I still have a question:
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?

thank you both :)

@Pixar
I've just finished reading that topic, it is great, however I still have a question:
your geometry will be lit and shaded in various ways, which can cause pixels to have very high or very low brightness

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).



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?

There is no notion of grey in linear HDR space, there is only luminance. Shades of grey are subjective terms of how you see 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.
thank you now I got it :)

This topic is closed to new replies.

Advertisement