{"name":"Arma 3: CfgLights","title":"Arma 3: CfgLights","type":"topic","url":"https://community.bistudio.com/wiki/Arma_3:_CfgLights","revid":338449,"updated":"2023-03-08T10:14:29Z","aliases":[],"markdown":"Here is a template with some descriptions:\n\n```cpp\nclass CfgLights\n{\n    color[] = {0,0,1,1};        // Array of RGBA\n    diffuse[] = {0,0,1,1};        // Array of RGBA. Purpose unknown\n    ambient[] = {0,0.25,1,0.5};    // Array of RGBA\n    intensity = 25;                // Finite number between 0 and 1e10\n    brightness = 0.1;            // Only used if intensity isn't set. Also deprecated. intensity = (brightness*50)^2\n    class Attenuation\n    {\n        start = 1;                // distance with 100% intensity, falloff starts here\n        constant = 1;            // constant attenuation coef\n        linear = 1;                // linear attenuation coef\n        quadratic = 1;            // quadratic attenuation coef\n        hardLimitStart = 1e20 * 0.7; // max distance hard limit start (start of fading of intensity to 0) in meter – default is (1e20 * 0.7)\n        hardLimitEnd = 1e20;    // max distance hard limit end (end of fading of intensity to 0) in meter – default is 1e20\n    };\n    dayLight = 1;            // boolean (0/1). Is light shown during daylight.\n    useFlare = 1;            // boolean (0/1). Is light having a flare effect\n    irLight = 0;            // boolean (0/1). Is light visible normally or only with NVGs\n    flareSize = 1;            // Default is 1\n    flareMaxDistance = 600;    // Default is 600\n    position[] = {0,0,1};    // Position. Purpose unkown. Maybe some offset from the source.\n    shape = \"\";                // String. Purpose unknown.\n}\n```\n\nCommented parameters from engine source provided by reyhard\n\n```cpp\n/// distance with 100% intensity, falloff starts here\nfloat _startAttenuation;\n/// constant attenuation coef\nfloat _constantAttenuation;\n/// linear attenuation coef\nfloat _linearAttenuation;\n/// quadratic attenuation coef\nfloat _quadraticAttenuation;\n/// max distance hard limit start (start of fading of intensity to 0) in m\nfloat _hardLimitStart;\n/// max distance hard limit end (end of fading of intensity to 0) in m\nfloat _hardLimitEnd;\n\n/// outer angle in degrees\nfloat _outerAngle;\n/// inner angle in degrees\nfloat _innerAngle;\n/// fade coefficient between inner and outer angle (1.0f = linear)\nfloat _fadeCoef;\n\nbool _disabledInPIP;\n/// is light usable during day?\nbool _isDayLight;\n/// can we use flare for this light\"\nbool _useFlare;\n/// flare relative size for this light\nfloat _flareSize;\n/// max distance, where flare is visible (in meters)\nfloat _flareMaxDistance;\n\n/// light priority (higher value = higher priority)\n/// lights with higher priority are selected first\nint _priority;\n```","sections":[{"heading":null,"level":1,"markdown":"Here is a template with some descriptions:\n\n```cpp\nclass CfgLights\n{\n    color[] = {0,0,1,1};        // Array of RGBA\n    diffuse[] = {0,0,1,1};        // Array of RGBA. Purpose unknown\n    ambient[] = {0,0.25,1,0.5};    // Array of RGBA\n    intensity = 25;                // Finite number between 0 and 1e10\n    brightness = 0.1;            // Only used if intensity isn't set. Also deprecated. intensity = (brightness*50)^2\n    class Attenuation\n    {\n        start = 1;                // distance with 100% intensity, falloff starts here\n        constant = 1;            // constant attenuation coef\n        linear = 1;                // linear attenuation coef\n        quadratic = 1;            // quadratic attenuation coef\n        hardLimitStart = 1e20 * 0.7; // max distance hard limit start (start of fading of intensity to 0) in meter – default is (1e20 * 0.7)\n        hardLimitEnd = 1e20;    // max distance hard limit end (end of fading of intensity to 0) in meter – default is 1e20\n    };\n    dayLight = 1;            // boolean (0/1). Is light shown during daylight.\n    useFlare = 1;            // boolean (0/1). Is light having a flare effect\n    irLight = 0;            // boolean (0/1). Is light visible normally or only with NVGs\n    flareSize = 1;            // Default is 1\n    flareMaxDistance = 600;    // Default is 600\n    position[] = {0,0,1};    // Position. Purpose unkown. Maybe some offset from the source.\n    shape = \"\";                // String. Purpose unknown.\n}\n```\n\nCommented parameters from engine source provided by reyhard\n\n```cpp\n/// distance with 100% intensity, falloff starts here\nfloat _startAttenuation;\n/// constant attenuation coef\nfloat _constantAttenuation;\n/// linear attenuation coef\nfloat _linearAttenuation;\n/// quadratic attenuation coef\nfloat _quadraticAttenuation;\n/// max distance hard limit start (start of fading of intensity to 0) in m\nfloat _hardLimitStart;\n/// max distance hard limit end (end of fading of intensity to 0) in m\nfloat _hardLimitEnd;\n\n/// outer angle in degrees\nfloat _outerAngle;\n/// inner angle in degrees\nfloat _innerAngle;\n/// fade coefficient between inner and outer angle (1.0f = linear)\nfloat _fadeCoef;\n\nbool _disabledInPIP;\n/// is light usable during day?\nbool _isDayLight;\n/// can we use flare for this light\"\nbool _useFlare;\n/// flare relative size for this light\nfloat _flareSize;\n/// max distance, where flare is visible (in meters)\nfloat _flareMaxDistance;\n\n/// light priority (higher value = higher priority)\n/// lights with higher priority are selected first\nint _priority;\n```"}],"categories":["Arma 3: Reference Lists"],"groups":["Reference Lists"]}