setApertureNew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (formatting)
(25 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma3 |= Game name
|game1=  arma3
|eff= local|Multiplayer Effects=


|0.50|= Game version
|version1= 0.50
____________________________________________________________________________________________


| Sets custom camera aperture ([-1] to do it automatically).  |DESCRIPTION=
|eff= local
____________________________________________________________________________________________


| '''setApertureNew''' [min, std, max, stdLum] |SYNTAX=
|gr1= Camera Control


|p1= [min, std, max, stdLum]: [[Array]]  |PARAMETER1=  
|gr2= Lights


|p2= min: [[Number]]  |PARAMETER2=
|descr= Sets custom camera aperture when HDR is enabled ([-1] to do it automatically). <nowiki>`minimum` should be <= `standard` and <= `maximum`</nowiki>.
{{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.}}  


|p3= std: [[Number]]  |PARAMETER3=
|s1= '''setApertureNew''' [minimum, standard, maximum, luminance]


|p4= max: [[Number]] |PARAMETER4=
|p1= minimum: [[Number]] - Minimum aperture


|p5= stdLum: [[Number]] |PARAMETER5=
|p2= standard: [[Number]] - Standard aperture


| [[Nothing]] |RETURNVALUE=
|p3= maximum: [[Number]] - Maximum aperture


|p4= luminance: [[Number]] - Standard luminance


|x1= <code>[[setApertureNew]] [0.3, 0.2, 0.1, 1];</code>|EXAMPLE1=
|r1= [[Nothing]]
 
|x1= <code>[[setApertureNew]] [0.3, 0.2, 0.1, 1];</code>


|x2= Simulate eye adjustment at night:
|x2= Simulate eye adjustment at night:
<code>[[setDate]] [2016, 8, 10, 4, 0];
<code>[[setDate]] [2016, 8, 10, 4, 0];
[[setApertureNew]] [2, 8, 14, .9];</code> |EXAMPLE2=
[[setApertureNew]] [2, 8, 14, .9];</code>


|x3= Narrower range for a subtler effect:
|x3= Narrower range for a subtler effect:
<code>[[setDate]] [2016, 8, 10, 4, 0];
<code>[[setDate]] [2016, 8, 10, 4, 0];
[[setApertureNew]] [2, 5, 9, .8];</code> |EXAMPLE3=
[[setApertureNew]] [2, 5, 9, .8];</code>
 
____________________________________________________________________________________________
 
| [[setAperture]] |SEEALSO=


| |MPBEHAVIOUR=  
|seealso= [[setAperture]] [[apertureParams]]
____________________________________________________________________________________________
}}
}}


<h3 style='display:none'>Notes</h3>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style='display:none'>Bottom Section</h3>
[[Category:Arma 3: New Scripting Commands List|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
<!-- CONTINUE Notes -->
<dl class="command_description">
<dl class="command_description">
<dt></dt>
<dd class="notedate">Posted on October 30, 2016 - 04:54 (UTC)</dd>
<dd class="notedate">Posted on October 30, 2016 - 04:54 (UTC)</dd>
<dt class="note">[[User:Tofof|Tofof]]</dt>
<dt class="note">[[User:Tofof|Tofof]]</dt>
Line 70: Line 53:
</dd>
</dd>
</dl>
</dl>
<!-- DISCONTINUE Notes -->

Revision as of 16:02, 16 April 2021

Hover & click on the images for description

Description

Description:
Sets custom camera aperture when HDR is enabled ([-1] to do it automatically). `minimum` should be <= `standard` and <= `maximum`.
If HDR is enabled (it is enabled by default), 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.
Groups:
Camera ControlLights

Syntax

Syntax:
setApertureNew [minimum, standard, maximum, luminance]
Parameters:
minimum: Number - Minimum aperture
standard: Number - Standard aperture
maximum: Number - Maximum aperture
luminance: Number - Standard luminance
Return Value:
Nothing

Examples

Example 1:
setApertureNew [0.3, 0.2, 0.1, 1];
Example 2:
Simulate eye adjustment at night: setDate [2016, 8, 10, 4, 0]; setApertureNew [2, 8, 14, .9];
Example 3:
Narrower range for a subtler effect: setDate [2016, 8, 10, 4, 0]; setApertureNew [2, 5, 9, .8];

Additional Information

See also:
setAperture 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
Posted on October 30, 2016 - 04:54 (UTC)
Tofof
Some notes on example 2 - try it outdoors on a piece of ground with high contrasting areas. I suggest the end of a runway, standing among the white painted triangles.

Look up about 60 degrees above the horizon and toggle between setApertureNew [2, 8, 14, .9]; and the default setting of setAperture -1;. There should be little change -- at least on the date in the example.

Reset again to setApertureNew [2, 8, 14, .9]; and then pan slowly down until you're basically looking at your feet. The less sky (the main outdoor light source) you see, the 'wider' (toward the 'min' number) the aperture will become. Looking at the ground on a runway, for example, you should be able to easily distinguish the painted white triangles from the unpainted pavement. Again, toggle back to the default aperture. The view should get much darker.

This setting allows for some natural adjustment based on the amount of visible light in the scene, and is highly encouraged over the default fixed aperature for night missions. When you're standing in the beam of a lighthouse, for example (try near the 'Spartan' on Stratis), you will be basically unable to see anything not illuminated by the beam. Once the beam passes and your vision returns to normal, your immediate surroundings will be dimmer, of course, but you'll be able to see further out.