setApertureNew: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<tt>([a-zA-Z0-9\. _"']+)<\/tt>" to "{{hl|$1}}")
m (Some wiki formatting)
 
(7 intermediate revisions by 2 users not shown)
Line 10: Line 10:
|gr2= Lights
|gr2= Lights


|descr= Sets custom camera aperture when HDR is enabled ([-1] to do it automatically). <nowiki>`minimum` should be <= `standard` and <= `maximum`</nowiki>.
|descr= Sets custom camera aperture when HDR is enabled. Provided values should be set such as ''minimum'' &lte; ''standard'' &lte; ''maximum''.
{{Feature | Informative | If HDR is enabled (it is enabled by default), 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|informative|
* This command has to be executed after mission start: be sure to use e.g <sqf inline>sleep 0.1;</sqf> for it to take effect.
* If HDR is enabled (it is by default), 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.
}}


|s1= [[setApertureNew]] [minimum, standard, maximum, luminance]
|s1= [[setApertureNew]] [minimum, standard, maximum, luminance]


|p1= minimum: [[Number]] - Minimum aperture
|p1= minimum: [[Number]] - minimum aperture


|p2= standard: [[Number]] - Standard aperture
|p2= standard: [[Number]] - standard aperture


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


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


|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>[[setApertureNew]] [0.3, 0.2, 0.1, 1];</code>
|x1= <sqf>
setApertureNew [0.1, 0.2, 0.3, 1];
setApertureNew [-1]; // reset to default
</sqf>


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


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


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


<dl class="command_description">
{{Note
 
|user= Tofof
<dt></dt>
|timestamp= 20161030045400
<dd class="notedate">Posted on October 30, 2016 - 04:54 (UTC)</dd>
|text= Some notes on {{Link|#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.<br><br>
<dt class="note">[[User:Tofof|Tofof]]</dt>
Look up about 60 degrees above the horizon and toggle between {{hl|setApertureNew [2, 8, 14, .9];}} and the default setting of {{hl|setAperture -1;}}. There should be little change -- at least on the date in the example.<br><br>
<dd class="note">
Reset again to {{hl|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.<br><br>
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.
<br><br>
Look up about 60 degrees above the horizon and toggle between <tt>setApertureNew [2, 8, 14, .9];</tt> and the default setting of <tt>setAperture -1;</tt>. There should be little change -- at least on the date in the example.  
<br><br>
Reset again to <tt>setApertureNew [2, 8, 14, .9];</tt> 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.
<br><br>
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.
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.
</dd>
}}
 
</dl>

Latest revision as of 15:50, 25 August 2023

Hover & click on the images for description

Description

Description:
Sets custom camera aperture when HDR is enabled. Provided values should be set such as minimum &lte; standard &lte; maximum.
  • This command has to be executed after mission start: be sure to use e.g sleep 0.1; for it to take effect.
  • If HDR is enabled (it is 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.1, 0.2, 0.3, 1]; setApertureNew [-1]; // reset to default
Example 2:
Simulate eye adjustment at night:
setDate [2016, 8, 10, 4, 0]; setApertureNew [2, 8, 14, 0.9];
Example 3:
Narrower range for a subtler effect:
setDate [2016, 8, 10, 4, 0]; setApertureNew [2, 5, 9, 0.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
Tofof - c
Posted on Oct 30, 2016 - 04:54 (UTC)
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.