SweetFX – Levels

002SweetFX Levels sets new black and white points. This means every pixel whose value is below the black point will be converted into pure black, and every pixel whose value is above the white point will be converted into pure white.

Think of this as the equivalent of level adjustment in GIMP using the histogram. Used sparingly, Levels will trim off excess whiteness, and it will darken shadows and other dark areas that appear too “washed out” when they should be darker.

On the other hand, visual detail is lost when used excessively, and drastic scene changes can be produced. This is either good or bad depending upon the desired effect. In short, Levels is an effect best used for minor touchups to the resulting image.


Set USE_LEVELS to 1 in SweetFX_settings.txt to enable it.

#define USE_LEVELS 0
//[0 or 1] Levels : Sets a new black and white point. This increases contrast but causes clipping. Use Curves instead if you want to avoid that.

Levels Settings

Two settings in SweetFX_settings.txt adjust the black and white points: Levels_black_point and Levels_white_point. Both have a value range of 0 to 255. 0 is black, and 255 is white.

 / Levels settings /
#define Levels_black_point 16 //[0 to 255] The black point is the new black - literally. Everything darker than this will become completely black. Default is 16.0

#define Levels_white_point 235 //[0 to 255] The new white point. Everything brighter than this becomes completely white. Default is 235.0

//Colors between the two points will stretched, which increases contrast, but details above and below the points are lost (this is called clipping).

Levels_black_point sets black point. Anything below this value to 0 becomes solid black. For example, if set to 100, all values from 0 to 99 will be converted to 0, black. This results in a dark image with much missing detail. For example, dark areas containing subtle texture effects, such as leather cracks or bolts, will become solid black zones.
Levels_white_point sets white point. Anything above this value to 255 becomes solid white. This operates at the opposite end of the histogram. Anything above the set white level will be converted to 255, white. For example, grayscale gradients, as seen around clouds, will disappear into solid white zones depending upon the white point.
The key is in the stretching as described in the comment. Think of this as a readjustment of image brightness values within the unaffected range of values to prevent the final image from being completely unusable. If black is set to 64 and white is set to 128, then 64 become the new pure black value and 128 is the new pure white value. All values from 64 to 128 are readjusted, or stretched, to accommodate the new changes. Of course, all detail outside the range is lost in either black or white. Experimentation better demonstrates this effect than a text description.


Of all SweetFX effects, Levels produced the most unpredictable results during testing.

  • The tested game would always crash when both levels were set to same the value or when they overlapped. Keep the black point lower than the white point to avoid this.
  • SweetFX Curves will avoid clipping, so enable it if using Levels.

To help understand SweetFX Levels, look at GIMP for an example. GIMP provides a way to adjust the contrast and brightness of an image using levels (Color > Levels).

GIMP Levels

GIMP Levels

To better understand what SweetFX Levels is trying to accomplish, think of Levels as a very simple version of GIMP’s histogram where new black and white points are set. Adjusting an image’s level settings in GIMP will give an idea of what is happening with the SweetFX Levels effect.


Below are screenshots from the game Fallout: New Vegas to show what Levels can do.

001 Default

Levels 001

Levels 001

#define Levels_black_point 16
#define Levels_white_point 235

002 Near Point

Levels 002

Levels 002

#define Levels_black_point 63
#define Levels_white_point 64

Black is 1 less than white. The game would crash when both were set to the same value.


Levels 003

Levels 003

#define Levels_black_point 32
#define Levels_white_point 250


Levels 004

Levels 004

#define Levels_black_point 8.0
#define Levels_white_point 235.0

As the black point value lowers, more detail remains in the dark areas, but darks become less dark.


Levels 005

Levels 005

#define Levels_black_point 0
#define Levels_white_point 64

Absolutely no change to the black point, but the white point is lowered and makes the scene much whiter. Clouds are indistinguishable.


Levels 006

Levels 006

#define Levels_black_point 64
#define Levels_white_point 255

Here, we have the opposite of 005. No white adjustment is made, but the black point is set to 64. Details are gone from the heroine’s jumpsuit as well as missing detail from under the roof and on the rocks because those were dark areas to begin with.


Levels 007

Levels 007

#define Levels_black_point 64
#define Levels_white_point 128

Black point remains the same as in 006, but the white point is lowered. This brightens the image, but dark areas are the same as before. Cloud details are lost compared to 006 because the values above 128 are converted to 255, pure white.


This concludes the review of the main SweetFX effects. Aside from Advanced CRT, the few other effects not discussed seemed to offer only minor or imperceptible improvements that required special conditions, making demonstration screenshots pointless.

Overall, SweetFX is a fantastic post-processing enhancement that breathes new life into games that are compatible with it. Some games benefit from extra visual improvements. Whether those improvements might be greener grass, sharper contrast, or improved SMAA anti-aliasing without the slowdown introduced by MSAA, SweetFX is worth a try.


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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: