SweetFX – Lift Gamma Gain

006Regarding video and images, gamma is an exponential relationship between pixels and luminance. (Luminance is technically not the same as brightness.) The theory and mathematical formulae behind gamma is educational, so the Gamma FAQ might provide a useful introduction for those interested in grasping the technical principles.

For an inaccurate, simplified description related to video games, we can think of gamma as brightening the bright areas and darkening the dark areas without losing too much detail. Where a simple brightness effect would brighten the entire scene uniformly, gamma handles this with more “intelligence.”

The SweetFX Lift Gamma Gain effect provides a fine amount of control over how gamma is applied to an image. While the SweetFX Tonemap effect provides a basic gamma control for basic gamma application, Lift Gamma Gain allows for more precise gamma control over the brightness of shadow areas, midrange areas, and bright areas, and it can do so at the color level with RGB values.

Enabling Lift Gamma Gain

Open SweetFX_settings.txt and set USE_LIFTGAMMAGAIN to 1.

#define USE_LIFTGAMMAGAIN 1
//[0 or 1] Lift Gamma Gain : Adjust brightness and color of shadows, midtones and highlights

Settings

Lift Gamma Gain apparently derives its name from the three settings available: RGB_Lift, RGB_Gamma, and RGB_Gain.

 /*-----------------------------------------------------------.
 / Lift Gamma Gain settings /
 '-----------------------------------------------------------*/
#define RGB_Lift float3(1.000, 1.000, 1.000)
#define RGB_Gamma float3(1.000, 1.000, 1.000)
#define RGB_Gain float3(1.000, 1.000, 1.000)

Each setting accepts RGB values in the range 0.000 to 2.000. 1.0 is neutral and does not affect a color. In the default settings shown, Lift Gamma Gain would have no effect on the image because every value is set to 1.000, which is neutral (no effect).

Shadows, midtones, and highlights can be adjusted individually.

RGB_Lift - shadows (lower darkens, higher brightens)
RGB_Gamma - midtones
RGB_Gain - highlights

RGB_Lift (Affects shadows)

Lowering RGB_Lift makes dark areas darker. Raising RGB_Lift makes dark areas lighter.

RGB_Gain (Affects highlights)

Raising RGB_Gain makes light areas lighter. Lowering RGB_Gain makes light areas darker.
Lift Gamma Gain should be adjusted in small increments to make fine adjustments. A little bit goes a long way.

Screenshots

To see the effect of Lift Gamma Gain, here are some screenshots from theory game Fallout: New Vegas.

001 Lift Gamma Gain with Other Effects

LiftGammaGain 001 + Other Effects

LiftGammaGain 001 + Other Effects

 /*-----------------------------------------------------------.
 / Tonemap settings /
 '-----------------------------------------------------------*/
#define Gamma 1.0
#define Exposure 0.15
#define Saturation -0.25
#define Bleach 0.75
#define Defog 0.5
#define FogColor float3(0.25, 0.05, 0.5)

 /*-----------------------------------------------------------.
 / Monochrome settings /
 '-----------------------------------------------------------*/
#define Monochrome_conversion_values float3(0.41,0.41,0.18)

 /*-----------------------------------------------------------.
 / Vignette settings /
 '-----------------------------------------------------------*/
#define VignetteType 1
#define VignetteRatio 1.78
#define VignetteRadius -1.25
#define VignetteAmount -1.00
#define VignetteSlope 8
#define VignetteCenter float2(0.50, 0.50)

 /*-----------------------------------------------------------.
 / Lift Gamma Gain settings /
 '-----------------------------------------------------------*/
#define RGB_Lift float3(1.200, 1.000, 1.500)
#define RGB_Gamma float3(1.000, 1.200, 1.000)
#define RGB_Gain float3(1.500, 1.000, 1.200)

Okay, let’s start off with a combination of effects. Here, Tonemap, Monochrome, Vignette, and Lift Gamma Gain are used together to produce the image shown.

The Gamma setting in Tonemap is set to 1.0, which is neutral, so it is turned off for that effect. This allows Lift Gamma Gain to control the gamma adjustment. Remember, if the goal is to use Tonemap and Lift Gamma Gain together while allowing Lift Gamma Gain to control gamma, then turn off the Tonemap Gamma setting by setting it to 1.0 (neutral, no effect).

The result of these effects together is intended to produce a somewhat old-time sepia look and feel reminiscent of old Western photographs.

002

LiftGammaGain 002

LiftGammaGain 002

#define RGB_Lift float3(1.200, 1.000, 1.500)
#define RGB_Gamma float3(1.000, 1.200, 1.000)
#define RGB_Gain float3(1.500, 1.000, 1.200)

Only Lift Gamma Gain is used. Since Lift Gamma Gain accepts RGB values, we can adjust colors at the gamma level.

003

LiftGammaGain 003

LiftGammaGain 003

#define RGB_Lift float3(0.500, 1.000, 1.000)
#define RGB_Gamma float3(1.000, 1.000, 1.000)
#define RGB_Gain float3(1.000, 1.000, 1.000)

004

LiftGammaGain 004

LiftGammaGain 004

#define RGB_Lift float3(2.000, 1.000, 1.000)
#define RGB_Gamma float3(1.000, 1.000, 1.000)
#define RGB_Gain float3(1.000, 1.000, 1.000)

005

LiftGammaGain 005

LiftGammaGain 005

#define RGB_Lift float3(0.020, 0.020, 0.020)
#define RGB_Gamma float3(1.000, 1.000, 1.000)
#define RGB_Gain float3(1.000, 1.000, 1.000)

006

LiftGammaGain 006

LiftGammaGain 006

#define RGB_Lift float3(0.500, 0.500, 0.500)
#define RGB_Gamma float3(1.000, 1.000, 1.000)
#define RGB_Gain float3(1.000, 1.000, 1.000)

007

LiftGammaGain 007

LiftGammaGain 007

#define RGB_Lift float3(0.800, 0.800, 0.800)
#define RGB_Gamma float3(1.000, 1.000, 1.000)
#define RGB_Gain float3(1.000, 1.000, 1.000)

008

LiftGammaGain 008

LiftGammaGain 008

#define RGB_Lift float3(0.800, 0.800, 0.800)
#define RGB_Gamma float3(1.000, 1.000, 1.000)
#define RGB_Gain float3(0.800, 0.800, 1.800)

009

LiftGammaGain 009

LiftGammaGain 009

#define RGB_Lift float3(0.800, 0.800, 0.800)
#define RGB_Gamma float3(1.500, 1.500, 1.500)
#define RGB_Gain float3(0.800, 0.800, 1.800)

010 Washed Out

LiftGammaGain 010

LiftGammaGain 010

#define RGB_Lift float3(1.200, 1.200, 1.200)
#define RGB_Gamma float3(1.000, 1.000, 1.000)
#define RGB_Gain float3(1.000, 1.000, 1.000)

011 Too Dark

LiftGammaGain 011

LiftGammaGain 011

#define RGB_Lift float3(1.200, 1.200, 1.200)
#define RGB_Gamma float3(1.000, 1.000, 1.000)
#define RGB_Gain float3(0.200, 0.200, 0.200)

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: