Previous generation graphics processors from NVIDIA didn’t support information output from the pixel shader to a few buffers simultaneously (Multiple Render Targets) and data rendering into a buffer in floating-point representation (FP Render Target). ATI graphics chips family supported these features from the very beginning, which made an advantageous difference from NVIDIA’s solutions.
NV40 has finally acquired full support of the Multiple Render targets and FP Render Target, which allowed the company marketing people to introduce a new term: NVIDIA HPDR. This abbreviation stands for High-Precision Dynamic-Range, i.e. the ability to build a scene with high dynamic lighting range (HDRI, High Dynamic Range Images).
The major idea of the HDRI is very simple: the lighting parameters (color and intensity) of the pixels forming the images should be described with real physical terms. To get what this actually means, you should recall the today’s approach to image description model.
RGB Model and Our Eyes
The today’s universal image description model is an additive hardware dependent RGB (Red, Green, Blue) model, which was first developed for such display devices as CRT (Cathode Ray Tube), i.e. the regular computer monitor. According to this model, any color can be represented as a sum of three basic colors: Red, Green and Blue with properly selected intensities. The intensity of each basic color is split into 256 shades (intensity gradations).
The number 256 is quite a randomly selected one and appeared as a compromise between the computer graphics subsystem performance, photorealistic image requirements and binary nature of all computer calculations. In particular, they found out that 16.7 million shades (256x256x256) are more than enough for images with photographic quality. Moreover, 256 can be easily codes in the binary system as 2^8, i.e. 1 byte.
So, according to the RGB model, black color looks like (0, 0, 0), i.e. there is no intensity at all, while white color looks like (255, 255, 255), which is the maximum intensity possible for all three basic colors.
Of course, any color in RGB model will be described with an integer triad. Note that floating point numbers (such as 1.6 or 25.4, for instance) cannot be used within this model, and the numbers used are kind of “fakeâ€, i.e. they have nothing to do with real physical lighting parameters.
One more interesting feature of the 8-bit intensity representation is its discrete character. The maximum screen brightness of contemporary monitors is known to be around 100-120cd/m^2. If we split this value into 256 shades, we will get about 0.47cd/m^2, which is the brightness interval between the two nearest shades. This way, the monitor brightness is discreet and this sampling rate (which we can also call a threshold of sensitivity to brightness gradients) equals 0.47cd/m^2 if we set the monitor brightness to the maximum, and around 0.4 cd/m^2 is the brightness is set to 70-80%.
On the other hand, the dynamic range of human eye lies between 10^6 and 10^8 cd/m^2, i.e. it makes 100,000,000,000,000:1 or 14 orders. Although human eye cannot see the light from this entire range at the same time: the maximum intensity level visible for a human eye at a time makes around 10,000:1. And since human eyesight tracks the light intensity and color separately, the entire color gamma your eye can perceive makes 10,000 brightness shades x 10,000 color shades, which equals 10^8 colors.
Another important peculiarity of human eyes is the threshold of sensitivity or the minimal change of the lighting intensity perceivable by the human eye (brightness resolution). The value of this threshold depends on the light intensity and grows up as the latter increases. From 0.01 to 100cd/m^2 the dependence of the intensity on the threshold value is constant (Weber’s law) and equals 0.02cd/m^2. In other words, the threshold of sensitivity for 1cd/m^2 light intensity makes 0.02cd/m^2, for 10 – 0.2cd/m^2, for 50 - 1cd/m^2, and for 100 - 2cd/m^2. The remaining part of the intensity range doesn’t follow this rule and the dependence in this case can be described with a more complicated rule.
Of course, the dynamic monitor range (and the RGB model description) is not enough to represent all real world images or at least that part of it, which a human eye can perceive. The typical consequence of that is the “removal†of all intensities from the upper and lower part of the range. An example here could be a room with the open window on a sunny summer day. The monitor will correctly display either the room interior or the part of the outdoor scene, which you can see through the window.
HDR Comes to Replace RGB
Where is the way out then?
As far as the computer monitor is concerned, there is hardly anything you can do about it: you cannot increase the screen brightness up to the level of Sun brightness.
But if there is nothing we could do about the monitor then why don’t we give up the RGB model, especially since it can be done absolutely painlessly. Let’s describe the images with real physical values of light intensity and color, and the let the monitor display all it can, as it will hardly be worse anyway.
This is exactly the idea behind HDRI: for pixels of the image we set the intensity and color in real physical values or values linearly proportional to them. Of course, all real (and fake) lighting parameters are now described with real numbers and not integers, so that we will not be able to cope with 8 bits per channel. This approach immediately eliminates all limitations imposed by the RGB model: the dynamic image range is not limited at all theoretically. This way the question about discreetness and the number of brightness gradations is no longer acute, and the problem of insufficient color coverage is also solved.
We could state that the introduction of HDRI for the first time allowed separating and making independent the description, as a numeric representation of the image within the HDRI model, and the presentation of this description on any technical display device, such as a PC monitor, ink-jet or photo-printer. This way, the image presentation and display turned into two independent processes, while HDRI description became hardware independent.
The display of HDR image on the monitor or its printout requires transforming the dynamic range and HDRI color range into the dynamic and color range of the output device: RGB for monitors, CMYK for printers, CIE Lab, Kodak CYY and the like. Since all these models are LDRI (Low Dynamic Range Images), this transformation cannot be performed painlessly. This process is known as tone mapping and it uses the peculiarities of the human eye to re3duce the losses during this transformation. Since there is no mathematical model describing the human eyesight and its mechanisms fully and correctly, there is no general tone mapping algorithm, which could always ensure quality outcome.
Let’s return to the numeric representation of the HDRI description. Infinite dynamic range is a good thing, but the computer cannot process the infinity. That is why in practice, the dynamic range is usually limited from the top and bottom. A good approximation of this limitation is human eye range, i.e. from 10^6 to 10^8. So, we get a dilemma here. On the one hand, the broader is the dynamic range, the better. On the other hand, we should spare some of the computer resources, because bigger range requires more data to describe this image then. In order to solve this problem, they developed a few formats of the HDR numeric image representation, which differ only by the available range and desired size.
NVIDIA NV40 Acquires HDR
NVIDIA uses a compromise variant, the 16-bit OpenEXR format developed by Industrial Light and Magic. The 16-bit OpenEXR description devotes one bit for the sign of the exponent, five bits to store the value of the exponent and ten bits to store the mantissas of the chromatic color coordinates (u, v), five bits per coordinate. The dynamic representation range thus stretches to 9 orders of magnitude: from 6.14*10-5 to 6.41*104.
The process of constructing and outputting a HDR image with the NV40 graphics processor is divided into three steps:
Light Transport: rendering a scene with a high lighting dynamic range and saving the information about the light characteristics of each pixel in a buffer that uses the OpenEXR floating-point data format. NVIDIA stresses the fact that the NV40 supports floating-point data representation on each step of creation of a HDR scene, ensuring the minimum quality loss:
floating-point calculations in shaders;
floating-point texture filtering;
operations with buffers that use a floating-point data format.
Tone Mapping – translation of the image with a high dynamic range into a LDRI format (RGBA or sRGB).
Color and Gamma Correction – translation of the image into the color space of the display device (CRT or an LCD monitor or anything else).
So, the NV40 with its HPDR technology makes high-dynamic-range images available for admirers of NVIDIA products, not only to owners îf RADEONs. This is another step to bringing photorealistic graphics into computer games.