Post Process Effects: Difference between revisions
Waffle SS. (talk | contribs) (→ChromaticAberration: fixed title to correct ppEffect name string) |
Fred Gandt (talk | contribs) m (<pre> to <code> and linking + conversion of <table>s to wiki markup) |
||
Line 3: | Line 3: | ||
Effect creation: | Effect creation: | ||
<code>hndl = [[ppEffectCreate]] ["effect_type", priority]; | |||
hndls[] = [[ppEffectCreate]] [["effect_type0", priority0], ["effect_type1", priority1], ...];</code> | |||
Effect cancellation: | Effect cancellation: | ||
<code>[[ppEffectDestroy]] hndl; | |||
[[ppEffectDestroy]] [hndl0, hndl1, ..., hndlN];</code> | |||
Parameter setup: | Parameter setup: | ||
<code>hndl [[ppEffectAdjust]] [par0, par1, .... , parN];</code> | |||
Parameter application: | Parameter application: | ||
<code>hndl [[ppEffectCommit]] [[time]]; | |||
[hndl0, ..., hndlN] [[ppEffectCommit]] [[time]];</code> | |||
Effect permission: | Effect permission: | ||
<code>hndl [[ppEffectEnable]] | |||
[hndl0, ..., hndlN] [[ppEffectEnable]] OnOf;</code> | |||
'''Priority defines sequence in which are post effects applied.''' | '''Priority defines sequence in which are post effects applied.''' | ||
Line 28: | Line 29: | ||
====Example==== | ====Example==== | ||
<code>_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;</code> | |||
====Table of priorities==== | ====Table of priorities==== | ||
{| class="bikitable" | |||
! Priority !! PostEffect !! Popis | |||
|- | |||
| 2050 || FilmGrain || CfgOpticsEffect::TankCommanderOptics1(2) | |||
|- | |||
| 1550 || ColorCorrections || CfgOpticsEffect::TankGunnerOptics1(2) | |||
|- | |||
| 450 || DynamicBlur || CfgOpticsEffect::OpticsBlur1(2,3) | |||
|- | |||
| 250 || Chromatic Aberration || CfgOpticsEffect::OpticsCHAbera1(2,3) | |||
|} | |||
===Postprocess effects=== | ===Postprocess effects=== | ||
Line 65: | Line 68: | ||
Title RadialBlur | Title RadialBlur | ||
<code>hndRadBlur [[ppEffectAdjust]] [par0, par1, par2, par3];</code> | |||
{| class="bikitable" | |||
! Parameter !! Meaning !! Typ !! Range | |||
|- | |||
| 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] | |||
|} | |||
Line 92: | Line 89: | ||
Title ChromAberration | Title ChromAberration | ||
<code>hndlChromAberr [[ppEffectAdjust]] [par0, par1, par2];</code> | |||
{| class="bikitable" | |||
! Parameter !! Meaning !! Typ !! Range | |||
|- | |||
| 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 ratio || bool || | |||
|} | |||
===='''WetDistortion'''==== | ===='''WetDistortion'''==== | ||
Line 115: | Line 107: | ||
Title WetDistortion | Title WetDistortion | ||
<code>hndlWetDist [[ppEffectAdjust]] [par0, apr1, par2, ..., par13, par14];</code> | |||
{| class="bikitable" | |||
! Parameter !! Meaning !! Typ !! Range | |||
|- | |||
| par0 || blurriness || float || [0,1] | |||
|- | |||
| par1, par2 || effect 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 || | |||
|} | |||
Line 145: | Line 130: | ||
Title ColorCorrections | Title ColorCorrections | ||
<code>hndlClrCorr [[ppEffectAdjust]] [par0, apr1, par2, ..., par13, par14];</code> | |||
{| class="bikitable" | |||
! Parameter !! Meaning !! Typ !! Range | |||
|- | |||
| par0 || brightness || float || [0,1] | |||
|- | |||
| par1 || contrast || 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'''==== | ===='''Dynamic Blur'''==== | ||
Line 177: | Line 154: | ||
Title DynamicBlur | Title DynamicBlur | ||
<code>hndlDynBlur [[ppEffectAdjust]] [par0];</code> | |||
{| class="bikitable" | |||
! Parameter !! Meaning !! Typ !! Range | |||
|- | |||
| par0 || blurriness || float || | |||
|} | |||
Line 197: | Line 171: | ||
Number of parameters is flexible ... it may be defined 1 to 6 parameters, meaning of individual parameters is following: | Number of parameters is flexible ... it may be defined 1 to 6 parameters, meaning of individual parameters is following: | ||
<code>hndlFilmGrain [[ppEffectAdjust]] [par0, par1, par2, apr3, apr4, par5];</code> | |||
{| class="bikitable" | |||
! Parameter !! Meaning !! Typ !! Range | |||
|- | |||
| 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 || | |||
|} | |||
Line 230: | Line 196: | ||
Title ColorInversion | Title ColorInversion | ||
<code>hndlClrInversion [[ppEffectAdjust]] [par0, par1, par2];</code> | |||
{| class="bikitable" | |||
! Parameter !! Meaning !! Typ !! Range | |||
|- | |||
| 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=== | ===Post process settings=== |
Revision as of 08:49, 31 May 2014
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
Priority | PostEffect | Popis |
---|---|---|
2050 | FilmGrain | CfgOpticsEffect::TankCommanderOptics1(2) |
1550 | ColorCorrections | CfgOpticsEffect::TankGunnerOptics1(2) |
450 | DynamicBlur | CfgOpticsEffect::OpticsBlur1(2,3) |
250 | Chromatic Aberration | CfgOpticsEffect::OpticsCHAbera1(2,3) |
Postprocess effects
- Radial Zoom Blur
- Chromatic Aberration
- Wet Distortion
- Color Corrections
- Dynamic Blur
- Film Grain
- Color Inversion
Parameters of individual effects
RadialBlur
Base priority 100
Title RadialBlur
hndRadBlur ppEffectAdjust [par0, par1, par2, par3];
Parameter | Meaning | Typ | Range |
---|---|---|---|
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] |
ChromAberration
Base priority 200
Title ChromAberration
hndlChromAberr ppEffectAdjust [par0, par1, par2];
Parameter | Meaning | Typ | Range |
---|---|---|---|
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 ratio | bool |
WetDistortion
Base priority 300
Title WetDistortion
hndlWetDist ppEffectAdjust [par0, apr1, par2, ..., par13, par14];
Parameter | Meaning | Typ | Range |
---|---|---|---|
par0 | blurriness | float | [0,1] |
par1, par2 | effect 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];
Parameter | Meaning | Typ | Range |
---|---|---|---|
par0 | brightness | float | [0,1] |
par1 | contrast | 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];
Parameter | Meaning | Typ | Range |
---|---|---|---|
par0 | blurriness | float |
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];
Parameter | Meaning | Typ | Range |
---|---|---|---|
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];
Parameter | Meaning | Typ | Range |
---|---|---|---|
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, ppEffectForceInNVG