setAperture: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Comments" to "|Comments=")
m (command group)
(30 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|eff= local|Multiplayer Effects=


|1.00|= Game version
|version1= 1.00
____________________________________________________________________________________________


| Sets custom camera aperture (-1 to do it automatically). |DESCRIPTION=
|game2= arma2
____________________________________________________________________________________________


| '''setAperture''' aperture |SYNTAX=
|version2= 1.00


|p1= aperture: [[Number]] |PARAMETER1=
|game3= arma2oa


| [[Nothing]] |RETURNVALUE=
|version3= 1.51
____________________________________________________________________________________________
 
|game4= tkoh
 
|version4= 1.00
 
|game5= arma3
 
|version5= 0.50
 
|eff= local
 
|gr1= Camera Control
 
|gr2= Lights
 
|descr= Sets custom eye accommodation camera aperture.
 
{{Feature | Informative | If HDR is enabled, when [[setAperture]] <tt>value</tt> is used it also forces [[setApertureNew]] to the following values: [<tt>value</tt>, <tt>value</tt>, <tt>value</tt>, 1]. Execute [[setApertureNew]] after [[setAperture]] to override this default mechanic.}} 
{{Feature | important | The aperture is set to default by the engine at the mission start. If you set it before the mission started it will reset like it never happened. Make sure you set it at the right time (see Example 2)}}
 
|s1= '''setAperture''' aperture
 
|p1= aperture: [[Number]] - Aperture value. If {{ic|-1}} is provided the engine will set the aperture automatically
 
|r1= [[Nothing]]
   
   
|x1= <code>[[setAperture]] 0.3;</code> |EXAMPLE1=
|x1= <code>[[setAperture]] 0.3;</code>
____________________________________________________________________________________________


| [[setApertureNew]] |SEEALSO=
|x2= <code>[] [[spawn]] { [[sleep]] 0.2; [[setAperture]] 100 };</code>


|seealso= [[setApertureNew]] [[apertureParams]]
}}
}}


<h3 style="display:none">Notes</h3>
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<dt class="note">[[User:Namikaze|Namikaze]]</dt>
<dt class="note">[[User:Namikaze|Namikaze]]
<dd class="note">The aperture value to simulate typical daylight (outdoor) conditions is 50.  The aperture value to simulate typical daylight (indoor) conditions is 30.  Setting the value to less than 20 will result in a very bright scene, suitable for night conditions.  The closer the number is to 0, the more light will be let into the lens, to carry on the aperture metaphor.  Different lighting/weather conditions can change the actual indoor and outdoor aperture values.  Experiment and test to be sure.
<dd class="note">The aperture value to simulate typical daylight (outdoor) conditions is 50.  The aperture value to simulate typical daylight (indoor) conditions is 30.  Setting the value to less than 20 will result in a very bright scene, suitable for night conditions.  The closer the number is to 0, the more light will be let into the lens, to carry on the aperture metaphor.  Different lighting/weather conditions can change the actual indoor and outdoor aperture values.  Experiment and test to be sure.
<!-- Note Section END -->
</dl>
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|SETAPERTURE]]
[[Category:Scripting Commands OFP Elite |SETAPERTURE]]
[[Category:Scripting Commands ArmA|SETAPERTURE]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]

Revision as of 16:01, 16 April 2021

Hover & click on the images for description

Description

Description:
Sets custom eye accommodation camera aperture.
If HDR is enabled, when setAperture value is used it also forces setApertureNew to the following values: [value, value, value, 1]. Execute setApertureNew after setAperture to override this default mechanic.
The aperture is set to default by the engine at the mission start. If you set it before the mission started it will reset like it never happened. Make sure you set it at the right time (see Example 2)
Groups:
Camera ControlLights

Syntax

Syntax:
setAperture aperture
Parameters:
aperture: Number - Aperture value. If -1 is provided the engine will set the aperture automatically
Return Value:
Nothing

Examples

Example 1:
setAperture 0.3;
Example 2:
[] spawn { sleep 0.2; setAperture 100 };

Additional Information

See also:
setApertureNew apertureParams

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
Namikaze
The aperture value to simulate typical daylight (outdoor) conditions is 50. The aperture value to simulate typical daylight (indoor) conditions is 30. Setting the value to less than 20 will result in a very bright scene, suitable for night conditions. The closer the number is to 0, the more light will be let into the lens, to carry on the aperture metaphor. Different lighting/weather conditions can change the actual indoor and outdoor aperture values. Experiment and test to be sure.