HDR Clarification

Status
Not open for further replies.
A

astonish

Guest
I have seen tons of posts about HDR rendering and I think way too many people here don't understand what HDR is or what it could mean to HL2. I figured I would use my experience to clarify the issue.

Put simply HDR (High-Dynamic Range) imaging is simply a different color format than our usual 32-bit color. Currently in 32-bit color there are 4 components (Red, Green, Blue, Alpha) with 8-bits each. These 8-bits are used to store each of the four components as an unsigned integer (ranging from 0-255). In high dynamic range imaging floating point formats are used to store numbers instead of integers (search on google for how floating point numbers are stored). Currently Nvidia Cards support 16-bit per component and 32-bit IEEE format per component (effectively 64-bit and 128-bit color) and ATI's cards do 24-bit per component. As another point of reference pixar renders its movies in 64-bit (16-bit per component) color.

This doesn't mean that the end results on your screen will display more colors than are current viewable, in fact most monitors can't really display the subtle gradations in colors even in 32-bit color. What it is important for is doing the actual 3D calcuations for each pixel. Using integers for every operation can lead to errors in precision. If every operation on a color is causing you to round a number and you do many operations per pixel eventually you are loosing a lot of subtly in your final color. This doesn't happen with floating point formats. The tremendous amount of range gained using HDR allows people to do lots of good things with gamma correction, and even manipulate images in terms that are more tranditional to photography like the exposure and apature of the virtual camera.

Floating point color also solves problems like image "banding" where there is a solid shape of a particular color where there should be a smooth gradation (see fog in HALO on the Xbox for a good example).

Now, HDR is NOT any one particular effect. Things like sunrays, light halos bleeding around the edges of bright windows, specular reflections on characters (say oily skin for example) are NOT HDR. They are just more suited to HDR because without the wide range and the far lower loss of precision these effects would not display the subtle changes in color required to look realistic. This doesn't mean they can't be done without HDR. In fact all of the features in the HDR bink demo could be done in integer format and have in other games. As an example you can look at splinter cell where there are light rays and light halos around the edges of things where there is a bring light on the other side. The Xbox cannot do HDR, it only supports integer color formats but these effects can still be done in regular 32-bit format non-the-less.

So pretty much the point of this thread is to say that all the things people have been calling HDR be it light blooms, lens flare, motion blur, specular highlighting, light rays, and even ray tracing effects are not what "HDR" is, they are just effects that simply look better (in some causes a WHOLE lot better) when calculated in HDR color modes instead of integer color modes. This is why most HDR demos you see involve environment mapped reflections and light blooming effects (the spinning balls in the BINK video are remeniscent of any high-end rendering HDR texture demo you would find in movie rendering to show off the quality of HDR environment maps. Look at any advertisment for commercial HDRI environment maps to see what I mean). However any of these features could technically be done in the other modes, they just won't look as nice. Also, chances are Valve may not be implementing certain features in non-HDR modes simply because the shader involves instructions or is of a length that requires pixel shader 2.0 and ps2.0 requires that the card do 24-bit per component (96-bit) as a minimum. It is also more natural to use Float and Half (16-bit precision) variables in ps2.0 programs.

Hopefully this clears things up. If anyone wants to learn more check out the nvidia and ATI developer sites, they have lots of info on HDRI and demos for those of you with DX9 cards.
 
I think we get what HDR is by now...thanks anyway.
 
lans said:
I think we get what HDR is by now...thanks anyway.

Some people know what it is, yet some people still think that it is light reflection.
 
Nice explanation, but quite a few people have explained it before :)

You're right though, a lot of people are still getting it mixed up.
 
Status
Not open for further replies.
Back
Top