reflectors: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 20: Line 20:
class Reflectors
class Reflectors
{
{
class Left  
class Left //main landing light
{
{
position = "L svetlo";
position = "L svetlo";
Line 26: Line 26:
hitpoint = "L svetlo";
hitpoint = "L svetlo";
selection = "L svetlo";
selection = "L svetlo";
color[] = {7000,7500,10000};
color[] = {7000,7500,10000}; //R,G,B
ambient[] = {70,75,100};
ambient[] = {70,75,100}; //R,G,B
intensity = 50;
intensity = 50;
size = 1;
size = 1;

Revision as of 14:56, 18 May 2016

Hover & click on the images for description

Description

Description:
Add a light to an object in class cfgvehicles.
Groups:
Uncategorised

Syntax

Syntax:
position: memorypoint - memory point in the vehicle where the light will show
Return Value:
Return value needed

Examples

Example 1:
class Reflectors { class Left //main landing light { position = "L svetlo"; direction = "konec L svetla"; hitpoint = "L svetlo"; selection = "L svetlo"; color[] = {7000,7500,10000}; //R,G,B ambient[] = {70,75,100}; //R,G,B intensity = 50; size = 1; innerAngle = 15; outerAngle = 65; coneFadeCoef = 10; useFlare = 1; flareSize = 10; flareMaxDistance = 250; dayLight = 0; class Attenuation { start = 0; constant = 0; linear = 1; quadratic = 1; hardLimitStart = 100; hardLimitEnd = 200; }; }; class LG: Left //left door gunner searchlight { position = "LG svetlo"; direction = "konec LG svetla"; hitpoint = "LG svetlo"; selection = "LG svetlo"; }; class Right: Left //right door gunner searchlight { position = "P svetlo"; direction = "konec P svetla"; hitpoint = "P svetlo"; selection = "P svetlo"; }; };
Example 2:
example red cabin light in helicopter class Cabin { position = "cabin_light"; direction = "cabin_light_dir"; hitpoint = "cabin_light"; selection = "cabin_light"; color[] = {1000,0,0}; ambient[] = {100,0,0}; intensity = 5; size = 1; innerAngle = 15; outerAngle = 150; coneFadeCoef = 1; useFlare = 1; flareSize = 0.1; flareMaxDistance = 1; dayLight = 0; class Attenuation { start = 0; constant = 0; linear = 1; quadratic = 1; hardLimitStart = 1; hardLimitEnd = 2; }; };

Additional Information

See also:
See also needed

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

Notes

Posted on May 18, 2016 - 11:51
Eggbeast
Notes for Arma 3: The memory point you assign to position parameter is where the light source itself will be.
The one you put to direction is the way your light will shine.
The cone itself is set using innerAngle, outerAngle and coneFadeCoef.
innerAngle sets the cone in which the light has it's full intensity.
outerAngle sets the cone outside of which the light has zero intensity.
coneFadeCoef is a coefficient that describes attenuation of the light between innerAngle and outerAngle. 1 equals linear attenuation, higher or lower value changes it, meaning how sharp/blurred will the edge of the lightcone as a whole be.
Note that both the angles represent full angle of the cone, not just "angular offset" from direction of the light. If you set it to 90 degrees, it means the cone is 45 degrees to the "left" and 45 to the "right" of the direction specified by your memory points.
as a spot light, reflectors are not made for cones above 180 degrees.
Some time ago BIS made changes to the lighting system to allow for higher light variety during night time. One of the effects it had on configs of lights was that you need to set higher intensity than before the change to get the same results.
color[] and ambient[] seem to have changed from RGB from 0-1 to way higher values - see example.
See also [1]
(sorry i am crap at formatting these pages, but felt we needed to start on this topic!)

Bottom Section

Posted on May 18, 2016 - 13:50 (UTC)
Eggbeast
aggregateReflectors are described here https://manuals.bisimulations.com/vbs3/3-6/devref/Content/Config_Manual/CfgVehicles/A_cpp/cpp_aggregateReflectors.htm