High Dynamic Range without the range....

Started by
4 comments, last by nicmenz 16 years, 8 months ago
I wasn't quite sure where to put this, so I stuck it here. I am hoping to master 2D game design before moving into 3D so that most of the abillities will transfer with me. Hence that when I get into 3d design, I will be able to produce a much higher quality product. I am working to create a very complex and powerful 2D engine right now, but one topic has me stumped. I have been building a 2D lighting system that is turning out great an I would like to add more depth to it. I have determined that HDR is the way to go. Does anyone know how to, or think think it is possible to apply High Dynamic Range to a 2D enviroment? If so, how would this be accomplished? If it's not possible, are there any other methods that could acheive the same effect or something close to it? http://en.wikipedia.org/wiki/High_dynamic_range_rendering
---------------------------------------- There's a steering wheel in my pants and it's drivin me nuts
Advertisement
It's easy to extend your dynamic range. Simply use as 16bit per channel frame buffer. Can be very useful with 2D alpha buffering, because if you overlay a dark color over a bright color which is extended past 255, it will actual work correctly because the framebuffer stores past 255.

_|imothy Farrar :: www.farrarfocus.com/atom
HDR isn’t in any way related to 3D rendering. Use floating point (or a log scale) to defines lights intensity and sprites and during calculations. You can than use a tone mapping operator to convert the HDR image to LDR image.
Thanks guys, and I did learn that HDR is more of a post processing effect than anything else.
---------------------------------------- There's a steering wheel in my pants and it's drivin me nuts
Quote:Original post by TheKrust
Thanks guys, and I did learn that HDR is more of a post processing effect than anything else.

Nope. HDR means High Dynamic Range, and has nothing to do with pre-processing or post-processing. It only tells you that instead of using a range from 0-255 to represent an image channel (be it color, brightness or anything else), you're using a larger range - for example, 0-65565 (16 bits) or 0.0-1.0 in float (giving you 24 bits of precision).

Now, most displays doesn't support HDR - mostly because the interface between the screen and the card doesn't allow it. It means that at some time, you have to revert down your HDR representation to a non-HDR one. This usually implies some post-processing techniques; some special effects (which are faking the real world effects) may also be implemented in order to improve the visual quality (for example: a bloom filter). But HDR is not the post-processing by itself, it only relates to the way the images are stored.

Here is a website that discuss HDR a lot. Paul Debevec is a pioneer in the HDR field. He is the author of High Dynamic Range Imaging - which I haven't read yet.

HTH,
in fact, what most people *mean* when they are talking about HDR, are the nice postprocessing effects ;) my antecessors are right that you have to use 16 bit values for each channel red, green and blue. Also, HDR radiance values are distributed logarithmically, which means that all "normal" intensities lie in the range [0,1] and all really "bright" intensities are higher (such as the sun).

The problem no one mentioned in this thread is that you won't be able to actually DISPLAY those radiance values on your common screen. here, postprocessing comes into play.

if you want to implement a nice BLOOM EFFECT, you first extract all pixels whose luminance is higher than 1 (white) and store them into a separate buffer. by applying a simple gaussian filter on multiple scaling levels of this buffer, you achieve the bloom effect.
(http://www.daionet.gr.jp/~masa/archives/GDC2003_DSTEAL.ppt)

you have to apply a TONE-MAPPING operator to your radiance values, too. this is done to transform the logarithmically distributed values to linear space. there are local and global tm operators, which differ in quality and speed. for real-time applications such as yours, check out this article

http://www.gamedev.net/reference/articles/article2208.asp


hope I could help you,
Nick

This topic is closed to new replies.

Advertisement