SweetFX – HDR

034SweetFX HDR (High Dynamic Range) is one of the essential effects that improves the quality of the image by producing better blacks and better whites without losing detail in those areas. Colors appear richer and more full compared to the unprocessed image, so games appear more natural and less washed out with HDR enabled.


SweetFX HDR is enabled in SweetFX_settings.txt.

#define USE_HDR 1 //[0 or 1] HDR : Not actual HDR - It just tries to mimic an HDR look (relatively high performance cost)

According to the file comments, this is not a true HDR effect. However, the results are still good. After a few moments of using HDR, it soon becomes one of the must-have effects due to the noticeable improvement in image quality. Even if a game supports HDR, this post-processing effect has the potential to enhance the image even more.

HDR Settings

Two settings adjust the HDR effect: HDRPower and radius2.

/*-----------------------------------------------------------.
 / HDR settings /
 '-----------------------------------------------------------*/
#define HDRPower 1.30 //[0.00 to 8.00] Strangely lowering this makes the image brighter
#define radius2 0.87 //[0.00 to 8.00] Raising this seems to make the effect stronger and also brighter

All values range: 0.00 to 8.00

Small values have a great effect, so use sparingly by avoiding large increments.

#define HDRPower 1.20

Lower = Brighter
Higher = Darker
With these settings,

#define HDRPower 1.00
#define radius2 0.80

the processed image appears exactly the same as the original image. There is no apparent image adjustment.

It would seem that an 80% rule could be formulated, but it does not hold. Here, radius2 is 80% of HDRPower, which is 2.00.

#define HDRPower 2.00
#define radius2 1.60

However, the processed image is different from the original.

Low values produce the best results. When radius2 drops below 0.80, the edges become aliased again even if SMAA (Subpixel Morphological Anti-Aliasing) is enabled. Picture quality reduces.

radius2

Lower = darker
Higher = brighter
Keeping radius2 between 0.80 and 0.90 produced the best effect during testing. Contrast was most appealing. Anything lower resulted in aliasing, and anything higher resulted in over-brightness and made the HDR effect too strong.

SMAA was effective with 0.75 and higher, but had no effect at 0.77 and lower, such as 0.60 and 0.50. Anything too low also darkened the image to almost black, making it unviewable. Even radius2 at 0.70 showed signs of minor aliasing.

HDRPower and radius2 Together

HDRPower and radius2 work best when their values are close together by about 0.50. As radius2 is increased, the image becomes brighter, so HDRPower must be decreased to make the image darker again. The two must balance out each other. Raising radius2 brightens the image while HDRPower darkens it.

HDRP   rad2
---------------------------------------------
1.40 - 0.90 = 0.50
1.30 - 0.87 = 0.43 (SweetFX default)

Increasing HDRPower too much darkens the image and loses detail in the shadows. Keep it within 0.50 of radius2 for natural results without losing detail. If radius2 is 0.88, then HDRPower should be near 1.38.

The “sweetspot” difference is 0.43. (HDRPower – radius2 = difference) If HDRPower is greater than 0.50 difference, then the shadows will be too dark and image detail will be lost.

Rules for best picture quality

* radius2 must not drop below 0.80 or exceed 1.00. Best range is 0.80 to 0.90.

* A little bit goes a long way. Use small increments.

* Keep radius2 at 0.88, and adjust HDRPower greater within a 0.40 to 0.50 range.

Examples

rad2 HDRPower
--------------------------
0.80 1.20 to 1.30
0.85 1.25 to 1.35
0.88 1.28 to 1.38
0.90 1.30 to 1.40

All of these values produced excellent results, so this might be a useful rule to follow. The image was neither too bright nor too dark yet all detail was visible with the better contrast. Exceeding these values produced ugly results. Keep in mind that this might vary with different games, but in general, the results were good during testing.
For Fallout: New Vegas, these settings produced the best results:

#define HDRPower 1.35
#define radius2 0.85

The difference between HDRPower and radius2 is 0.50. (1.35 – 0.85 = 0.50)
Bottomline: The default HDR values are good enough.

Below are screenshots and their settings from the game Fallout: New Vegas. Some detail in the screenshots below might not be noticeable due to the image resizing and compression, but the in-game graphics show the differences clearly.

Original Image

Original Image.

Original Image. No HDR applied.

001

001

001

#define HDRPower 1.20
#define radius2 0.80

002

002

002. Photo negative effect.

#define HDRPower 0.00
#define radius2 0.00

Setting both HDRPower and radius2 to 0.00 produces a film negative effect. Darks become lights, and lights become darks with blue tinting.

004

004

004

#define HDRPower 1.30
#define radius2 0.87

005

005

005

#define HDRPower 1.50
#define radius2 0.87

006

006

006

#define HDRPower 4.00
#define radius2 0.87

007

007

007

#define HDRPower 8.00
#define radius2 0.87

008

008

008

#define HDRPower 8.00
#define radius2 8.00

Both HDRPower and radius2 are set to their maximum values of 8.00.

009

009

009

#define HDRPower 8.00
#define radius2 4.00

HDRPower set to 8.00 with radius2 set to half of that value at 4.00. Large differences cause great color jumps.

010

010

010

#define HDRPower 8.00
#define radius2 1.00

011

011

011

#define HDRPower 2.00
#define radius2 0.50

Very dark scene due to the large difference between HDRPower and radius2. In addition, the SMAA anti-aliasing effect is lost because radius2 is at 0.50. The resulting image appears degraded.

012

012

012

#define HDRPower 1.00
#define radius2 0.88

Here, radius2 is 88% of HDRPower at 1.00, so the processed image appears close to the original image.

013

013

013

#define HDRPower 1.00
#define radius2 1.00

014

014

014

#define HDRPower 1.00
#define radius2 2.00

radius2 is greater than HDRPower.

015

015

015

#define HDRPower 1.00
#define radius2 0.50

With radius2 at 0.50, SMAA anti-aliasing is lost and the jagged edges return. It might be difficult to see in the resized screenshot, but it is clearly noticeable in-game.

016

016

016

#define HDRPower 1.00
#define radius2 0.80

017

017

017

#define HDRPower 2.00
#define radius2 1.60

018

018

018

#define HDRPower 1.00
#define radius2 0.50

Though difficult to see in the screenshot due to resizing, the SMAA anti-aliasing (enabled) is destroyed because radius2 has dropped to 0.50, which is well below 0.80. This is most noticeable between light and dark edges, and the overall image quality is degraded.

019

019

019

#define HDRPower 1.30
#define radius2 1.30

020

020

020

#define HDRPower 1.30
#define radius2 0.50

Same as 018. With radius2 set to 0.50, the SMAA (enabled) anti-aliasing effect is lost and the entire image is degraded in quality. Increasing HDRPower to 1.30 did nothing to improve the image.

023

023

023

#define HDRPower 1.30
#define radius2 0.70

Increasing radius2 to 0.70 makes a difference, but the SMAA anti-aliasing still appears degraded.

024

024

024

#define HDRPower 1.30
#define radius2 0.75

radius2 at 0.75 improves even more, but still not as good as 0.80.

025

025

025

#define HDRPower 1.30
#define radius2 0.40

With radius2 at 0.40 and HDRPower at 1.30, the scene is too dark to be playable, and thelight/dark edges appear outlined. SMAA anti-aliasing is lost, and the image appears degraded.

026

026

026

#define HDRPower 1.30
#define radius2 0.88

With radius2 at 0.88, SMAA anti-aliasing is beautiful and clean. Since HDRPower is still within the 0.50 difference of radius2 (HDRPower – radius2 = 0.42), colors are improved. The scene is much better than the default in-game anti-aliasing and with slightly richer colors.

027

027

027

#define HDRPower 1.30
#define radius2 1.00

Again, HDRPower and radius2 are within a 0.50 difference, so the image quality looks good without degrading the image quality.

028

028

#define HDRPower 1.30
#define radius2 0.90

Lowering radius2 to 0.90 while keeping HDRPower the same at 1.30 as in 027 above makes the image slightly darker. This preserves more shadow detail in the clouds.

029

029

029

#define HDRPower 1.50
#define radius2 0.88

030

030

030

#define HDRPower 1.20
#define radius2 0.88

031

031

031

#define HDRPower 0.88
#define radius2 0.88

This is an experiment of setting both to 0.88 but keeping radius2 above 0.80 to avoid anti-aliasing degradation. The settings used in 026 produced better results.

032

032

032

#define HDRPower 1.40
#define radius2 0.90

Very good results. The difference is exactly 0.50. Darks are darker, and lights are lighter with good overall color richness.

033

033

033

#define HDRPower 1.60
#define radius2 0.70

Scene too dark at this point even though SMAA anti-aliasing did not appear degraded.

034

034

034

#define HDRPower 1.38
#define radius2 0.88

More good results without loss of cloud shadow detail.

035

035

035

#define HDRPower 1.20
#define radius2 0.80

Colors are slightly less rich than 034.

036

036

036

#define HDRPower 1.30
#define radius2 0.80

Very close to the default HDR settings, but radius2 is at 0.80. SMAA anti-aliasing is excellent. This is why the default HDR settings are probably the best general purpose settings.

SweetFX Effects

, ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: