CfgLights – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Attenuation subclass)
(Added more infos coming from Reyhard)
Line 5: Line 5:
  class CfgLights
  class CfgLights
  {
  {
     color[] = {0,0,1,1}; // Array of RGBA
     color[] = {0,0,1,1}; // Array of RGBA
     ambient[] = {0,0.25,1,0.5}; // Array of RGBA
     ambient[] = {0,0.25,1,0.5}; // Array of RGBA
     intensity = 25; // Finite number between 0 and 1e10
     intensity = 25; // Finite number between 0 and 1e10
     brightness = 0.1; // Only used if intensity isn't set. Also deprecated. intensity = (brightness*50)^2
     brightness = 0.1; // Only used if intensity isn't set. Also deprecated. intensity = (brightness*50)^2
     class Attenuation {
     class Attenuation {
         start = 1; // number
         start = 1; // distance with 100% intensity, falloff starts here
         constant = 1; // number
         constant = 1; // constant attenuation coef
         linear = 1; // number
         linear = 1; // linear attenuation coef
         quadratic = 1; // number
         quadratic = 1; // quadratic attenuation coef
         hardLimitStart = 1e20*0.7; // Default is (1e20 * 0.7)
         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; // Default is 1e20
         hardLimitEnd = 1e20; // max distance hard limit end (end of fading of intensity to 0) in meter – default is 1e20
     };
     };
     dayLight = 1; // number but handled as boolean internally. 0 == false, everything else == true
    disabledInPIP = 0; // boolean (0/1). Is light rendered in PiP (e.g in car mirrors)
     useFlare = 1; // number/boolean. same as above.
     dayLight = 1; // boolean (0/1). Is light shown during daylight.
     flareSize = 1; // number. Default is 1
     useFlare = 1; // boolean (0/1). Is light having a flare effect
     flareMaxDistance = 600; // number. Default is 600
     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 */
    // outerAngle = 5.0; // outer angle in degrees
    // innerAngle = 1.0; // inner angle in degrees
    // fadeCoef = 1.0; // fade coefficient between inner and outer angle (1.0f = linear)
  }
  }



Revision as of 17:17, 21 February 2018

CfgLights

Here is a template with some descriptions:

class CfgLights
{
   color[] = {0,0,1,1};			// Array of RGBA
   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
   };
   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 */
   // outerAngle = 5.0;			// outer angle in degrees
   // innerAngle = 1.0;			// inner angle in degrees
   // fadeCoef = 1.0;			// fade coefficient between inner and outer angle (1.0f = linear)
}