Post Process Effects: Difference between revisions
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 314: | Line 314: | ||
Syntax: | Syntax: | ||
<sqf> | {| class="wikitable valign-top" | ||
! {{GVI|arma3|1.00}} | |||
! {{GVI|arma2|1.00}}{{GVI|arma2oa|1.50}} | |||
|- | |||
| <sqf> | |||
_colorCorrectionHandle ppEffectAdjust | _colorCorrectionHandle ppEffectAdjust | ||
[ | [ | ||
Line 326: | Line 330: | ||
]; | ]; | ||
</sqf> | </sqf> | ||
| <sqf> | |||
_colorCorrectionHandle ppEffectAdjust | |||
[ | |||
brightness, | |||
contrast, | |||
offset, | |||
[blendR, blendG, blendB, blendA], | |||
[colorizeR, colorizeG, colorizeB, colorizeA], | |||
[weightR, weightG, weightB, 0] | |||
]; | |||
</sqf> | |||
|} | |||
Defaults: | Defaults: | ||
<sqf> | {| class="wikitable" | ||
! {{GVI|arma3|1.00}} | |||
! {{GVI|arma2|1.00}}{{GVI|arma2oa|1.50}} | |||
|- | |||
| <sqf> | |||
_colorCorrectionHandle ppEffectAdjust | _colorCorrectionHandle ppEffectAdjust | ||
[ | [ | ||
Line 340: | Line 360: | ||
]; | ]; | ||
</sqf> | </sqf> | ||
| <sqf> | |||
_colorCorrectionHandle ppEffectAdjust | |||
[ | |||
1, | |||
1, | |||
0, | |||
[0, 0, 0, 0], | |||
[1, 1, 1, 1], | |||
[0.299, 0.587, 0.114, 0] | |||
]; | |||
</sqf> | |||
|} | |||
Example: | Example: | ||
Line 405: | Line 437: | ||
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.}} | {{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 from 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="wikitable" | {| class="wikitable" | ||
! Parameter !! Meaning !! Type !! Range !! Default | ! colspan="2" | Parameter !! Meaning !! Type !! Range !! Default | ||
|- | |- | ||
| intensity || intensity || float || 0..1 || 0.005 | | colspan="2" | intensity || intensity || float || 0..1 || 0.005 | ||
|- | |- | ||
| sharpness || sharpness || float || 1..20 || 1.25 | | colspan="2" | sharpness || sharpness || float || 1..20 || 1.25 | ||
|- | |- | ||
| grainSize || grain size || float || 1..8 || 2.01 | | colspan="2" | grainSize || grain size || float || 1..8 || 2.01 | ||
|- | |- | ||
| intensityX0 || intensityX0 || float || -x..0..+x ||0.75 | | colspan="2" | intensityX0 || intensityX0 || float || -x..0..+x ||0.75 | ||
|- | |- | ||
| intensityX1 || intensityX1 || float || -x..0..+x ||1.0 | | colspan="2" | intensityX1 || intensityX1 || float || -x..0..+x ||1.0 | ||
|- | |- | ||
| {{GVI|arma2|1.00}} | | rowspan="2" | monochromatic || {{GVI|arma2|1.00}}{{GVI|arma2oa|1.50}} || monochromatic || bool|| false, true || true | ||
|- | |- | ||
| {{GVI|arma3|1.00}} | | {{GVI|arma3|1.00}} || monochromatic || integer || 0, 1 || 0 | ||
|} | |} | ||
Line 440: | Line 472: | ||
Defaults: | Defaults: | ||
<sqf> | {| class="wikitable" | ||
! {{GVI|arma3|1.00}} | |||
! {{GVI|arma2|1.00}}{{GVI|arma2oa|1.50}} | |||
|- | |||
| <sqf> | |||
_filmGrainHandle ppEffectAdjust [ | |||
0.005, | |||
1.25, | |||
2.01, | |||
0.75, | |||
1.0, | |||
0 | |||
]; | |||
</sqf> | |||
| <sqf> | |||
_filmGrainHandle ppEffectAdjust [ | _filmGrainHandle ppEffectAdjust [ | ||
0.005, | 0.005, | ||
1.25, | 1.25, | ||
2.01, | 2.01, | ||
0.75, | |||
1.0, | 1.0, | ||
true | true | ||
]; | ]; | ||
</sqf> | </sqf> | ||
|} | |||
Example: | Example: | ||
<sqf> | {| class="wikitable" | ||
["FilmGrain", 2000, [1, 0.15, 7, 0.2, 1.0, | ! {{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" | params ["_name", "_priority", "_effect"]; | ||
private _handle = -1; | |||
while { | while { | ||
_handle = ppEffectCreate [_name, _priority]; | _handle = ppEffectCreate [_name, _priority]; | ||
Line 465: | Line 519: | ||
_handle ppEffectAdjust _effect; | _handle ppEffectAdjust _effect; | ||
_handle ppEffectCommit 5; | _handle ppEffectCommit 5; | ||
waitUntil { ppEffectCommitted _handle }; | waitUntil { sleep 0.1; ppEffectCommitted _handle }; | ||
systemChat "admire effect for a sec"; | systemChat "admire effect for a sec"; | ||
uiSleep 3; | uiSleep 3; | ||
Line 472: | Line 526: | ||
}; | }; | ||
</sqf> | </sqf> | ||
| <sqf> | |||
["FilmGrain", 2000, [1, 0.15, 7, 0.2, 1.0, true]] spawn | |||
<sqf> | |||
["FilmGrain", 2000, [1, 0.15, 7, 0.2, 1.0, | |||
{ | { | ||
local _name = _this select 0; | |||
local _priority = _this select 1; | |||
local _effect = _this select 2; | |||
local _handle = -1; | |||
while { | while { | ||
_handle = ppEffectCreate [_name, _priority]; | _handle = ppEffectCreate [_name, _priority]; | ||
Line 487: | Line 542: | ||
_handle ppEffectAdjust _effect; | _handle ppEffectAdjust _effect; | ||
_handle ppEffectCommit 5; | _handle ppEffectCommit 5; | ||
waitUntil { ppEffectCommitted _handle }; | waitUntil { sleep 0.1; ppEffectCommitted _handle }; | ||
systemChat "admire effect for a sec"; | systemChat "admire effect for a sec"; | ||
uiSleep 3; | uiSleep 3; | ||
Line 494: | Line 549: | ||
}; | }; | ||
</sqf> | </sqf> | ||
|} | |||
=== ColorInversion === | === ColorInversion === |
Revision as of 02:08, 18 April 2023
Scripting Commands
Usage
Effect Creation
Effect Cancellation
Parameter Setup
Parameter application
Effect Permission
Check if Enabled
Example
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
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:
Defaults:
Example:
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:
Defaults:
Example:
WetDistortion
Title: "WetDistortion"; Base Priority: 300
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:
Defaults:
Example:
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, |
radial color (optional, Arma 3 only) major axis radius of ellipse |
float |
0..1 |
[ |
Syntax:
1.00 | 1.001.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:
1.00 | 1.001.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:
DynamicBlur
Title: "DynamicBlur"; Base Priority: 400
Parameter | Meaning | Type | Range | Defaults |
---|---|---|---|---|
value | blurriness | float | 0... | 0 |
Syntax:
Defaults:
Example:
FilmGrain
Title: "FilmGrain"; Base Priority: 2000
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 | 1.001.50 | monochromatic | bool | false, true | true |
1.00 | monochromatic | integer | 0, 1 | 0 |
Syntax:
Defaults:
1.00 | 1.001.50 |
---|---|
Example:
1.00 | 1.001.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:
Defaults:
Example:
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:
Defaults:
Example:
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. |
integer | -1..x | -1 |
Syntax:
Defaults:
Example:
Advanced effects
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
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:
Defaults:
Example:
HBAOPlus
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
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:
Defaults - depend on HBAO+ setting in Video Options:
Example: