{"name":"setAperture","title":"setAperture","type":"command","url":"https://community.bistudio.com/wiki/setAperture","revid":340862,"updated":"2023-05-12T17:05:48Z","groups":["Camera Control","Lights"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","locality":{"effect":"local"},"description":"Sets custom eye accommodation camera aperture.\n\n> [!NOTE]\n> If HDR is enabled, when setAperture `value` is used it also forces setApertureNew to the following values: [`value`, `value`, `value`, 1].\n> Execute setApertureNew after setAperture to override this default mechanic.\n\n> [!IMPORTANT]\n> 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.\n> Make sure you set it at the right time (see Example 2).","syntaxes":[{"syntax":"setAperture aperture","params":[{"name":"aperture","type":"Number","description":"aperture value; a value `<= 0` will set the aperture automatically. Maximum value which has an effect seems to be `100`.","type_expr":"Number"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"aperture"}}],"examples":[{"code":["setAperture 0.3;"]},{"code":["0 spawn { sleep 0.1; setAperture 100 };"]}],"see_also":["setApertureNew","apertureParams"],"notes":[{"user":"Namikaze","date":"2009-03-17T19:43:00Z","text":"The aperture value to simulate typical daylight (outdoor) conditions is 50. The aperture value to simulate typical daylight (indoor) conditions is 30.\nSetting the value to less than 20 will result in a very bright scene, suitable for night conditions.\nThe closer the number is to 0, the more light will be let into the lens, to carry on the aperture metaphor.\nDifferent lighting/weather conditions can change the actual indoor and outdoor aperture values. Experiment and test to be sure."}]}