Post Process Effects

From Bohemia Interactive Community
Jump to navigation Jump to search

Scripting commands

Effect creation:

hndl = ppEffectCreate ["effect_type", priority]
hndls[] = ppEffectCreate [["effect_type0", priority0], ["effect_type1", priority1], ...]

Effect cancellation:

ppEffectDestroy hndl
ppEffectDestroy [hndl0, hndl1, ..., hndlN]

Parameter setup:

hndl ppEffectAdjust [par0, par1, .... , parN]

Parameter application:

hndl ppEffectCommit time
[hndl0, ..., hndlN] ppEffectCommit time

Effect permission:

hndl ppEffectEnable
[hndl0, ..., hndlN] ppEffectEnable OnOf

Priority defines sequence in which are post effects applied.

Example

_hndl = ppEffectCreate ["colorCorrections", 1501];
_hndl ppEffectEnable true;
_hndl ppEffectAdjust [1.0, 1.0, 0.0, [1.0, 0.1, 1.0, 0.75], [0.0, 1.0, 1.0, 1.0],[0.199, 0.587, 0.114, 0.0]];
_hndl ppEffectCommit 0;
sleep 10;
ppEffectDestroy _hndl;

Table of priorities

PriorityPostEffectPopis
2050FilmGrainCfgOpticsEffect::TankCommanderOptics1(2)
1550ColorCorrectionsCfgOpticsEffect::TankGunnerOptics1(2)
450DynamicBlurCfgOpticsEffect::OpticsBlur1(2,3)
250Chromatic AberrationCfgOpticsEffect::OpticsCHAbera1(2,3)

Postprocess effects

  1. Radial Zoom Blur
  2. Chromatic Aberration
  3. Wet Distortion
  4. Color Corrections
  5. Dynamic Blur
  6. Film Grain
  7. Color Inversion

Parameters of individual effects

RadialBlur

Base priority 100

Title RadialBlur

hndRadBlur ppEffectAdjust [par0, par1, par2, par3]
ParameterMeaningTypRange
par0 relative blur degree in axis X float[0,1]
par1 relative blur degree in axis Y float[0,1]
par2 relative size of un-blurred centre float[0,0.5]
par3 relative size of un-blurred centre float[0,0.5]


ChromaticAberration

Base priority 200

Title ChromAberration

hndlChromAberr ppEffectAdjust [par0, par1, par2]
ParameterMeaningTypRange
par0 relative effect strength (sample spacing from each other) in axis X float
par1 relative effect strength (sample spacing from each other) in axis Y float
par2 correction according to screen aspect ratiobool

WetDistortion

Base priority 300

Title WetDistortion

hndlWetDist ppEffectAdjust [par0, apr1, par2, ..., par13, par14]
ParameterMeaningTypRange
par0 blurriness float[0,1]
par1, par2effect strength(top and bottom part) float
par3 - par6 wave speed: (frequency/PI) float
par7 - par10 wave amplitudes float
par11 - par14 phase coefficients: random value influence coefficient inside vertex float


ColorCorrections

Base priority 1500

Title ColorCorrections

hndlClrCorr ppEffectAdjust [par0, apr1, par2, ..., par13, par14]		
ParameterMeaningTypRange
par0 brightness float[0,1]
par1contrast float
par2 offset float
par3 - par6 blend color (R,G,B,A) float
par7 - par10 colorize color (R,G,B,A) float
par11 - par14 colorize color (R,G,B,A) float

Dynamic Blur

Base priority 400

Title DynamicBlur

hndlDynBlur ppEffectAdjust [par0]
ParameterMeaningTypRange
par0blurrinessfloat


FilmGrain

Base priority 2000

Title FilmGrain

Number of parameters is flexible ... it may be defined 1 to 6 parameters, meaning of individual parameters is following:

hndlFilmGrain ppEffectAdjust [par0, par1, par2, apr3, apr4, par5]
ParameterMeaningTypRange
par0 intensity float[0,1]
par1 sharpness float[0,20]
par2 grain size float[1,8]
par3 intensityX0 float
par4 intensityX1 float
par5 monochromatic bool


ColorInversion

Base priority 2500

Title ColorInversion

hndlClrInversion ppEffectAdjust [par0, par1, par2]
ParameterMeaningTypRange
par0 Inversion of R channel float[0,1]
par1 Inversion of G channel float[0,1]
par2 Inversion of B channel float[0,1]

Post process settings

Some of the post processing effects are affected by whether the client has post processing disabled or enabled (any other detail than off) in his graphic settings.
The following effects will not have any effect with PP set to disabled:

  • radialBlur
  • chromAberration
  • wetDistortion
  • filmGrain
  • DynamicBlur



See also: ppEffectAdjust, ppEffectCommit, ppEffectCommitted, ppEffectCreate, ppEffectDestroy, ppEffectEnable