CfgLights – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
(Added more infos coming from Reyhard)
(Added irLight)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= CfgLights =
Here is a template with some descriptions:


Here is a template with some descriptions:
<syntaxhighlight lang="cpp">
class CfgLights
{
color[] = {0,0,1,1}; // Array of RGBA
diffuse[] = {0,0,1,1}; // Array of RGBA. Purpose unknown
ambient[] = {0,0.25,1,0.5}; // Array of RGBA
intensity = 25; // Finite number between 0 and 1e10
brightness = 0.1; // Only used if intensity isn't set. Also deprecated. intensity = (brightness*50)^2
class Attenuation
{
start = 1; // distance with 100% intensity, falloff starts here
constant = 1; // constant attenuation coef
linear = 1; // linear attenuation coef
quadratic = 1; // quadratic attenuation coef
hardLimitStart = 1e20 * 0.7; // max distance hard limit start (start of fading of intensity to 0) in meter – default is (1e20 * 0.7)
hardLimitEnd = 1e20; // max distance hard limit end (end of fading of intensity to 0) in meter – default is 1e20
};
dayLight = 1; // boolean (0/1). Is light shown during daylight.
useFlare = 1; // boolean (0/1). Is light having a flare effect
irLight = 0; // boolean (0/1). Is light visible normally or only with NVGs
flareSize = 1; // Default is 1
flareMaxDistance = 600; // Default is 600
position[] = {0,0,1}; // Position. Purpose unkown. Maybe some offset from the source.
shape = ""; // String. Purpose unknown.
}
</syntaxhighlight>


class CfgLights
Commented parameters from engine source provided by reyhard
{
<syntaxhighlight lang="cpp">
    color[] = {0,0,1,1}; // Array of RGBA
/// distance with 100% intensity, falloff starts here
    ambient[] = {0,0.25,1,0.5}; // Array of RGBA
float _startAttenuation;
    intensity = 25; // Finite number between 0 and 1e10
/// constant attenuation coef
    brightness = 0.1; // Only used if intensity isn't set. Also deprecated. intensity = (brightness*50)^2
float _constantAttenuation;
    class Attenuation {
/// linear attenuation coef
        start = 1; // distance with 100% intensity, falloff starts here
float _linearAttenuation;
        constant = 1; // constant attenuation coef
/// quadratic attenuation coef
        linear = 1; // linear attenuation coef
float _quadraticAttenuation;
        quadratic = 1; // quadratic attenuation coef
/// max distance hard limit start (start of fading of intensity to 0) in m
        hardLimitStart = 1e20*0.7; // max distance hard limit start (start of fading of intensity to 0) in meter – default is (1e20 * 0.7)
float _hardLimitStart;
        hardLimitEnd = 1e20; // max distance hard limit end (end of fading of intensity to 0) in meter – default is 1e20
/// max distance hard limit end (end of fading of intensity to 0) in m
    };
float _hardLimitEnd;
    disabledInPIP = 0; // boolean (0/1). Is light rendered in PiP (e.g in car mirrors)
    dayLight = 1; // boolean (0/1). Is light shown during daylight.
    useFlare = 1; // boolean (0/1). Is light having a flare effect
    flareSize = 1; // Default is 1
    flareMaxDistance = 600; // Default is 600
    priority = 999; // Lights with higher priority are selected first (in case of too many lights in the scene)
   
   
    /* unknown or undocumented parameters */
/// outer angle in degrees
    // outerAngle = 5.0; // outer angle in degrees
float _outerAngle;
    // innerAngle = 1.0; // inner angle in degrees
/// inner angle in degrees
    // fadeCoef = 1.0; // fade coefficient between inner and outer angle (1.0f = linear)
float _innerAngle;
}
/// fade coefficient between inner and outer angle (1.0f = linear)
float _fadeCoef;
 
bool _disabledInPIP;
/// is light usable during day?
bool _isDayLight;
/// can we use flare for this light"
bool _useFlare;
/// flare relative size for this light
float _flareSize;
/// max distance, where flare is visible (in meters)
float _flareMaxDistance;
 
/// light priority (higher value = higher priority)
/// lights with higher priority are selected first
int _priority;
</syntaxhighlight>
 


[[Category:CfgLights]]
{{GameCategory|arma3|Reference Lists}}
[[Category:Arma 3: Editing]]
[[Category:Reference Lists]]

Latest revision as of 12:14, 8 March 2023

Here is a template with some descriptions:

class CfgLights
{
	color[] = {0,0,1,1};		// Array of RGBA
	diffuse[] = {0,0,1,1};		// Array of RGBA. Purpose unknown
	ambient[] = {0,0.25,1,0.5};	// Array of RGBA
	intensity = 25;				// Finite number between 0 and 1e10
	brightness = 0.1;			// Only used if intensity isn't set. Also deprecated. intensity = (brightness*50)^2
	class Attenuation
	{
		start = 1;				// distance with 100% intensity, falloff starts here
		constant = 1;			// constant attenuation coef
		linear = 1;				// linear attenuation coef
		quadratic = 1;			// quadratic attenuation coef
		hardLimitStart = 1e20 * 0.7; // max distance hard limit start (start of fading of intensity to 0) in meter – default is (1e20 * 0.7)
		hardLimitEnd = 1e20;	// max distance hard limit end (end of fading of intensity to 0) in meter – default is 1e20
	};
	dayLight = 1;			// boolean (0/1). Is light shown during daylight.
	useFlare = 1;			// boolean (0/1). Is light having a flare effect
	irLight = 0;			// boolean (0/1). Is light visible normally or only with NVGs
	flareSize = 1;			// Default is 1
	flareMaxDistance = 600;	// Default is 600
	position[] = {0,0,1};	// Position. Purpose unkown. Maybe some offset from the source.
	shape = "";				// String. Purpose unknown.
}

Commented parameters from engine source provided by reyhard

/// distance with 100% intensity, falloff starts here
float _startAttenuation;
/// constant attenuation coef
float _constantAttenuation;
/// linear attenuation coef
float _linearAttenuation;
/// quadratic attenuation coef
float _quadraticAttenuation;
/// max distance hard limit start (start of fading of intensity to 0) in m
float _hardLimitStart;
/// max distance hard limit end (end of fading of intensity to 0) in m
float _hardLimitEnd;
 
/// outer angle in degrees
float _outerAngle;
/// inner angle in degrees
float _innerAngle;
/// fade coefficient between inner and outer angle (1.0f = linear)
float _fadeCoef;

bool _disabledInPIP;
/// is light usable during day?
bool _isDayLight;
/// can we use flare for this light"
bool _useFlare;
/// flare relative size for this light
float _flareSize;
/// max distance, where flare is visible (in meters)
float _flareMaxDistance;

/// light priority (higher value = higher priority)
/// lights with higher priority are selected first
int _priority;