SweetFX – Vibrance

006SweetFX Vibrance saturates or desaturates the image by a specified color. Vibrance offers more flexibility over which color influences the image.

Vibrance does not remove all colors the way the monochrome effect produces a black and white image, but vibrance will make colors more colorful or less colorful depending upon the values used to adjust the effect. Faded colors can give the image a washed out film effect that other effects can refine.

Enable vibrance in SweetFX_settings.txt.

#define USE_VIBRANCE 1 //[0 or 1] Vibrance : Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation.

Vibrance Settings

Two settings located in the Vibrance settings of SweetFX_settings.txt specify how vibrance is applied to the image. They are Vibrance and Vibrance_RGB_balance.

/*-----------------------------------------------------------.
 / Vibrance settings /
 '-----------------------------------------------------------*/
#define Vibrance 0.15 //[-1.00 to 1.00] Intelligently saturates (or desaturates if you use negative values) the pixels depending on their original saturation.
#define Vibrance_RGB_balance float3(1.00, 1.00, 1.00) //[-10.00 to 10.00,-10.00 to 10.00,-10.00 to 10.00] A per channel multiplier to the Vibrance strength so you can give more boost to certain colors over others

Vibrance

Specifies how much to saturate (+) or desturate (-) the image.
Range: -1.00 to 1.00, but can be increased beyond 1.00 for even more saturation.

 Positive = Saturates
        0 = No change
 Negative = Desaturates

Vibrance_RGB_balance (Red, Green, Blue)

Gives priority to a given RGB color. The range for each color channel is -10.00 to 10.00. Each RGB channel value is multiplied by the value of Vibrance to produce the final adjustment that specifies how much to saturate or desaturate that color.

       Red             Green            Blue
        |                |                |
---------------  ---------------  ---------------
-10.00 to 10.00, -10.00 to 10.00, -10.00 to 10.00

The Math

Vibrance * Vibrance_RGB_balance = Result

  1.00 * 0.25 = 0.25  // Saturate or enhance the color when positive
-10.00 * 0.25 = -2.50 // Desaturate or fade the color when negative
 10.00 * 0.00 = 0     // No change.

If the product is 0, then no change is made to the color channel. Other channels may still be affected if their products are not 0.

If Vibrance_RGB_balance is set to the same value for all RGB channels, then Vibrance increases or decreases all colors uniformly.

Neutral 1.00

As a shorthand for quick settings, think of 1.00 as “neutral” for an RGB channel. When set to 1.00, the Vibrance value becomes the RGB value in the product because it is a multiplication by 1. The color will be adjusted by the value of Vibrance.

#define Vibrance 0.25
#define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

0.25 * 1.00 = 0.25 (red)
0.25 * 1.00 = 0.25 (green)
0.25 * 1.00 = 0.25 (blue)

Red, green, and blue channels are adjusted by the same amount specified by Vibrance.

This has no effect from the original image:

#define Vibrance 0.00
#define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

Vibrance at 0.00 means no change no matter what values are used for Vibrance_RGB_balance.

The same “no change” effect can also be produced this way:

#define Vibrance 0.25
#define Vibrance_RGB_balance float3(0.00, 0.00, 0.00)

If Vibrance_RGB_balance values are all 0.00, then there is no difference from the original image because the product is still 0.

0.25 * 0.00 = 0 // No change. Same as original image for that given color

It is possible to set Vibrance and Vibrance_RGB_balance to different values yet produce the same effect.

These have the same effect:

#define Vibrance -0.50
#define Vibrance_RGB_balance float3(-10.00, 0.00, 0.00)

#define Vibrance 0.50
#define Vibrance_RGB_balance float3(10.00, 0.00, 0.00)

Both of these will process the image in the same way because the product for all values is 5. Examine the multiplication.

-0.50 * -10.00 = 5 (red, blue and green unaltered)
 0.50 * 10.00 = 5 (red, blue and green unaltered)

To calculate the final output:

Vibrance(0.50) * (10.00, 0.00, 0.00)

0.50 * 10.00 = 5.00 Red
 0.50 * 0.00 = 0.00 Green
 0.50 * 0.00 = 0.00 Blue

Results of Signed Multiplication

In Vibrance_RGB_balance, a negative value will remove that color by the amount specified by Vibrance. Vibrance and Vibrance_RGB_balance are multiplied together to find out how much color to remove. However, if the product is positive, then the color will be increased, not decreased.

-0.25 * -4.25 (red) = 1.0625 (red)

1.0625 is positive, so slightly more red will be added to the image, not removed from it due to signed multiplication resulting in a positive product. Changing either -0.25 to 0.25 or -4.25 to 4.25 to make one of them negative, but not both, will result in red be removed from the image.

-0.25 * 4.25 (red) = -1.0625 (red desaturated)
0.25 * -4.25 (red) = 1.0625 (red saturated)

To exclude a color from being affected, use 0.00 for its Vibrance_RGB_balance value. For example, 0.00 for red will have no effect on the red color adjustment.

-0.25 * 0 (red) = 0 (red unaltered)

In the settings example below, red is desaturated while blue is saturated even though red is positive (1.00) and blue is negative (-4.00).

#define Vibrance -0.50
#define Vibrance_RGB_balance float3(1.00, 0.00, -4.00)

-0.50 * 1.00 = -0.50 for red, so red is desaturated. -0.50 * -4.00 = 2.00, a positive number, so blue is saturated. Reducing red makes green more prominent, so the result produces a more yellowed image.

Vibrance Order

The order or appearance of #define USE_VIBRANCE in SweetFX_settings.txt has no effect upon the order in which its effect is applied during post-processing. Below is an example using the vibrance and monochrome effects together.

#define USE_MONOCHROME 1 //[0 or 1] Monochrome : Monochrome makes the colors disappear.
#define USE_VIBRANCE 1 //Intelligently saturates (or desaturates if you use negative values) the pixels

The above has the same effect as this:

#define USE_VIBRANCE 1 //Intelligently saturates (or desaturates if you use negative values) the pixels
#define USE_MONOCHROME 1 //[0 or 1] Monochrome : Monochrome makes the colors disappear.

Placing USE_VIBRANCE after USE_MONOCHROME will not colorize a monochrome image. There is little point in using monochrome and vibrance together since the result will be black and white. To conserve processing, disable vibrance if monochrome is used or disable monochrome if vibrance is used.

Vibrance and HDR

Vibrance looks best when combined with the SweetFX HDR (High Dynamic Range) effect. Colors appear richer and with better contrast.

Screenshots

Here are some screenshots from the game Fallout: New Vegas that demonstrate the vibrance effect. Only the last image has HDR applied.

001 Default Vibrance Settings

Vibrance 001

Vibrance 001

 #define Vibrance 0.25
 #define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

002 No Change

Vibrance 002

Vibrance 002. Appears the same as the original image.

 #define Vibrance 0.00
 #define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

The resulting image is the same as the original because Vibrance is set to 0.00.

0.00 * 1.00 = 0 (red)
0.00 * 1.00 = 0 (green)
0.00 * 1.00 = 0 (blue)

003 Ghost World

Vibrance 003

Vibrance 003

 #define Vibrance -1.00
 #define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

004

Vibrance 004

Vibrance 004

 #define Vibrance 1.00
 #define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

005

Vibrance 005

Vibrance 005

 #define Vibrance 2.00
 #define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

006

Vibrance 006

Vibrance 006

 #define Vibrance 0.50
 #define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

The difference between 006 and 005 is subtle, but 006 is slightly more vibrant then 005 even though 006’s Vibrance value is 0.50 and 005’s Vibrance value is 2.00.

007

Vibrance 007

Vibrance 007

 #define Vibrance -0.33
 #define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

008

Vibrance 008

Vibrance 008

 #define Vibrance 0.25
 #define Vibrance_RGB_balance float3(0.00, 0.00, 0.00)

009

Vibrance 009

Vibrance 009

 #define Vibrance 2.00
 #define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

010

Vibrance 010

Vibrance 010

 #define Vibrance -0.50
 #define Vibrance_RGB_balance float3(-10.00, 0.00, 0.00)

011

Vibrance 011

Vibrance 011

 #define Vibrance 0.50
 #define Vibrance_RGB_balance float3(10.00, 0.00, 0.00)

012 Another World

Vibrance 012

Vibrance 012

 #define Vibrance -0.50
 #define Vibrance_RGB_balance float3(10.00, 0.00, 0.00)

013

Vibrance 013

Vibrance 013

 #define Vibrance -0.50
 #define Vibrance_RGB_balance float3(-5.00, 1.00, 1.00)

014

Vibrance 014

Vibrance 014

#define Vibrance -0.50
#define Vibrance_RGB_balance float3(-5.00, 1.20, 2.00)

015

Vibrance 015

Vibrance 015

#define Vibrance 0.25
#define Vibrance_RGB_balance float3(-5.00, 1.20, 2.00)

016

Vibrance 016

Vibrance 016

#define Vibrance -0.25
#define Vibrance_RGB_balance float3(-4.25, 1.00, 1.00)

017

Vibrance 017

Vibrance 017

#define Vibrance -0.25
#define Vibrance_RGB_balance float3(-4.25, 0.00, 0.00)

018

Vibrance 018

Vibrance 018

#define Vibrance 0.25
#define Vibrance_RGB_balance float3(-4.25, 0.00, 0.00)

019

Vibrance 019

Vibrance 019

#define Vibrance 0.20
#define Vibrance_RGB_balance float3(2.00, 0.00, 0.00)

020

Vibrance 020

Vibrance 020

#define Vibrance 0.50
#define Vibrance_RGB_balance float3(0.00, 2.50, 4.00)

021

Vibrance 021

Vibrance 021

#define Vibrance -0.50
#define Vibrance_RGB_balance float3(1.00, 0.00, -4.00)

022

Vibrance  022

Vibrance 022

#define Vibrance -0.50
#define Vibrance_RGB_balance float3(1.00, 0.00, 1.00)

023 Faded Colors

Vibrance 023

Vibrance 023

#define Vibrance -0.50
#define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

024

Vibrance 024

Vibrance 024

#define Vibrance -0.50
#define Vibrance_RGB_balance float3(-2.00, 1.00, 1.00)

025 Vibrance + HDR

Vibrance 025

Vibrance 025

 /*-----------------------------------------------------------.
 / Vibrance settings /
 '-----------------------------------------------------------*/
#define Vibrance 0.25
#define Vibrance_RGB_balance float3(1.00, 1.00, 1.00)

 /*-----------------------------------------------------------.
 / HDR settings /
 '-----------------------------------------------------------*/
#define HDRPower 1.35
#define radius2 0.85

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: