SebbyLive

Sebby's Homepage: My Life, my work and my projects.

Articles

Skip Navigation Links.

Recent posts

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright
2008 Sebastien St-Laurent

Help me jumpstart my financial recovery!
For the months of August, September and October you can win $1000
simply by joining Amazon Prime or purchasing an Amazon Kindle eBook reader.

Learn More About This Contest

Skip Navigation Links  

FSX Acceleration/SP2 - DX9 Bloom Versus DX10 HDR...

Yay! Time for another post about some of the upcoming graphical changes in FSX SP2/Acceleration. This time I take a look at the topic of Bloom (as in DX9) vs HDR (High-Dynamic Range which is DX10 only). From some of the forum posts I have read, there seems to be alot of speculation as to what the difference really is and as to whether or not there is actually any difference (you just have to love those conspiracy theories). The point of this post is to give a side-by-side comparison of the two approaches and then I will make a brief talk as to what the differences actually are from a more technical point of view...

The two videos below compare the DX9 Bloom with the DX10 HDR...


DX10 HDR (Download Here)

 


DX9 Bloom (Download Here)

If you take a close look at the videos, you can see some visible but subtle differences between the two clips... But the hot question, is what really happens behind the scenes...

Although the techniques used in DX9 and DX10 are different, they both aim to reproduce the same effect. To keep this simple, bloom or HDR is the effect that occurs when lights of various intensities affect the viewer (generally by darkening or oversaturating the image). The best way to picture the effect is to imagine that you are driving on a bright sunny day and that you approach a dark tunnel. From a distance, the inside of the tunnel appears black, which is due to the fact that the bright intensity of the sun forces our eyes to adjust themselfs to the ambient light intensity. This means that even though there is light inside the bridge, our eyes are adjusted to brighter intensities and the lesser intensities get filtered out (essentially the same thing as playing with exposure setting on a camera). The reverse is also true... If you are inside the tunnel looking towards the exit, it will generally appear quite bright, mostly white and washed out. This is due to the reverse process where the overall ambient lighting is low and the eye adjusts itself consequently meaning that any bright source of light will have a tendancy to appear saturated.

The exact detailed technical description of what is HDR and how it can be repsented can be quite long. Maybe the beat and easiest is to simply refer and quote the relevant Wikipedia article (http://en.wikipedia.org/wiki/High_dynamic_range_rendering):

Preservation of detail in large contrast differences
One of the primary features of HDRR is that both dark and bright areas of a scene can be accurately represented. Without HDR (sometimes called low dynamic range, or LDR, in comparison), areas that are too dark are clipped to black and areas that are too bright are clipped to white. These represented by the hardware as a floating point value of 0.0 and 1.0 for pure black and pure white, respectively.

Graphics processor company nVIDIA summarizes one of HDRR's features in three points[4]:

Bright things can be really bright
Dark things can be really dark
And details can be seen in both

Accurate preservation of light
Without HDRR, the sun and most lights are clipped to 100% (1.0 in the framebuffer). When this light is reflected the result must then be less than or equal to 1, since the reflected value is calculated by multiplying the original value by the surface reflectiveness, usually in the range 0 to 1. This gives the impression that the scene is dull or bland. However, using HDRR, the light produced by the sun and other lights can be represented with appropriately high values, exceeding the 1.0 clamping limit in the frame buffer, with the sun possibly being stored as high as 60000. When the light from them is reflected it will remain relatively high (even for very poor reflectors), which will be clipped to white or properly tonemapped when rendered.

Likewise when light passes through a transparent material, the light that passes through has a lower brightness than when the light entered. An example of the differences between HDR & LDR rendering can be seen in the images to the right, from Valve's Half-Life 2: Lost Coast which uses their game engine "Valve Source". In the example pictures, with low dynamic range rendering, much less light passes through the stained glass, causing the scene to be darker. The reason for this is that when light passes through a transparent material, it lowers the light’s brightness. In a simple example, say the stained glass can block 40% of the light. Since the highest value of the low dynamic range light is 1.0, this means a brightness of 0.6 is illuminating the other side. The high dynamic range light is perhaps 100, which means a brightness of 60 is illuminating the other side.

As I have mentioned, both the DX9 and the DX10 approach aim to accomplish the same goal but use different approaches.

DirectX 10 VS DirectX 9:

The easiest implementation is actually the one taken under DirectX 10. As mentioned above, true lighting intensities cannot be represented by a simple 0->1 range and DX10 guarantees floating-point texture support. The implementation takes advantage of the this feature and do all our rendering directly to a floating point texture. We then use this texture and apply standard texturing operation such as a blur filter (to create a bloom/glow) and a star filter which is used to crate the stat-like patterns that generally occur when the light traverses a imperfect medium such as glass.

Under DirectX9, the back-end (bluring and filtering) is mostly the same. However the main difference is that we do not use floating point textures. I can already hear the conspiracy theories right now that we didn't use the DX9 support for floating point textures to force users to upgrade to Vista and purchase new hardware. This is far from true....

The main problem under DX9 is that support for floating point textures was introduced late and is an optional feature (although most Shader 3.0 cards have some support for it). In addition, alpha-blending and filtering on floating point textures is not required and most cards under DX9 do not support these features which are not a requirement but can make a huge performance difference when we do the actual bluring and filtering passes (under DX9 we would have to potentially filter the texture manually wihin the shader, not the most efficient approach). Since proper floating-point texture was so sparse under DX9 and that DX10 had guaranteed support for the features we needed to implement proper HDR, we decided to keep the floating point implementation for DX10 only.

So what do we do under DX9? We seperate our Bloom rendering into two distinct passes which are only applied to blooming objects. In the first pass, we capture the color of the pixel as it would occur during regular rendering. In the second pass, instead of capturing the color of a pixel, we capture its intensity (which is in essense a multiplier to the base color). We then use these two sets of information to complete the bloom filtering in a similar way as it is done with the DX10 HDR. The main advantage of using this approach is that it can be implemented on any video cards that has support for shaders and render targets. There are a few drawbacks:

  • The intensity map is sampled at a lower resolution (1/4 resolution) in order to optimize bandwith
  • There is a small overhead due to the need of having to render two passes for any Bloom emitting object.
  • Using a 8-bit value to represent the intensity does not give us as much fine grain detail as the use of a floating point texture. Consequently, the DX9 Bloom has a tendancy to get "hot" really fast and has less of the warm glow feeling that the DX10 HDR effect gives.

Currently rated 4.0 by 5 people

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by sebby1234 on Thursday, October 25, 2007 5:30 PM
Permalink | Comments (14) | Post RSSRSS comment feed

Related posts

Comments

msdnrss.thecoderblogs.com

Thursday, October 25, 2007 8:10 PM

pingback

Pingback from msdnrss.thecoderblogs.com

MSDN Blog Postings » FSX Acceleration/SP2 - DX9 Bloom Versus DX10 HDR...

Bigean de

Thursday, November 08, 2007 4:21 PM

Bigean

Hi Sebby,

thanks a lot with that insight (also the water and VC shadow article). That's really helpful for making up our minds about DX10.

What I'm still looking for is this: What exactly is light bloom in FSX? (Copied from my post at avsim.com)

>>>
I've read Wiki to see the definition - ok
I've seen FSX screenshots showing the sun bloom in DX9 and DX10 - ok
I've seen the reflections of sun in planes (THX Sebby) - ok

So is there anything else I will notice *in FSX* when light bloom is switched on? By that I mean, *apart* from the sun bloom and plane reflections, do I see some "light bloom effects"

- parking at the gate or taxiing? (i.e. terminals, fuel truck, ...)
- flying low over country, lakes
- flying low over cities
- passing by downtown skyscrapers
- approaching a big airport

does it change the appearance of

- own plane/other planes landing lights
- rwy approach lights,
- emissive textures
- cockpit gauges, cockpit panel
- ...

Would DX10 HDR significantly make a difference there? Would DX10 HDR add bloom to more items than DX9?

I'd be happy if anybody with some knowledge could pick the right ones from above or add some effects I was missing ... please no guessing, I'd like to have facts rather.

Thanks, Bigean

<<<

Nobody knows seemingly ... Can you explain? Bigean

Bigean de

Thursday, November 08, 2007 4:35 PM

Bigean

I added a comment 10 minutes ago, where has it gone Surprised

Bigean

sebby1234 us

Friday, November 09, 2007 8:12 AM

sebby1234

Sorry. Comments are moderated so I can cut back on spam so I have to manually approve them. For HDR on DX10 being able to "bloom" more objects. You are correct. However, it does require some changes in how we use lights within the game. Quite simply, lights right now have an intensity of 0 -> 1 where as in the real world intensities can go to infinity. So, for bloom to occur properly, we need to re-author some of our content to take into account the possible varying intensities. Although we started this for SP2/Acceleration, there was no way we could do this across the board in the timeframe we had.

That being said, one of the top 5 rendering improvements we are looking at for our next product is redoing our whole lighting system. There is a lot of requests for better lighting in general. This includes supporting more lights, rendering proper landing lights (especially not having a grey ground),... This will allow us to use the new HDR to its fullest...

Bigean de

Friday, November 09, 2007 8:58 AM

Bigean

Many thanks Sebby, it puts another tile into the general DX10 mosaic.

Now back to current FSX SP2(DX10), where can I notice differences when using Bloom? From your last answer, there's no effect for Landing Lights, and so shouldn't for airport lights, right?

What about buildings, airport ground objects, lakes, flight deck, ...? Anything else?

No critizising, it's just dump questions from somebody not knowing. ;-)

THX, Bigean

sebby1234 us

Tuesday, November 13, 2007 9:58 AM

sebby1234

Actually, I didn't say landing lights would not bloom. I was just saying landing lights need to be improved in general since at the moment, when they light the terrain it shows up as gray (because the ground texture is near-black at night). Bloom/HDR in general should appear on any shiny surface (aircraft, glass windows,...). It should also appear on alot of light source such as nighttime emmisive textures, the sun, and various lights in the game.

Bigean de

Tuesday, November 13, 2007 10:23 AM

Bigean

So that's important background information. People tend to reduce bloom to sun and plane reflections. I didn't know either. So when bloom is off, we miss a lot, do we. Having DX10, we can switch bloom on at no real penalty. Go, promote DX10 a bit more ;-)

Last question: All FS versions up to FSX SP1 were heavily CPU bounded. Only High Res+AA+AF settings required a Top-Grafx-Board. (Me, I have FS2002 on a GF4 MX).

Now with DX10, what features does it need on the Graphics Board now? I mean Apart from traditional AA+AF performance, how is the new effects impact? Can NV8600's and ATI2600 compete with higher boards, or is it a drastical difference now?

THX!! Bigean

Bigean de

Tuesday, November 13, 2007 10:24 AM

Bigean

Oh, can I tell in AVSIM about your comments, or do you prefer to do it on your own? Or shall I stay vague? ;-)

Bigean

sebby1234 us

Monday, November 19, 2007 10:06 PM

sebby1234

Feel free to share the content of my blog on AvSim. I tend to stay away from posting in the forums in order avoid being pulled into conversations.

Bigean de

Tuesday, November 20, 2007 1:15 PM

Bigean

After your comments on bloom I tried to convince people to make some comparisons between bloom shots and no bloom shots. Sad :'-( nobody would do it so far (2 weeks+)

While I can roughly figure out bloom now with comparisons of with and w/o sun bloom and plane reflect bloom, I can't regarding

scenery (buildings, other reflective objects...)
and no way I can imaginge any active lights (rwy, plane lights, emissive textures)

what they look like with resp. without bloom.

Can you make some screenshots one day showing us what we get, if enabling bloom in DX10 vs. having to shut off bloom in DX9 pleeeeaaaase?

Bigean

sebby1234 us

Tuesday, November 20, 2007 2:11 PM

sebby1234

Not sure what you mean by "if enabling bloom in DX10 vs. having to shut off bloom in DX9". The two video clips above show the visual differences between the DX9 and DX10 effect. Can you be more specific as to what you are looking for?

Bigean de

Tuesday, November 20, 2007 3:14 PM

Bigean

yeah. DX10 can actually be seen as a "Bloom enabler". While significant amount of people with less than extreme CPU's had to switch off bloom in DX9 (being such a fps killer), with DX10 they can start really using it - with small fps drop only.

I wanna know what I win, when I can use bloom.

I have seen
--- screenshots looking into the sun without bloom and with bloom. Got that. It's a difference.

--- many screenshots with planes reflecting lights with bloom. See PTaylors initial DX10 shot. I just haven't really seen shots with same planes *without* bloom, or at least I couldn't compare between. I don't care too much, cause if I fly, I look out of the window. I don't look at my own plane much too often.

I HAVEN'T SEEN

- screenshots to show other objects (buildings etc.) to compare, what bloom will show me here compared to no bloom

- screenshots of landing lights, runway center lights, approach lights (PAPI/VASI/Threshold lights, taxi lights, ...) and all of them. You said bloom will change their appearance compared to non bloom. I'm courious.

These questions don't have much to do with DX10 at first glance. But they do. With DX10 we can afford bloom and spend more CPU time for other FSX jobs. If I have the right picture ;-)

Bigean

sebby1234 us

Friday, November 23, 2007 10:14 AM

sebby1234

I will try to snapshot bloom in a few of the scenarios and make a post next week. Overall, the new HDR works on the same things that are getting bloom under DX9. HDR does allow us to go much further but it does require art involvement and this will be done progressively.

The two big pluses about HDR vs DX9 Bloom is that the perf cost of HDR is almost zero (compared to bloom which is expensive). The reason is in the way bloom was engineered, requiring a second render pass on everything that was bloomed. HDR does it all in one step...

The other difference is the precision that HDR has over bloom, which allows the creation of a more realistic and sometimes more subtle effect.

Noticias externas

Saturday, December 15, 2007 3:32 AM

trackback

Trackback from Noticias externas

faster! faster!!!!!!!!! FSX SP2 brings DX10 and better performance!

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

Monday, October 13, 2008 4:06 PM