Post Process Effects: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(→‎RadialBlur: updated)
m (Text replacement - "{{Feature | Informative | " to "{{Feature|informative|")
 
(62 intermediate revisions by 7 users not shown)
Line 1: Line 1:
===Scripting commands===
{{TOC|side}}
== Scripting Commands ==


Effect creation:
{{Columns|4|
* [[ppEffectCreate]]
* [[ppEffectAdjust]]
* [[ppEffectEnable]]
* [[ppEffectEnabled]]
* [[ppEffectForceInNVG]]
* [[ppEffectCommit]]
* [[ppEffectCommitted]]
* [[ppEffectDestroy]]
}}


<code>hndl = [[ppEffectCreate]] ["effect_type", priority];
hndls[] = [[ppEffectCreate]] [["effect_type0", priority0], ["effect_type1", priority1], ...];</code>


Effect cancellation:
== Usage ==


<code>[[ppEffectDestroy]] hndl;
=== Effect Creation ===
[[ppEffectDestroy]] [hndl0, hndl1, ..., hndlN];</code>


Parameter setup:
<sqf>
_handle = ppEffectCreate ["effect_type", priority];
_handlesArray = ppEffectCreate [["effect_type0", priority0], ["effect_type1", priority1], /* ... */];
</sqf>


<code>hndl [[ppEffectAdjust]] [par0, par1, .... , parN];</code>
=== Effect Cancellation ===
Parameter application:


<code>hndl [[ppEffectCommit]] [[time]];
<sqf>
[hndl0, ..., hndlN] [[ppEffectCommit]] [[time]];</code>
ppEffectDestroy handle;
ppEffectDestroy handlesArray;
</sqf>


Effect permission:
=== Effect Disabling ===
Compared to the effect cancellation, in this case the effect is just disabled but still exists
<sqf>
_handle ppEffectEnable false;
</sqf>


<code>hndl [[ppEffectEnable]]
=== Effect Fade out ===
[hndl0, ..., hndlN] [[ppEffectEnable]] OnOf;</code>
Rather than disabling the effect completely at once, it is possible to use ppEffectAdjust to fade it out over time
<sqf>
//after having created and used effect:
//set the parameters for the effect back to the default values
"colorCorrections" ppEffectAdjust [1,1,0,[0,0,0,0],[1,1,1,1],[0.299, 0.587, 0.114, 0],[-1,-1,0,0,0,0,0]];
//then commit and fade out over given time (10 seconds)
"colorCorrections" ppEffectCommit 10;
//Disable completely after fadeout
"colorCorrections" ppEffectEnable false;
</sqf>


'''Priority defines sequence in which are post effects applied.'''
=== Parameter Setup ===


====Example====
<sqf>handle ppEffectAdjust [par0, par1, /* ... */, parN];</sqf>


<code>_hndl = [[ppEffectCreate]] ["colorCorrections", 1501];
=== Parameter application ===
_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====
<sqf>
handle ppEffectCommit _duration;
handlesArray ppEffectCommit _duration;
</sqf>


{| class="bikitable"
=== Effect Permission ===
! Priority !! PostEffect !! Popis
 
<sqf>
handle ppEffectEnable _OnOrOff;
handlesArray ppEffectEnable _OnOrOff;
</sqf>
 
{{ArgTitle|3|Check if Enabled|{{GVI|arma3|1.56}}}}
 
<sqf>ppEffectEnabled handle;</sqf>
 
=== Example ===
 
<sqf>
_handle = ppEffectCreate ["colorCorrections", 1501];
_handle ppEffectEnable true;
_handle 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]];
_handle ppEffectCommit 0;
sleep 10;
ppEffectDestroy _handle;
</sqf>
 
== Table of Priorities ==
 
Priority defines sequence in which post effects are applied. The higher priority, the later the effect will be applied, on top of the others.
 
{| class="wikitable sortable"
! Base Priority !! Effect
|-
| 2500 || [[#ColorInversion|ColorInversion]]
|-
| 2000 || [[#FilmGrain|FilmGrain]]
|-
| 1500 || [[#ColorCorrections|ColorCorrections]]
|-
| 400 || [[#DynamicBlur|DynamicBlur]]
|-
| 300 || [[#WetDistortion|WetDistortion]]
|-
|-
| 2050 || FilmGrain || CfgOpticsEffect::TankCommanderOptics1(2)
| 200 || [[#ChromaticAberration|ChromaticAberration]]
|-
|-
| 1550 || ColorCorrections || CfgOpticsEffect::TankGunnerOptics1(2)
| 100 || [[#RadialBlur|RadialBlur]]
|-
|-
| 450 || DynamicBlur || CfgOpticsEffect::OpticsBlur1(2,3)
| 0 || [[#SSAO|SSAO]]
|-
|-
| 250 || Chromatic Aberration || CfgOpticsEffect::OpticsCHAbera1(2,3)
| 0 || [[#Resolution|Resolution]]
|}
|}


===Postprocess effects===
#Radial Zoom Blur
#Chromatic Aberration
#Wet Distortion
#Color Corrections
#Dynamic Blur
#Film Grain
#Color Inversion


===Parameters of individual effects===
== Parameters of Individual Effects ==


===='''RadialBlur'''====
=== RadialBlur ===


Title: "RadialBlur"; Base Priority: 100
Title: "RadialBlur"; Base Priority: 100


Will not do anything if RADIAL BLUR is disabled in Video Options.
{{Feature|informative|RadialBlur will not do anything if RADIAL BLUR is disabled in Video Options}}


{| class="bikitable"
{| class="wikitable"
! Parameter !! Meaning !! Type !! Range
! Parameter !! Meaning !! Type !! Range !! Defaults
|-
| powerX || relative blur degree on axis X || float || 0... || 0.01
|-
| powerY || relative blur degree on axis Y || float || 0... || 0.01
|-
|-
| powerX, powerY || relative blur degree on axes X,Y || float || 0...
| offsetX || relative size X of un-blurred centre || float || 0... || 0.06
|-
|-
| offsetX, offsetY || relative size (X,Y) of un-blurred centre || float || 0...
| offsetY || relative size Y of un-blurred centre || float || 0... || 0.06
|}
|}


Syntax:
Syntax:
<code>hndRadBlur [[ppEffectAdjust]] [powerX, powerY, offsetX, offsetY];</code>
<sqf>_radialBlurHandle ppEffectAdjust [powerX, powerY, offsetX, offsetY];</sqf>


Defaults:
Defaults:
<code>hndRadBlur [[ppEffectAdjust]] [0.01, 0.01, 0.06, 0.06];</code>
<sqf>_radialBlurHandle ppEffectAdjust [0.01, 0.01, 0.06, 0.06];</sqf>


Copypaste example:
Example:
<code>0 = ["RadialBlur", 100, [100, 0.5, 0.1, 0.5]] [[spawn]] {
<sqf>
[[params]] ["_name", "_priority", "_effect", "_handle"];
["RadialBlur", 100, [100, 0.5, 0.1, 0.5]] spawn
[[while]] {
{
_handle = [[ppEffectCreate]] [_name, _priority];
params ["_name", "_priority", "_effect", "_handle"];
while {
_handle = ppEffectCreate [_name, _priority];
_handle < 0
_handle < 0
} [[do]] {
} do {
_priority = _priority + 1;
_priority = _priority + 1;
};
};
_handle [[ppEffectEnable]] [[true]];
_handle ppEffectEnable true;
_handle [[ppEffectAdjust]] _effect;
_handle ppEffectAdjust _effect;
_handle [[ppEffectCommit]] 5;
_handle ppEffectCommit 5;
[[waitUntil]] {[[ppEffectCommitted]] _handle};
waitUntil { ppEffectCommitted _handle };
[[uiSleep]] 3;
systemChat "admire effect for a sec";
[[comment]] "admire effect for a sec";
uiSleep 3;
_handle [[ppEffectEnable]] [[false]];
_handle ppEffectEnable false;
[[ppEffectDestroy]] _handle;
ppEffectDestroy _handle;
};</code>
};
 
</sqf>
===='''ChromAberration'''====
 
Base priority 200


Title ChromAberration
=== ChromAberration ===


<code>hndlChromAberr [[ppEffectAdjust]] [par0, par1, par2];</code>
Title "ChromAberration"; Base Priority: 200


{| class="bikitable"
{| class="wikitable"
! Parameter !! Meaning !! Typ !! Range
! Parameter !! Meaning !! Type !! Range !! Defaults
|-
|-
| par0 || relative effect strength (sample spacing from each other) in axis X || float ||
| aberrationPowerX || relative effect strength (sample spacing from each other) axis X || float || 0... || 0.005
|-
|-
| par1 || relative effect strength (sample spacing from each other) in axis Y || float ||
| aberrationPowerY || relative effect strength (sample spacing from each other) axis Y || float || 0... || 0.005
|-
|-
| par2 || correction according to screen aspect ratio || bool ||
| aspectCorrection || enable/disable correction according to screen aspect ratio || bool || true, false || false
|}
|}


===='''WetDistortion'''====
Syntax:
<sqf>_chromaticAberrationHandle ppEffectAdjust [aberrationPowerX, aberrationPowerY, aspectCorrection];</sqf>
 
Defaults:
<sqf>_chromaticAberrationHandle ppEffectAdjust [0.005, 0.005, false];</sqf>
 
Example:
<sqf>
["ChromAberration", 200, [0.05, 0.05, true]] spawn {
params ["_name", "_priority", "_effect", "_handle"];
while {
_handle = ppEffectCreate [_name, _priority];
_handle < 0
} do {
_priority = _priority + 1;
};
_handle ppEffectEnable true;
_handle ppEffectAdjust _effect;
_handle ppEffectCommit 5;
waitUntil { ppEffectCommitted _handle };
systemChat "admire effect for a sec";
uiSleep 3;
_handle ppEffectEnable false;
ppEffectDestroy _handle;
};
</sqf>
 
=== WetDistortion ===


Title: "WetDistortion"; Base Priority: 300
Title: "WetDistortion"; Base Priority: 300


Effect cancels automatically under water.
{{Feature|informative|Effect cancels automatically under water.}}


{| class="bikitable"
{| class="wikitable"
! Parameter !! Meaning !! Type !! Range
! Parameter !! Meaning !! Type !! Range !! Defaults
|-
| value || blurriness of distorted image (0 to 1, values above 1 cause unusual) || float || 0..1 || 1
|-
|-
| value || effect blurriness (0 to 1, values above 1 cause unusual) || float || 0...1
| top, bottom || effect power (top/bottom of screen separately) || float || 0..1 || 1, 1
|-
|-
| top, bottom || effect power (top/bottom of screen separately) || float || 0...1
| horizontal1, horizontal2, vertical1, vertical2 || waves speeds (frequency/PI) || float || 0... || 4.10, 3.70, 2.50, 1.85
|-
|-
| horizontal1, horizontal2, vertical1, vertical2 || waves speeds (frequency/PI) || float ||
| horizontal1, horizontal2, vertical1, vertical2 || waves amplitudes (delta texture coordinates)|| float || 0... || 0.0054, 0.0041, 0.0090, 0.0070
|-
|-
| horizontal1, horizontal2, vertical1, vertical2 || waves amplitudes || float ||
| randX, randY || coefficients for phase computing; weight of random vertex data on horizontal/vertical wave phases || float || 0... || 0.5, 0.3
|-
|-
| randX, randY, posX, posY || phase coefficients: random value influence coefficient inside vertex || float ||
| posX, posY || coefficients for phase computing; weight of vertex X/Y-position on horizontal/vertical wave phases || float || 0... || 10.0, 6.0
|}
|}


Syntax:
Syntax:
<code>hndlWetDist [[ppEffectAdjust]] [
<sqf>
value,  
_wetDistorsionHandle ppEffectAdjust [
value,
top, bottom,
top, bottom,
horizontal1, horizontal2, vertical1, vertical2,
horizontal1, horizontal2, vertical1, vertical2,
horizontal1, horizontal2, vertical1, vertical2,
horizontal1, horizontal2, vertical1, vertical2,
randX, randY, posX, posY
randX, randY, posX, posY
];</code>
];
</sqf>


Defaults:
Defaults:
<code>hndlWetDist [[ppEffectAdjust]] [
<sqf>
_wetDistorsionHandle ppEffectAdjust [
1,
1,
1, 1,  
1, 1,
4.10, 3.70, 2.50, 1.85,  
4.10, 3.70, 2.50, 1.85,
0.0054, 0.0041, 0.0090, 0.0070,  
0.0054, 0.0041, 0.0090, 0.0070,
0.5, 0.3, 10.0, 6.0
0.5, 0.3, 10.0, 6.0
];</code>
];
</sqf>


Copypaste example:
Example:
<code>0 = ["WetDistortion", 300, [
<sqf>
1,  
["WetDistortion", 300, [1, 0, 1, 4.10, 3.70, 2.50, 1.85, 0.0054, 0.0041, 0.05, 0.0070, 1, 1, 1, 1]] spawn
0, 1,  
{
4.10, 3.70, 2.50, 1.85,  
params ["_name", "_priority", "_effect", "_handle"];
0.0054, 0.0041, 0.05, 0.0070,  
while {
1, 1, 1, 1
_handle = ppEffectCreate [_name, _priority];
]] [[spawn]] {
[[params]] ["_name", "_priority", "_effect", "_handle"];
[[while]] {
_handle = [[ppEffectCreate]] [_name, _priority];
_handle < 0
_handle < 0
} [[do]] {
} do {
_priority = _priority + 1;
_priority = _priority + 1;
};
};
_handle [[ppEffectEnable]] [[true]];
_handle ppEffectEnable true;
_handle [[ppEffectAdjust]] _effect;
_handle ppEffectAdjust _effect;
_handle [[ppEffectCommit]] 5;
_handle ppEffectCommit 5;
[[waitUntil]] {[[ppEffectCommitted]] _handle};
waitUntil { ppEffectCommitted _handle };
[[uiSleep]] 3;
systemChat "admire effect for a sec";
[[comment]] "admire effect for a sec";
uiSleep 3;
_handle [[ppEffectEnable]] [[false]];
_handle ppEffectEnable false;
[[ppEffectDestroy]] _handle;
ppEffectDestroy _handle;
};</code>
};
 
</sqf>
===='''ColorCorrections'''====
 
Base priority 1500


Title ColorCorrections
=== ColorCorrections ===


<code>hndlClrCorr [[ppEffectAdjust]] [par0, apr1, par2, ..., par20, par21];</code>
Title: "ColorCorrections"; Base Priority: 1500


{| class="bikitable"
{| class="wikitable"
! Parameter !! Meaning !! Typ !! Range
! Parameter !! Meaning !! Type !! Range !! Defaults
|-
|-
| par0 || brightness || float || [0,1]
| brightness|| image brightness (0 - black, 1 - unchanged, 2 - white ) || float || 0..2 || 1
|-
|-
| par1 || contrast || float ||
| contrast || image contrast (1 - normal contrast) || float || 0... || 1
|-
|-
| par2 || offset || float ||
| offset || image contrast offset (0 - unchanged )|| float || 0... || 0
|-
|-
| par3 - par6 || blend color (R,G,B,A) || float ||
| [r, g, b, a] || color for blending (r, g, b - color, a - blend factor (0 - original color, 1 - blend color )) || float || 0..1 || [0, 0, 0, 0]
|-
|-
| par7 - par10 || colorize color (R,G,B,A) || float ||
| [r, g, b, a] || color for colorization ( r, g, b - color, a - saturation (0 - original color, 1 - B&W multiplied by colorize color)) || float || 0..1 || [1, 1, 1, 1]
|-
|-
| par11 - par14 || colorize color (R,G,B,A) || float ||
| [r, g, b, 0] || color rgb weights for desaturation || float || 0..1 || [0.299, 0.587, 0.114, 0]
|-
|-
| par15 - par21 || Vignette effect (Horizontal size, Vertical size, ?, Horizontal position, Vertical position, Vignette strength, Alpha?) || float ||
| [<br>
&nbsp;&nbsp;&nbsp;&nbsp;radialMajorAxisRadius,<br>
&nbsp;&nbsp;&nbsp;&nbsp;radialMinorAxisRadius,<br>
&nbsp;&nbsp;&nbsp;&nbsp;radialRotationDeg,<br>
&nbsp;&nbsp;&nbsp;&nbsp;radialCenterX,<br>
&nbsp;&nbsp;&nbsp;&nbsp;radialCenterY,<br>
&nbsp;&nbsp;&nbsp;&nbsp;radialInnerRadiusCoef,<br>
&nbsp;&nbsp;&nbsp;&nbsp;radialInterpCoef<br>
]
|| radial color '''''(optional, Arma 3 only)'''''<br>
major axis radius of ellipse<br>
minor axis radius of ellipse<br>
rotation of ellipse axis (in degrees)<br>
centerX of ellipse on the screen (in relative coords, [-0.5] -> [0.5], where 0 is in the screen center)<br>
centerY of ellipse on the screen (in relative coords, [-0.5] -> [0.5], where 0 is in the screen center)<br>
coefficient for inner radius (where effect is not applied)<br>
coefficient for color interpolation between inner and outer radius<br>
&nbsp;
||<br>
float<br>
float<br>
float<br>
float<br>
float<br>
float<br>
float<br>
&nbsp;
||<br>
0..1<br>
0..1<br>
0..359<br>
-1..1<br>
-1..1<br>
0..1<br>
0...<br>
&nbsp;
||
[<br>
&nbsp;&nbsp;&nbsp;&nbsp;-1,<br>
&nbsp;&nbsp;&nbsp;&nbsp;-1,<br>
&nbsp;&nbsp;&nbsp;&nbsp;0,<br>
&nbsp;&nbsp;&nbsp;&nbsp;0,<br>
&nbsp;&nbsp;&nbsp;&nbsp;0,<br>
&nbsp;&nbsp;&nbsp;&nbsp;0,<br>
&nbsp;&nbsp;&nbsp;&nbsp;0<br>
]
|}
|}


===='''DynamicBlur'''====
Syntax:
{| class="wikitable valign-top"
! {{GVI|arma3|1.00}}
! {{GVI|arma2|1.00}}{{GVI|arma2oa|1.50}}
|-
| <sqf>
_colorCorrectionHandle ppEffectAdjust
[
brightness,
contrast,
offset,
[blendR, blendG, blendB, blendA],
[colorizeR, colorizeG, colorizeB, colorizeA],
[weightR, weightG, weightB, 0],
[a, b, angle, cx, cy, innerRCoef, interpCoef]
];
</sqf>
| <sqf>
_colorCorrectionHandle ppEffectAdjust
[
brightness,
contrast,
offset,
[blendR, blendG, blendB, blendA],
[colorizeR, colorizeG, colorizeB, colorizeA],
[weightR, weightG, weightB, 0]
];
</sqf>
|}
 
Defaults:
{| class="wikitable"
! {{GVI|arma3|1.00}}
! {{GVI|arma2|1.00}}{{GVI|arma2oa|1.50}}
|-
| <sqf>
_colorCorrectionHandle ppEffectAdjust
[
1,
1,
0,
[0, 0, 0, 0],
[1, 1, 1, 1],
[0.299, 0.587, 0.114, 0],
[-1, -1, 0, 0, 0, 0, 0]
];
</sqf>
| <sqf>
_colorCorrectionHandle ppEffectAdjust
[
1,
1,
0,
[0, 0, 0, 0],
[1, 1, 1, 1],
[0.299, 0.587, 0.114, 0]
];
</sqf>
|}
 
Example:
<sqf>
["ColorCorrections", 1500, [1, 0.4, 0, [0, 0, 0, 0], [1, 1, 1, 0], [1, 1, 1, 0]]] spawn
{
params ["_name", "_priority", "_effect", "_handle"];
while {
_handle = ppEffectCreate [_name, _priority];
_handle < 0
} do {
_priority = _priority + 1;
};
_handle ppEffectEnable true;
_handle ppEffectAdjust _effect;
_handle ppEffectCommit 5;
waitUntil { ppEffectCommitted _handle };
systemChat "admire effect for a sec";
uiSleep 3;
_handle ppEffectEnable false;
ppEffectDestroy _handle;
};
</sqf>
 
=== DynamicBlur ===


Title: "DynamicBlur"; Base Priority: 400
Title: "DynamicBlur"; Base Priority: 400


{| class="bikitable"
{| class="wikitable"
! Parameter !! Meaning !! Type !! Range
! Parameter !! Meaning !! Type !! Range !! Defaults
|-
|-
| value || blurriness || float || 0...
| value || blurriness || float || 0... || 0
|}
|}


Syntax:
Syntax:
<code>hndlDynBlur [[ppEffectAdjust]] [value];</code>
<sqf>_dynamicBlurHandle ppEffectAdjust [value];</sqf>


Defaults:
Defaults:
<code>hndlDynBlur [[ppEffectAdjust]] [0];</code>
<sqf>_dynamicBlurHandle ppEffectAdjust [0];</sqf>


Copypaste example:
Example:
<code>0 = ["DynamicBlur", 400, [10]] [[spawn]] {
<sqf>
[[params]] ["_name", "_priority", "_effect", "_handle"];
["DynamicBlur", 400, [10]] spawn
[[while]] {
{
_handle = [[ppEffectCreate]] [_name, _priority];
params ["_name", "_priority", "_effect", "_handle"];
while {
_handle = ppEffectCreate [_name, _priority];
_handle < 0
_handle < 0
} [[do]] {
} do {
_priority = _priority + 1;
_priority = _priority + 1;
};
};
_handle [[ppEffectEnable]] [[true]];
_handle ppEffectEnable true;
_handle [[ppEffectAdjust]] _effect;
_handle ppEffectAdjust _effect;
_handle [[ppEffectCommit]] 5;
_handle ppEffectCommit 5;
[[waitUntil]] {[[ppEffectCommitted]] _handle};
waitUntil { ppEffectCommitted _handle };
[[uiSleep]] 3;
systemChat "admire effect for a sec";
[[comment]] "admire effect for a sec";
uiSleep 3;
_handle [[ppEffectEnable]] [[false]];
_handle ppEffectEnable false;
[[ppEffectDestroy]] _handle;
ppEffectDestroy _handle;
};</code>
};
</sqf>
 
=== FilmGrain ===


===='''FilmGrain'''====
Title: "FilmGrain"; Base Priority: 2000


Title: "FilmGrain"; Base Priority 2000
{{Feature|arma3|In {{arma3}} the '''monochromatic''' parameter is [[Number|numeric]]. Use '''0''' for monochrome, any other value for colour.}}


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 from 1 to 6 parameters, meaning of individual parameters is following:


{| class="bikitable"
{| class="wikitable"
! Parameter !! Meaning !! Type !! Range
! colspan="2" | Parameter !! Meaning !! Type !! Range !! Default
|-
| colspan="2" | intensity || intensity || float || 0..1 || 0.005
|-
|-
| intensity || intensity || float || 0...1
| colspan="2" | sharpness || sharpness || float || 1..20 || 1.25
|-
|-
| sharpness || sharpness || float || 0...20
| colspan="2" | grainSize || grain size || float || 1..8 ||  2.01
|-
|-
| grainSize || grain size || float || 1...8
| colspan="2" | intensityX0 || intensityX0 || float || -x..0..+x ||0.75
|-
|-
| intensityX0 || intensityX0 || float ||
| colspan="2" | intensityX1 || intensityX1 || float || -x..0..+x ||1.0
|-
|-
| intensityX1 || intensityX1 || float ||
| rowspan="2" | monochromatic || {{GVI|arma2|1.00}}{{GVI|arma2oa|1.50}} || monochromatic || bool|| false, true || true
|-
|-
| monochromatic || monochromatic || bool ||
| {{GVI|arma3|1.00}} || monochromatic || integer || 0, 1 || 0
|}
|}


Syntax:
Syntax:
<code>hndlFilmGrain [[ppEffectAdjust]] [
<sqf>
intensity,  
_filmGrainHandle ppEffectAdjust [
intensity,
sharpness,
sharpness,
grainSize,  
grainSize,
intensityX0,  
intensityX0,
intensityX1,
intensityX1,
monochromatic
monochromatic
];</code>
];
</sqf>


Defaults:
Defaults:
<code>hndlFilmGrain [[ppEffectAdjust]] [
{| class="wikitable"
0.1,  
! {{GVI|arma3|1.00}}
1.5,
! {{GVI|arma2|1.00}}{{GVI|arma2oa|1.50}}
1.7,  
|-
0.2,  
| <sqf>
_filmGrainHandle ppEffectAdjust [
0.005,
1.25,
2.01,
0.75,
1.0,
1.0,
[[true]]
0
];</code>
];
</sqf>
| <sqf>
_filmGrainHandle ppEffectAdjust [
0.005,
1.25,
2.01,
0.75,
1.0,
true
];
</sqf>
|}
 
Example:
{| class="wikitable"
! {{GVI|arma3|1.00}}
! {{GVI|arma2|1.00}}{{GVI|arma2oa|1.50}}
|-
| <sqf>
["FilmGrain", 2000, [1, 0.15, 7, 0.2, 1.0, 0]] spawn
{
params ["_name", "_priority", "_effect"];
 


Copypaste example:
private _handle = -1;
<code>0 = ["FilmGrain", 2000, [
while {
1,  
_handle = ppEffectCreate [_name, _priority];
0.15,
_handle < 0;
7,  
} do {
0.2,  
_priority = _priority + 1;
1.0,
};
[[true]]
_handle ppEffectEnable true;
]] [[spawn]] {
_handle ppEffectAdjust _effect;
[[params]] ["_name", "_priority", "_effect", "_handle"];
_handle ppEffectCommit 5;
[[while]] {
waitUntil { sleep 0.1; ppEffectCommitted _handle };
_handle = [[ppEffectCreate]] [_name, _priority];
systemChat "admire effect for a sec";
_handle < 0
uiSleep 3;
} [[do]] {
_handle ppEffectEnable false;
ppEffectDestroy _handle;
};
</sqf>
| <sqf>
["FilmGrain", 2000, [1, 0.15, 7, 0.2, 1.0, true]] spawn
{
local _name = _this select 0;
local _priority = _this select 1;
local _effect = _this select 2;
local _handle = -1;
while {
_handle = ppEffectCreate [_name, _priority];
_handle < 0;
} do {
_priority = _priority + 1;
_priority = _priority + 1;
};
};
_handle [[ppEffectEnable]] [[true]];
_handle ppEffectEnable true;
_handle [[ppEffectAdjust]] _effect;
_handle ppEffectAdjust _effect;
_handle [[ppEffectCommit]] 5;
_handle ppEffectCommit 5;
[[waitUntil]] {[[ppEffectCommitted]] _handle};
waitUntil { sleep 0.1; ppEffectCommitted _handle };
[[uiSleep]] 3;
systemChat "admire effect for a sec";
[[comment]] "admire effect for a sec";
uiSleep 3;
_handle [[ppEffectEnable]] [[false]];
_handle ppEffectEnable false;
[[ppEffectDestroy]] _handle;
ppEffectDestroy _handle;
};</code>
};
</sqf>
|}


===='''ColorInversion'''====
=== ColorInversion ===


Title: "ColorInversion"; Base Priority: 2500
Title: "ColorInversion"; Base Priority: 2500


{| class="bikitable"
{| class="wikitable"
! Parameter !! Meaning !! Type !! Range
! Parameter !! Meaning !! Type !! Range !! Defaults
|-
|-
| Red || Inversion of R channel || float || 0...2
| Red || Inversion of R channel (image inversion (0..no blur, 1..very blurred) || float || 0..1 || 0
|-
|-
| Green || Inversion of G channel || float || 0...2
| Green || Inversion of G channel (image inversion (0..no blur, 1..very blurred) || float || 0..1 || 0
|-
|-
| Blue || Inversion of B channel || float || 0...2
| Blue || Inversion of B channel (image inversion (0..no blur, 1..very blurred) || float || 0..1 || 0
|}
|}


Syntax:
Syntax:
<code>hndlClrInversion [[ppEffectAdjust]] [Red, Green, Blue];</code>
<sqf>_colorInversionHandle ppEffectAdjust [Red, Green, Blue];</sqf>


Defaults:
Defaults:
<code>hndlClrInversion [[ppEffectAdjust]] [0, 0, 0];</code>
<sqf>_colorInversionHandle ppEffectAdjust [0, 0, 0];</sqf>


Copypaste example:
Example:
<code>0 = ["ColorInversion", 2500, [0.5, 0.5, 0.5]] [[spawn]] {
<sqf>
[[params]] ["_name", "_priority", "_effect", "_handle"];
["ColorInversion", 2500, [0.5, 0.5, 0.5]] spawn
[[while]] {
{
_handle = [[ppEffectCreate]] [_name, _priority];
params ["_name", "_priority", "_effect", "_handle"];
while {
_handle = ppEffectCreate [_name, _priority];
_handle < 0
_handle < 0
} [[do]] {
} do {
_priority = _priority + 1;
};
_handle ppEffectEnable true;
_handle ppEffectAdjust _effect;
_handle ppEffectCommit 5;
waitUntil { ppEffectCommitted _handle };
systemChat "admire effect for a sec";
uiSleep 3;
_handle ppEffectEnable false;
ppEffectDestroy _handle;
};
</sqf>
 
{{ArgTitle|3|SSAO|{{GVI|arma3|0.50}}}}
 
Title: "SSAO"; Base Priority: 0
 
{| class="wikitable"
! Parameter !! Meaning !! Type !! Range !! Defaults
|-
| intensity ||  || float || 0..1 || 0
|-
| threshold0 ||  || float || 0..1 || 0
|-
| threshold0 ||  || float || 0..1 || 0
|-
| nearRadius ||  || float || 0..1 || 0
|-
| farRadius ||  || float || 0..1 || 0
|-
| nearDist ||  || float || 0..1 || 0
|-
| farDist ||  || float || 0..1 || 0
|-
| depthBlurDist ||  || float || 0..1 || 0
|-
| blurPasses ||  || integer || 0..x || 0
|-
| halfRes ||  || bool || true, false|| false
|-
| blurHalfRes ||  || boolean || true, false|| false
|}
 
Syntax:
<sqf>
_ssaoHandle ppEffectAdjust [
intensity,
threshold0,
threshold1,
nearRadius,
farRadius,
nearDist,
farDist,
depthBlurDist,
blurPasses,
halfRes,
blurHalfRes
];
</sqf>
 
Defaults:
<sqf>_ssaoHandle ppEffectAdjust [0, 0, 0, 0, 0, 0, 0, 0, 0, false, false];</sqf>
 
Example:
<sqf>
["SSAO", 1, [3, 0.25, 0.75, 5, 50, 5, 25, 100, 3, true, true]] spawn
{
params ["_name", "_priority", "_effect", "_handle"];
while {
_handle = ppEffectCreate [_name, _priority];
_handle < 0;
} do {
_priority = _priority + 1;
};
_handle ppEffectEnable true;
_handle ppEffectAdjust _effect;
_handle ppEffectCommit 5;
waitUntil { ppEffectCommitted _handle };
systemChat "admire effect for a sec";
uiSleep 3;
_handle ppEffectEnable false;
ppEffectDestroy _handle;
};
</sqf>
 
{{ArgTitle|3|Resolution|{{GVI|arma3|2.10}}}}
 
Title: "Resolution"; Base Priority: 0
 
{| class="wikitable"
! Parameter !! Meaning !! Type !! Range !! Defaults
|-
| verticalResolution || define the render's vertical resolution.<br>
If the value is negative, the resolution goes back to normal. If the value is greater than the final render's vertical resolution, it gets clamped to it.<br>
The effect can be disabled in both cases.
| integer || -1..x || -1
|}
 
Syntax:
<sqf>_resolutionHandle ppEffectAdjust [verticalResolution];</sqf>
 
Defaults:
<sqf>_ssaoHandle ppEffectAdjust [-1];</sqf>
 
Example:
<sqf>
["Resolution", 1, [400]] spawn
{
params ["_name", "_priority", "_effect", "_handle"];
while {
_handle = ppEffectCreate [_name, _priority];
_handle < 0;
} do {
_priority = _priority + 1;
_priority = _priority + 1;
};
};
_handle [[ppEffectEnable]] [[true]];
_handle ppEffectEnable true;
_handle [[ppEffectAdjust]] _effect;
_handle ppEffectAdjust _effect;
_handle [[ppEffectCommit]] 5;
_handle ppEffectCommit 5;
[[waitUntil]] {[[ppEffectCommitted]] _handle};
waitUntil { ppEffectCommitted _handle };
[[uiSleep]] 3;
systemChat "admire effect for a sec";
[[comment]] "admire effect for a sec";
uiSleep 3;
_handle [[ppEffectEnable]] [[false]];
_handle ppEffectEnable false;
[[ppEffectDestroy]] _handle;
ppEffectDestroy _handle;
};</code>
};
</sqf>
 
 
== Advanced effects ==


===Post process settings===
{{Feature|important|The advanced effects are not intended to be used by the end user. They cannot be created by [[ppEffectCreate]] and their adjustments (''via'' [[ppEffectAdjust]]) are '''immediate''' and do not require [[ppEffectCommit]].<br/>{{Link|https://forums.bohemia.net/forums/topic/220199-hbaoplus-post-processing-effect/|More info on the forums}}.}}
 
=== LightShafts ===
 
Title: "LightShafts"; Base Priority: N/A
 
* can be used with [[ppEffectAdjust]]
* can be used with [[ppEffectEnable]]
* '''cannot''' be used with [[ppEffectCreate]]
* '''cannot''' be used with [[ppEffectCommit]]
 
{| class="wikitable"
! Parameter !! Meaning !! Type !! Range !! Defaults
|-
| sunInnerRadius || inner radius of the sun. 0 = no radius, 1 = full screen || float || 0.001..1 || 0.01
|-
| sunOuterRadius || outer radius of the sun. Must be > sunInnerRadius. 0 = no radius, 1 = full screen. light intensity fades out from inner to outer radius || float || 0..1 || 0.6
|-
| exposure || strength of effect || float || 0... || 0.45
|-
| decay || how fast intensity of rays decays with distance || float || 0..1 || 0.89
|}
 
Syntax:
<sqf>"LightShafts" ppEffectAdjust [sunInnerRadius, sunOuterRadius, exposure, decay];</sqf>
 
Defaults:
<sqf>"LightShafts" ppEffectAdjust [0.01, 0.6, 0.45, 0.89];</sqf>
 
Example:
<sqf>
0 spawn
{
"LightShafts" ppEffectEnable true;
"LightShafts" ppEffectAdjust [0.1,0.25,0.1,1];
systemChat "admire effect for a sec";
uiSleep 3;
"LightShafts" ppEffectEnable false;
};
</sqf>
 
=== HBAOPlus ===
 
{{Feature|important|HBAOPlus requires DirectX 11 feature level 11 or above as well as being enabled in Video Options to affect display.}}
 
Title: "HBAOPlus"; Base Priority: N/A
 
* can be used with [[ppEffectAdjust]]
* '''cannot''' be used with [[ppEffectEnable]]
* '''cannot''' be used with [[ppEffectCreate]]
* '''cannot''' be used with [[ppEffectCommit]]
 
{| class="wikitable"
! Parameter !! Meaning !! Type !! Range !! Defaults (Soft) !! Defaults (Medium) !! Defaults (Strong)
|-
| radius || AO radius in meters || float || 0...
| colspan="2" style="text-align: center;" | 1
| style="text-align: center;" | 1.2
|-
| bias || hide low-tessellation artifacts || float || 0..0.5
| colspan="3" style="text-align: center;" | 0.3
|-
| detailAO || scale factor for the small-scale AO, the greater the darker || float || 0..2
| style="text-align: center;" | 0.1
| style="text-align: center;" | 0.3
| style="text-align: center;" | 0.5
|-
| coarseAO || scale factor for the large-scale AO, the greater the darker || float || 0..2
| style="text-align: center;" | 0.50
| style="text-align: center;" | 0.75
| style="text-align: center;" | 1.00
|-
| powerExponent || final AO output is pow(AO, powerExponent) || float || 1..4
| colspan="3" style="text-align: center;" | 3
|-
| blurRadius ||  0 = disabled blur, 1 = enabled with a radius of 2, 2 = enabled with a radius of 4. || integer || 0, 1, 2
| colspan="3" style="text-align: center;" | 1
|-
| blurSharpness || the greater the sharpness parameter, the more the blur preserves edges || float || 0...
| colspan="3" style="text-align: center;" | 4
|-
| fadeSharpness || fading of the AO with distance (greater value = sharper transition) || float || 0...
| colspan="3" style="text-align: center;" | 5
|-
| foregroundViewDepth || distance (in meters) of foreground objects - up to this distance the depth is handled differently from the rest of the scene - to prevent huge AO kernel of foreground objects || float || 0...
| colspan="3" style="text-align: center;" | 2
|-
| backgroundViewDepth || distance (in meters) of background objects - AO kernel for objects beyond this distance is computed differently || float || 0...
| colspan="3" style="text-align: center;" | 0
|}
 
Syntax:
<sqf>"HBAOPlus" ppEffectAdjust [radius, bias, detailAO, coarseAO, powerExponent, blurRadius, blurSharpness, fadeSharpness, foregroundViewDepth, backgroundViewDepth];</sqf>


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.<br/>
Defaults - ''depend on HBAO+ setting in Video Options'':
The following effects will '''not''' have any effect with PP set to ''disabled'':
<sqf>
* radialBlur
// HBAO+ Soft
* chromAberration
"HBAOPlus" ppEffectAdjust [1.0, 0.3, 0.1, 0.50, 3.0, 1.0, 4.0, 5.0, 2.0, 0.0];
* wetDistortion
* filmGrain
* DynamicBlur


// HBAO+ Medium
"HBAOPlus" ppEffectAdjust [1.0, 0.3, 0.3, 0.75, 3.0, 1.0, 4.0, 5.0, 2.0, 0.0];


// HBAO+ Strong
"HBAOPlus" ppEffectAdjust [1.2, 0.3, 0.5, 1.0, 3.0, 1.0, 4.0, 5.0, 2.0, 0.0];
</sqf>




'''See also:''' [[ppEffectAdjust]], [[ppEffectCommit]], [[ppEffectCommitted]], [[ppEffectCreate]], [[ppEffectDestroy]], [[ppEffectEnable]], [[ppEffectForceInNVG]]
Example:
<sqf>
0 spawn
{
"HBAOPlus" ppEffectAdjust [2, 0.3, 1, 1, 2, 1, 4, 5, 2, 0];
systemChat "admire effect for a sec";
uiSleep 3;
"HBAOPlus" ppEffectAdjust [1.0, 0.3, 0.1, 0.50, 3.0, 1.0, 4.0, 5.0, 2.0, 0.0];
};
</sqf>




[[Category:ArmA 2: Editing]]
[[Category: Scripting Topics]]
[[Category: Scripting Topics]]

Latest revision as of 21:42, 16 May 2024

Scripting Commands


Usage

Effect Creation

_handle = ppEffectCreate ["effect_type", priority]; _handlesArray = ppEffectCreate [["effect_type0", priority0], ["effect_type1", priority1], /* ... */];

Effect Cancellation

ppEffectDestroy handle; ppEffectDestroy handlesArray;

Effect Disabling

Compared to the effect cancellation, in this case the effect is just disabled but still exists

Effect Fade out

Rather than disabling the effect completely at once, it is possible to use ppEffectAdjust to fade it out over time

//after having created and used effect: //set the parameters for the effect back to the default values "colorCorrections" ppEffectAdjust [1,1,0,[0,0,0,0],[1,1,1,1],[0.299, 0.587, 0.114, 0],[-1,-1,0,0,0,0,0]]; //then commit and fade out over given time (10 seconds) "colorCorrections" ppEffectCommit 10; //Disable completely after fadeout "colorCorrections" ppEffectEnable false;

Parameter Setup

handle ppEffectAdjust [par0, par1, /* ... */, parN];

Parameter application

handle ppEffectCommit _duration; handlesArray ppEffectCommit _duration;

Effect Permission

handle ppEffectEnable _OnOrOff; handlesArray ppEffectEnable _OnOrOff;

Check if Enabled

Example

_handle = ppEffectCreate ["colorCorrections", 1501]; _handle ppEffectEnable true; _handle 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]]; _handle ppEffectCommit 0; sleep 10; ppEffectDestroy _handle;

Table of Priorities

Priority defines sequence in which post effects are applied. The higher priority, the later the effect will be applied, on top of the others.

Base Priority Effect
2500 ColorInversion
2000 FilmGrain
1500 ColorCorrections
400 DynamicBlur
300 WetDistortion
200 ChromaticAberration
100 RadialBlur
0 SSAO
0 Resolution


Parameters of Individual Effects

RadialBlur

Title: "RadialBlur"; Base Priority: 100

RadialBlur will not do anything if RADIAL BLUR is disabled in Video Options
Parameter Meaning Type Range Defaults
powerX relative blur degree on axis X float 0... 0.01
powerY relative blur degree on axis Y float 0... 0.01
offsetX relative size X of un-blurred centre float 0... 0.06
offsetY relative size Y of un-blurred centre float 0... 0.06

Syntax:

_radialBlurHandle ppEffectAdjust [powerX, powerY, offsetX, offsetY];

Defaults:

_radialBlurHandle ppEffectAdjust [0.01, 0.01, 0.06, 0.06];

Example:

["RadialBlur", 100, [100, 0.5, 0.1, 0.5]] spawn { params ["_name", "_priority", "_effect", "_handle"]; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0 } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };

ChromAberration

Title "ChromAberration"; Base Priority: 200

Parameter Meaning Type Range Defaults
aberrationPowerX relative effect strength (sample spacing from each other) axis X float 0... 0.005
aberrationPowerY relative effect strength (sample spacing from each other) axis Y float 0... 0.005
aspectCorrection enable/disable correction according to screen aspect ratio bool true, false false

Syntax:

_chromaticAberrationHandle ppEffectAdjust [aberrationPowerX, aberrationPowerY, aspectCorrection];

Defaults:

_chromaticAberrationHandle ppEffectAdjust [0.005, 0.005, false];

Example:

["ChromAberration", 200, [0.05, 0.05, true]] spawn { params ["_name", "_priority", "_effect", "_handle"]; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0 } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };

WetDistortion

Title: "WetDistortion"; Base Priority: 300

Effect cancels automatically under water.
Parameter Meaning Type Range Defaults
value blurriness of distorted image (0 to 1, values above 1 cause unusual) float 0..1 1
top, bottom effect power (top/bottom of screen separately) float 0..1 1, 1
horizontal1, horizontal2, vertical1, vertical2 waves speeds (frequency/PI) float 0... 4.10, 3.70, 2.50, 1.85
horizontal1, horizontal2, vertical1, vertical2 waves amplitudes (delta texture coordinates) float 0... 0.0054, 0.0041, 0.0090, 0.0070
randX, randY coefficients for phase computing; weight of random vertex data on horizontal/vertical wave phases float 0... 0.5, 0.3
posX, posY coefficients for phase computing; weight of vertex X/Y-position on horizontal/vertical wave phases float 0... 10.0, 6.0

Syntax:

_wetDistorsionHandle ppEffectAdjust [ value, top, bottom, horizontal1, horizontal2, vertical1, vertical2, horizontal1, horizontal2, vertical1, vertical2, randX, randY, posX, posY ];

Defaults:

_wetDistorsionHandle ppEffectAdjust [ 1, 1, 1, 4.10, 3.70, 2.50, 1.85, 0.0054, 0.0041, 0.0090, 0.0070, 0.5, 0.3, 10.0, 6.0 ];

Example:

["WetDistortion", 300, [1, 0, 1, 4.10, 3.70, 2.50, 1.85, 0.0054, 0.0041, 0.05, 0.0070, 1, 1, 1, 1]] spawn { params ["_name", "_priority", "_effect", "_handle"]; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0 } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };

ColorCorrections

Title: "ColorCorrections"; Base Priority: 1500

Parameter Meaning Type Range Defaults
brightness image brightness (0 - black, 1 - unchanged, 2 - white ) float 0..2 1
contrast image contrast (1 - normal contrast) float 0... 1
offset image contrast offset (0 - unchanged ) float 0... 0
[r, g, b, a] color for blending (r, g, b - color, a - blend factor (0 - original color, 1 - blend color )) float 0..1 [0, 0, 0, 0]
[r, g, b, a] color for colorization ( r, g, b - color, a - saturation (0 - original color, 1 - B&W multiplied by colorize color)) float 0..1 [1, 1, 1, 1]
[r, g, b, 0] color rgb weights for desaturation float 0..1 [0.299, 0.587, 0.114, 0]
[

    radialMajorAxisRadius,
    radialMinorAxisRadius,
    radialRotationDeg,
    radialCenterX,
    radialCenterY,
    radialInnerRadiusCoef,
    radialInterpCoef
]

radial color (optional, Arma 3 only)

major axis radius of ellipse
minor axis radius of ellipse
rotation of ellipse axis (in degrees)
centerX of ellipse on the screen (in relative coords, [-0.5] -> [0.5], where 0 is in the screen center)
centerY of ellipse on the screen (in relative coords, [-0.5] -> [0.5], where 0 is in the screen center)
coefficient for inner radius (where effect is not applied)
coefficient for color interpolation between inner and outer radius
 


float
float
float
float
float
float
float
 


0..1
0..1
0..359
-1..1
-1..1
0..1
0...
 

[
    -1,
    -1,
    0,
    0,
    0,
    0,
    0
]

Syntax:

Arma 3 logo black.png1.00 Logo A2.png1.00A2 OA Logo.png1.50
_colorCorrectionHandle ppEffectAdjust [ brightness, contrast, offset, [blendR, blendG, blendB, blendA], [colorizeR, colorizeG, colorizeB, colorizeA], [weightR, weightG, weightB, 0], [a, b, angle, cx, cy, innerRCoef, interpCoef] ];
_colorCorrectionHandle ppEffectAdjust [ brightness, contrast, offset, [blendR, blendG, blendB, blendA], [colorizeR, colorizeG, colorizeB, colorizeA], [weightR, weightG, weightB, 0] ];

Defaults:

Arma 3 logo black.png1.00 Logo A2.png1.00A2 OA Logo.png1.50
_colorCorrectionHandle ppEffectAdjust [ 1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [0.299, 0.587, 0.114, 0], [-1, -1, 0, 0, 0, 0, 0] ];
_colorCorrectionHandle ppEffectAdjust [ 1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [0.299, 0.587, 0.114, 0] ];

Example:

["ColorCorrections", 1500, [1, 0.4, 0, [0, 0, 0, 0], [1, 1, 1, 0], [1, 1, 1, 0]]] spawn { params ["_name", "_priority", "_effect", "_handle"]; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0 } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };

DynamicBlur

Title: "DynamicBlur"; Base Priority: 400

Parameter Meaning Type Range Defaults
value blurriness float 0... 0

Syntax:

_dynamicBlurHandle ppEffectAdjust [value];

Defaults:

_dynamicBlurHandle ppEffectAdjust [0];

Example:

["DynamicBlur", 400, [10]] spawn { params ["_name", "_priority", "_effect", "_handle"]; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0 } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };

FilmGrain

Title: "FilmGrain"; Base Priority: 2000

Arma 3
In Arma 3 the monochromatic parameter is numeric. Use 0 for monochrome, any other value for colour.

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

Parameter Meaning Type Range Default
intensity intensity float 0..1 0.005
sharpness sharpness float 1..20 1.25
grainSize grain size float 1..8 2.01
intensityX0 intensityX0 float -x..0..+x 0.75
intensityX1 intensityX1 float -x..0..+x 1.0
monochromatic Logo A2.png1.00A2 OA Logo.png1.50 monochromatic bool false, true true
Arma 3 logo black.png1.00 monochromatic integer 0, 1 0

Syntax:

_filmGrainHandle ppEffectAdjust [ intensity, sharpness, grainSize, intensityX0, intensityX1, monochromatic ];

Defaults:

Arma 3 logo black.png1.00 Logo A2.png1.00A2 OA Logo.png1.50
_filmGrainHandle ppEffectAdjust [ 0.005, 1.25, 2.01, 0.75, 1.0, 0 ];
_filmGrainHandle ppEffectAdjust [ 0.005, 1.25, 2.01, 0.75, 1.0, true ];

Example:

Arma 3 logo black.png1.00 Logo A2.png1.00A2 OA Logo.png1.50
["FilmGrain", 2000, [1, 0.15, 7, 0.2, 1.0, 0]] spawn { params ["_name", "_priority", "_effect"]; private _handle = -1; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0; } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { sleep 0.1; ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };
["FilmGrain", 2000, [1, 0.15, 7, 0.2, 1.0, true]] spawn { local _name = _this select 0; local _priority = _this select 1; local _effect = _this select 2; local _handle = -1; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0; } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { sleep 0.1; ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };

ColorInversion

Title: "ColorInversion"; Base Priority: 2500

Parameter Meaning Type Range Defaults
Red Inversion of R channel (image inversion (0..no blur, 1..very blurred) float 0..1 0
Green Inversion of G channel (image inversion (0..no blur, 1..very blurred) float 0..1 0
Blue Inversion of B channel (image inversion (0..no blur, 1..very blurred) float 0..1 0

Syntax:

_colorInversionHandle ppEffectAdjust [Red, Green, Blue];

Defaults:

_colorInversionHandle ppEffectAdjust [0, 0, 0];

Example:

["ColorInversion", 2500, [0.5, 0.5, 0.5]] spawn { params ["_name", "_priority", "_effect", "_handle"]; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0 } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };

SSAO

Title: "SSAO"; Base Priority: 0

Parameter Meaning Type Range Defaults
intensity float 0..1 0
threshold0 float 0..1 0
threshold0 float 0..1 0
nearRadius float 0..1 0
farRadius float 0..1 0
nearDist float 0..1 0
farDist float 0..1 0
depthBlurDist float 0..1 0
blurPasses integer 0..x 0
halfRes bool true, false false
blurHalfRes boolean true, false false

Syntax:

_ssaoHandle ppEffectAdjust [ intensity, threshold0, threshold1, nearRadius, farRadius, nearDist, farDist, depthBlurDist, blurPasses, halfRes, blurHalfRes ];

Defaults:

_ssaoHandle ppEffectAdjust [0, 0, 0, 0, 0, 0, 0, 0, 0, false, false];

Example:

["SSAO", 1, [3, 0.25, 0.75, 5, 50, 5, 25, 100, 3, true, true]] spawn { params ["_name", "_priority", "_effect", "_handle"]; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0; } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };

Resolution

Title: "Resolution"; Base Priority: 0

Parameter Meaning Type Range Defaults
verticalResolution define the render's vertical resolution.

If the value is negative, the resolution goes back to normal. If the value is greater than the final render's vertical resolution, it gets clamped to it.
The effect can be disabled in both cases.

integer -1..x -1

Syntax:

_resolutionHandle ppEffectAdjust [verticalResolution];

Defaults:

_ssaoHandle ppEffectAdjust [-1];

Example:

["Resolution", 1, [400]] spawn { params ["_name", "_priority", "_effect", "_handle"]; while { _handle = ppEffectCreate [_name, _priority]; _handle < 0; } do { _priority = _priority + 1; }; _handle ppEffectEnable true; _handle ppEffectAdjust _effect; _handle ppEffectCommit 5; waitUntil { ppEffectCommitted _handle }; systemChat "admire effect for a sec"; uiSleep 3; _handle ppEffectEnable false; ppEffectDestroy _handle; };


Advanced effects

The advanced effects are not intended to be used by the end user. They cannot be created by ppEffectCreate and their adjustments (via ppEffectAdjust) are immediate and do not require ppEffectCommit.
More info on the forums.

LightShafts

Title: "LightShafts"; Base Priority: N/A

Parameter Meaning Type Range Defaults
sunInnerRadius inner radius of the sun. 0 = no radius, 1 = full screen float 0.001..1 0.01
sunOuterRadius outer radius of the sun. Must be > sunInnerRadius. 0 = no radius, 1 = full screen. light intensity fades out from inner to outer radius float 0..1 0.6
exposure strength of effect float 0... 0.45
decay how fast intensity of rays decays with distance float 0..1 0.89

Syntax:

"LightShafts" ppEffectAdjust [sunInnerRadius, sunOuterRadius, exposure, decay];

Defaults:

"LightShafts" ppEffectAdjust [0.01, 0.6, 0.45, 0.89];

Example:

0 spawn { "LightShafts" ppEffectEnable true; "LightShafts" ppEffectAdjust [0.1,0.25,0.1,1]; systemChat "admire effect for a sec"; uiSleep 3; "LightShafts" ppEffectEnable false; };

HBAOPlus

HBAOPlus requires DirectX 11 feature level 11 or above as well as being enabled in Video Options to affect display.

Title: "HBAOPlus"; Base Priority: N/A

Parameter Meaning Type Range Defaults (Soft) Defaults (Medium) Defaults (Strong)
radius AO radius in meters float 0... 1 1.2
bias hide low-tessellation artifacts float 0..0.5 0.3
detailAO scale factor for the small-scale AO, the greater the darker float 0..2 0.1 0.3 0.5
coarseAO scale factor for the large-scale AO, the greater the darker float 0..2 0.50 0.75 1.00
powerExponent final AO output is pow(AO, powerExponent) float 1..4 3
blurRadius 0 = disabled blur, 1 = enabled with a radius of 2, 2 = enabled with a radius of 4. integer 0, 1, 2 1
blurSharpness the greater the sharpness parameter, the more the blur preserves edges float 0... 4
fadeSharpness fading of the AO with distance (greater value = sharper transition) float 0... 5
foregroundViewDepth distance (in meters) of foreground objects - up to this distance the depth is handled differently from the rest of the scene - to prevent huge AO kernel of foreground objects float 0... 2
backgroundViewDepth distance (in meters) of background objects - AO kernel for objects beyond this distance is computed differently float 0... 0

Syntax:

"HBAOPlus" ppEffectAdjust [radius, bias, detailAO, coarseAO, powerExponent, blurRadius, blurSharpness, fadeSharpness, foregroundViewDepth, backgroundViewDepth];

Defaults - depend on HBAO+ setting in Video Options:

// HBAO+ Soft "HBAOPlus" ppEffectAdjust [1.0, 0.3, 0.1, 0.50, 3.0, 1.0, 4.0, 5.0, 2.0, 0.0]; // HBAO+ Medium "HBAOPlus" ppEffectAdjust [1.0, 0.3, 0.3, 0.75, 3.0, 1.0, 4.0, 5.0, 2.0, 0.0]; // HBAO+ Strong "HBAOPlus" ppEffectAdjust [1.2, 0.3, 0.5, 1.0, 3.0, 1.0, 4.0, 5.0, 2.0, 0.0];


Example:

0 spawn { "HBAOPlus" ppEffectAdjust [2, 0.3, 1, 1, 2, 1, 4, 5, 2, 0]; systemChat "admire effect for a sec"; uiSleep 3; "HBAOPlus" ppEffectAdjust [1.0, 0.3, 0.1, 0.50, 3.0, 1.0, 4.0, 5.0, 2.0, 0.0]; };