|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| HDR Bloom and Tone Mapping |
|
![]() CoreMeltdown Member since: 6/12/2003 From: Italy |
||||
|
|
||||
| Hi, I have some questions on HDR: 1) In the HDR pipeline, where do exactly bloom take place? Before or after tone mapping? 2) If it's before: if we use a tone map operator which uses some luminance information (average log(luminance), max luminance, ...), should this luminance parameter be calculated before or after blooming? 3) Tone Mapping Operators: which operator is currently the most used? (accuracy/speed/eye-candy tradeoff) The most common operators I have found are: Reinhard1: average_luminance = exp(1/n * sigma(log(delta + pixel_luminance))); image_key = some constant (tipically 0.18); exposure = image_key / average_luminance; (or user defined) luminance_scaled = exposure * color; tone_mapped = luminance_scaled / (1.0 + luminance_scaled); Reinhard2: same as before, except luminance_white = maximum value mapped to pure white; (should be use maximum luminance of the scene? should it be user defined?) tone_mapped = (luminance_scaled * (1.0 + luminance_scaled / (luminance_white^2))) / (1.0 + luminance_scaled); Exponential: exposure = same as in Reinhard tone_mapped = 1.0 - exp(-exposure * color); I actually found many sources which behave differently wrt question 1 and perform the tone mapping step almost always in a custom manner. As I am trying to implement a pluggable HDR pipeline (I actually have it in OpenGL, with the 3 aforementioned operators and exposure adaption), I'd like to know how a reasonable implementation should be. Thank you! |
||||
|
||||
![]() Arex Member since: 7/1/2004 From: Helsinki, Finland |
||||
|
|
||||
| 1) Before 2) Before 3) Don't know. But at least I use always the formula that works for me (looks good). :) Sincerely, Arto Ruotsalainen Dawn Bringer 3D - Tips & Tricks |
||||
|
||||
![]() stephanh Member since: 9/28/2002 |
||||
|
|
||||
| 3) Reinhard and exponential are the most common ones, because it can be copy/pasted from the directx sdk examples. Histogram based tonemappers are also feasible, (valve uses them if i remember correctly). You can implement histogramming using scatter ops on the gpu (check ATI gdc07 slides). The nvidia histogramming approach using occlusion queries is not practical imho. Then there are receptor-based mappers... There was a comparison some operators a few years ago, i think by patrick ledda. But dont have the link to the paper anymore. And not targeted at real-time graphics but CGI. |
||||
|
||||
![]() LeGreg Member since: 5/3/2005 From: Austin, TX, United States |
||||
|
|
||||
Quote: Before or after, there is no rule. Blending/filtering in float format is more expensive, and you need to keep that surface around, so some games prefer to render directly to tonemapped and apply the bloom on top of that. Most games do bloom without any form of HDR rendering per se. Note that bloom is not a totally necessary step (more of an artistic choice..). Quote: If you want to take into account the info you lose by tonemapping then you need to do it before. But there is no rule that says you cannot do after (some games do, for the same reasons given above). Quote: The one I've seen frequently used in games is color = color / global_key; There are some advantages of doing so, speed of execution, fast implementation as they were resource constrained and couldn't redo their art (they usually took their LDR renderer and converted to HDR, or needed to support both targets at the same time), distorsion introduced with texture filtering by other non linear space operations.. You should consider that hdr rendering in games is mostly tips and tricks at the moment and the most advanced papers described in academia don't usually take into account the constraints of real time. And that bloom is optional. LeGreg ray tracing | tuto voxel | tuto zbuffer | austin pictures | animation mentor |
||||
|
||||
![]() wolf XNA/DirectX MVP Member since: 1/8/2000 From: Carlsbad, CA, United States |
||||
|
|
||||
| as LeGreg says, there is not really a rule. Different games do this differently. I like the idea of having the high range of values through the whole postfx pipeline and then tone map it down at the end. - Wolfgang |
||||
|
||||
![]() Hulag Member since: 6/3/2005 From: Dallas, TX, United States |
||||
|
|
||||
Quote: Quote: |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|