setAperture: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (Some wiki formatting)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| arma1
|game1= arma1
|version1= 1.00
 
|game2= arma2
|version2= 1.00
 
|game3= arma2oa
|version3= 1.50
 
|game4= tkoh
|version4= 1.00
 
|game5= arma3
|version5= 0.50
 
|eff= local
|eff= local
|1.00


|gr1= Camera Control
|gr1= Camera Control


| Sets custom eye accommodation camera aperture (-1 to do it automatically).
|gr2= Lights


{{Feature | Informative | If HDR is enabled (it is enabled by default), 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.}} 
|descr= Sets custom eye accommodation camera aperture.
{{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)}}


| '''setAperture''' aperture
{{Feature|informative|
If HDR is enabled, when [[setAperture]] {{hl|value}} is used it also forces [[setApertureNew]] to the following values: [{{hl|value}}, {{hl|value}}, {{hl|value}}, 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 {{Link|#Example 2}}).
}}


|p1= aperture: [[Number]]
|s1= [[setAperture]] aperture


| [[Nothing]]
|p1= aperture: [[Number]] - aperture value; a value {{hl|c= <= 0}} will set the aperture automatically. Maximum value which has an effect seems to be {{hl|100}}.
 
|x1= <code>[[setAperture]] 0.3;</code>
|x2= <code>[] [[spawn]] { [[waitUntil]] { [[time]] > 0.1 }; [[setAperture]] 100 };</code>


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


<dl class="command_description">
|x1= <sqf>setAperture 0.3;</sqf>
<!-- Note Section BEGIN -->
<dt class="note">[[User:Namikaze|Namikaze]]</dt>
<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 -->
|x2= <sqf>0 spawn { sleep 0.1; setAperture 100 };</sqf>
</dl>


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


{{GameCategory|ofpe|Scripting Commands}}
{{Note
{{GameCategory|arma1|Scripting Commands}}
|user= Namikaze
{{GameCategory|arma2|Scripting Commands}}
|timestamp= 20090317194300
{{GameCategory|arma3|Scripting Commands}}
|text= The aperture value to simulate typical daylight (outdoor) conditions is 50. The aperture value to simulate typical daylight (indoor) conditions is 30.
{{GameCategory|tkoh|Scripting Commands}}
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.
}}

Latest revision as of 19:05, 12 May 2023

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; a value <= 0 will set the aperture automatically. Maximum value which has an effect seems to be 100.
Return Value:
Nothing

Examples

Example 1:
setAperture 0.3;
Example 2:
0 spawn { sleep 0.1; 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 - c
Posted on Mar 17, 2009 - 19:43 (UTC)
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.