setPiPEffect: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| TKOH |Game name=
| TKOH


|1.00|Game version=
|1.00


|gr1= Camera Control |GROUP1=
|gr1= Camera Control


| Sets Render Target's visual effect (Picture-in-Picture).  
| Sets Render Target's visual effect (Picture-in-Picture).  
Line 17: Line 17:
* 7: Thermal Inverted [7]
* 7: Thermal Inverted [7]
* 8: Green Thermal [8]
* 8: Green Thermal [8]
|DESCRIPTION=


| name '''setPiPEffect''' [effect, optionalParam1, ..., optionalParamN]|SYNTAX=


|p1= name : [[String]] - Render surface reference from [[Procedural_Textures#Render_To_Texture|Render To Texture]] |PARAMETER1=
| name '''setPiPEffect''' [effect, optionalParam1, ..., optionalParamN]
|p2= [effect, optionalParam1, ..., optionalParamN] : [[Array]] |PARAMETER2=
|p3= effect : [[Number]] - effect type |PARAMETER3=
|p4= optionalParam1: Parameters based on selected effect |PARAMETER4=


| [[Nothing]] |RETURNVALUE=
|p1= name : [[String]] - Render surface reference from [[Procedural_Textures#Render_To_Texture|Render To Texture]]
|p2= [effect, optionalParam1, ..., optionalParamN] : [[Array]]
|p3= effect : [[Number]] - effect type
|p4= optionalParam1: Parameters based on selected effect


|x1= <code>"rendersurface" [[setPiPEffect]] [0];</code> |Example1=
| [[Nothing]]
|x2= <code>"rendertarget0" [[setPiPEffect]] [3, 1.0, 1.0, 1.0, 0.0, [0.0, 1.0, 0.0, 0.25], [1.0, 0.0, 1.0, 1.0],  [0.199, 0.587, 0.114, 0.0]];</code> |EXAMPLE2=
 
|x1= <code>"rendersurface" [[setPiPEffect]] [0];</code>
|x2= <code>"rendertarget0" [[setPiPEffect]] [3, 1.0, 1.0, 1.0, 0.0, [0.0, 1.0, 0.0, 0.25], [1.0, 0.0, 1.0, 1.0],  [0.199, 0.587, 0.114, 0.0]];</code>
|x3= <code>cam = "camera" [[camCreate]] ([[player]] [[modelToWorld]] [0,-5,2]);
|x3= <code>cam = "camera" [[camCreate]] ([[player]] [[modelToWorld]] [0,-5,2]);
cam [[cameraEffect]] ["internal","back","rtt"];
cam [[cameraEffect]] ["internal","back","rtt"];
Line 38: Line 38:
pic [[ctrlCommit]] 0;
pic [[ctrlCommit]] 0;
pic [[ctrlSetText]] "#(argb,512,512,1)r2t(rtt,1.0)";
pic [[ctrlSetText]] "#(argb,512,512,1)r2t(rtt,1.0)";
};</code>|Example3=
};</code>
|x4= Black&White:<code>"rtt" [[setPiPEffect]] [3,1,1,0.4,0,[0,0,0,0],[1,1,1,0],[1,1,1,1]];</code> |EXAMPLE4=
|x4= Black&White:<code>"rtt" [[setPiPEffect]] [3,1,1,0.4,0,[0,0,0,0],[1,1,1,0],[1,1,1,1]];</code>


| [[Procedural Textures]], [[camCreate]], [[cameraEffect]], [[Post process effects]] |SEEALSO=
| [[Procedural Textures]], [[camCreate]], [[cameraEffect]], [[Post process effects]]


}}
}}

Revision as of 11:09, 18 January 2021

Hover & click on the images for description

Description

Description:
Sets Render Target's visual effect (Picture-in-Picture).
  • 0: Normal - [0]
  • 1: Night Vision - [1]
  • 2: Thermal - [2]
  • 3: Color Correction - [3, enabled, brightness, contrast, offset, blend [r,g,b,a], lerp [r,g,b,a], rgb [r,g,b,a]]
  • 4: Mirror - [4] <currently not working>
  • 5: Chromatic Aberration - [5, enabled, powerx, powery, (bool) aspectCorrection] <currently not working>
  • 6: Film Grain - [6, enabled, intensity, sharpness, grainsize, intensityx1, intensityx2, (bool) monochromatic] <currently not working>
  • 7: Thermal Inverted [7]
  • 8: Green Thermal [8]
Groups:
Camera Control

Syntax

Syntax:
name setPiPEffect [effect, optionalParam1, ..., optionalParamN]
Parameters:
name : String - Render surface reference from Render To Texture
[effect, optionalParam1, ..., optionalParamN] : Array
effect : Number - effect type
optionalParam1: Parameters based on selected effect
Return Value:
Nothing

Examples

Example 1:
"rendersurface" setPiPEffect [0];
Example 2:
"rendertarget0" setPiPEffect [3, 1.0, 1.0, 1.0, 0.0, [0.0, 1.0, 0.0, 0.25], [1.0, 0.0, 1.0, 1.0], [0.199, 0.587, 0.114, 0.0]];
Example 3:
cam = "camera" camCreate (player modelToWorld [0,-5,2]); cam cameraEffect ["internal","back","rtt"]; "rtt" setPiPEffect [2]; with uiNamespace do { pic = findDisplay 46 ctrlCreate ["RscPicture", -1]; pic ctrlSetPosition [0,0,1,1]; pic ctrlCommit 0; pic ctrlSetText "#(argb,512,512,1)r2t(rtt,1.0)"; };
Example 4:
Black&White:"rtt" setPiPEffect [3,1,1,0.4,0,[0,0,0,0],[1,1,1,0],[1,1,1,1]];

Additional Information

See also:
Procedural TexturescamCreatecameraEffectPost process effects

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on July 9, 2017 - 20:04 (UTC)
Killzone Kid
If Color Corrections effect has been used, going back to Normal will have no effect. In order to unset Color Corrections, set 2nd param in it (enable) to 0.