User Tools

Site Tools


arma3:terrain:v1-60-visual-upgrade-lighting-config

ArmA 3 Terrain Lighting Visual Upgrade

“ArmA 3 Terrain Lighting Visual Upgrade” page is work in progress, if you can help please contact us.

ArmA 3 v1.60 Visual Upgrade aka lighting upgrade that broke all user made terrains :)

In ArmA 3 v1.60 bis changed the terrain lighting pretty much completely. Many user made terrains went belly up with their lighting as skies turned black and all kinds of weird problems how terrain looks.

This page attempts to teach you how to fix arma3 lighting in user made custom terrains.

Altis and Stratis Satellites

On official terrains bis turned down the satellite texture brightness a lot in v1.60 visual upgrade. Here is example satellite textures for both of them.

Images are 4096 x 4096 resolution and over 2 megabytes each so you have to open them manually.
Altis: v1.58 and v1.60
Stratis: v1.58 and v1.60

Pennyworth was kind enought to share his bis altis and stratis satellite images for comparison, thanks.

Satellite Texture

Open your satellite texture in photoshop / gimp, add adjustment layer for brightness / contrast. Pull brightness slider to -100 value (photoshop, dunno what equivalent is in gimp) and you can experiment with contrast but mostly it could be left alone.

Naturally you should experiment which value works for YOUR satellite texture the best, but -100 brightness is good starting point.

Config.cpp

There are a lot of new config values in visual upgrade.

What you are about to read below is a mis-mash of various user tips and configs posted in bis forums. I try to separate them into individual configs so you can pick and choose what if any to use.

New values which should adjust satellite brightness:

/// maximal darkening coef for blending of satellite map and detail map on terrain (default = 0.0f, no darkening = 1.0f}
terrainBlendMaxDarkenCoef = 1.0f;
 
/// maximal brightening coef for blending of satellite map and detail map on terrain (default = 1.0f, no brightening = 0.0f)
terrainBlendMaxBrightenCoef = 0.0f;

Greenberet40 posted

skyColorInfluencesFogColor = 1;
tonemapMethod = 0;
 
class HDRNewPars
{
	minAperture = 1e-005;
	maxAperture = 256;
	apertureRatioMax = 4;
	apertureRatioMin = 10;
	bloomImageScale = 1;
	bloomScale = 0.3;
	bloomExponent = 1;
	bloomLuminanceOffset = 0.8;
	bloomLuminanceScale = 1;
	bloomLuminanceExponent = 1.2;
	tonemapMethod = 2;
	tonemapShoulderStrength = 0.22;
	tonemapLinearStrength = 0.3;
	tonemapLinearAngle = 0.1;
	tonemapToeStrength = 0.2;
	tonemapToeNumerator = 0.01;
	tonemapToeDenominator = 0.3;
	tonemapLinearWhite = 11.2;
	tonemapExposureBias = 2;
	tonemapLinearWhiteReinhard = "2.5f";
	nvgApertureMin = 1;
	nvgApertureStandard = 7;
	nvgApertureMax = 15;
	nvgStandardAvgLum = 3;
	nvgLightGain = 100;
	nvgTransition = 1;
	nvgTransitionCoefOn = "40.0f";
	nvgTransitionCoefOff = "0.01f";
	nightShiftMinAperture = 0;
	nightShiftMaxAperture = 0.002;
	nightShiftMaxEffect = 0.6;
	nightShiftLuminanceScale = 600;
	eyeAdaptFactorLight = 0.6;
	eyeAdaptFactorDark = 0.2;
};

IceBreakrs image of above config: i.imgur.com_v5o1gp3.jpg

t-800a posted

class HDRNewPars : HDRNewPars
{
	minAperture = 1e-005;
	maxAperture = 256;
	apertureRatioMax = 4;
	apertureRatioMin = 10;
	bloomImageScale = 1;
	bloomScale = 0.09;
	bloomExponent = 0.75;
	bloomLuminanceOffset = 0.4;
	bloomLuminanceScale = 0.15;
	bloomLuminanceExponent = 0.25;
	tonemapMethod = 1;
	tonemapShoulderStrength = 0.22;
	tonemapLinearStrength = 0.12;
	tonemapLinearAngle = 0.1;
	tonemapToeStrength = 0.2;
	tonemapToeNumerator = 0.022;
	tonemapToeDenominator = 0.2;
	tonemapLinearWhite = 11.2;
	tonemapExposureBias = 1;
	tonemapLinearWhiteReinhard = "2.5f";
	eyeAdaptFactorLight = 3.3;
	eyeAdaptFactorDark = 0.75;
	nvgApertureMin = 10;
	nvgApertureStandard = 12.5;
	nvgApertureMax = 16.5;
	nvgStandardAvgLum = 10;
	nvgLightGain = 320;
	nvgTransition = 1;
	nvgTransitionCoefOn = "40.0f";
	nvgTransitionCoefOff = "0.01f";
	nightShiftMinAperture = 0;
	nightShiftMaxAperture = 0.002;
	nightShiftMaxEffect = 0.6;
	nightShiftLuminanceScale = 600;
};

and

#define __aperture(VAL1,VAL2,VAL3) apertureMin = VAL1; \
	apertureStandard = VAL2; \
	apertureMax = VAL3 \

class ThunderboltNorm :ThunderboltNorm {};
class ThunderboltHeavy : ThunderboltHeavy {};
class Lighting : Lighting {};
class Overcast : Overcast {};
 
class LightingNew : LightingNew
{
	class Lighting0 : Lighting0 {
		__aperture(4,4,8);
	};
 
	class Lighting1 : Lighting1 {
		__aperture(4,4,8);
	};
 
	class Lighting2 : Lighting2 {
		__aperture(4,4,8);
	};
 
	class Lighting3 : Lighting3 {
		__aperture(4,5,10);
	};
 
	class Lighting4 : Lighting4 {
		__aperture(5,6,18);
	};
 
	class Lighting5 : Lighting5 {
		__aperture(6,8,20);
	};
 
	class Lighting6 : Lighting6 {
		__aperture(7,9,22);
 
		diffuse[]		= {{0.75, 0.38, 0.22}, 6.6 };
		diffuseCloud[]		= {{0.75, 0.38, 0.22}, 6.0 };
	};
 
	class Lighting7 : Lighting7 {
		__aperture(8,10,22);
 
		diffuse[]		= {{0.95, 0.42, 0.22}, 9.2 };
		diffuseCloud[]		= {{0.95, 0.42, 0.22}, 8.4 };
	};
 
	class Lighting8 : Lighting8 {
		__aperture(8,16,26);
 
		diffuse[]		= {{0.95, 0.55, 0.35}, 11.2 };
		diffuseCloud[]		= {{0.95, 0.55, 0.35}, 10.2 };
	};
 
	class Lighting9 : Lighting9 {
		__aperture(20,25,35);
 
		diffuse[]		= {{1, 0.65, 0.45}, 13.5 };
		diffuseCloud[]		= {{1, 0.65, 0.45}, 12.3 };
	};
 
	class Lighting10 : Lighting10 {
		__aperture(45,60,80);
 
		diffuse[]		= {{1, 0.75, 0.62}, 17.4 };
		diffuseCloud[]		= {{1, 0.75, 0.62}, 15.8 };
	};
 
	class Lighting11 : Lighting11 {
		__aperture(70,100,120);
 
		diffuse[]		= {{1, 0.92, 0.72}, 18.9 };
		diffuseCloud[]		= {{1, 0.92, 0.72}, 17.2 };
	};
 
	class Lighting12 : Lighting12 {
		__aperture(70,100,120);
 
		diffuse[]		= {{1, 0.95, 0.77}, 18.9 };
		diffuseCloud[]		= {{1, 0.95, 0.77}, 17.2 };
	};
 
	class Lighting13 : Lighting13 {
		__aperture(5,5,10);
	};
 
	class Lighting14 : Lighting14 {
		__aperture(5,5,10);
	};
 
	class Lighting15 : Lighting15 {
		__aperture(5,5,10);
	};
 
	class Lighting16 : Lighting16 {
		__aperture(5,7,13);
	};
 
	class Lighting17 : Lighting17 {
		__aperture(7,8,23);
	};
 
	class Lighting18 : Lighting18 {
		__aperture(8,10,26);
	};
 
	class Lighting19 : Lighting19 {
		__aperture(9,12,29);
 
		diffuse[]		= {{0.75, 0.38, 0.22}, 3.3 };
		diffuseCloud[]		= {{0.75, 0.38, 0.22}, 3.0 };
	};
 
	class Lighting20 : Lighting20 {
		__aperture(10,13,31);
 
		diffuse[]		= {{0.95, 0.42, 0.22}, 4.6 };
		diffuseCloud[]		= {{0.95, 0.42, 0.22}, 4.2 };
	};
 
	class Lighting21 : Lighting21 {
		__aperture(10,21,34);
 
		diffuse[]		= {{0.95, 0.55, 0.35}, 5.6 };
		diffuseCloud[]		= {{0.95, 0.55, 0.35}, 5.1 };
	};
 
	class Lighting22 : Lighting22 {
		__aperture(26,33,46);
 
		diffuse[]		= {{1, 0.65, 0.45}, 6.8 };
		diffuseCloud[]		= {{1, 0.65, 0.45}, 6.2 };
	};
 
	class Lighting23 : Lighting23 {
		__aperture(59,78,104);
 
		diffuse[]		= {{1, 0.75, 0.62}, 8.7 };
		diffuseCloud[]		= {{1, 0.75, 0.62}, 7.9 };
	};
 
	class Lighting24 : Lighting24 {
		__aperture(91,130,156);
 
		diffuse[]		= {{1, 0.92, 0.72}, 9.5 };
		diffuseCloud[]		= {{1, 0.92, 0.72}, 8.6 };
 
		standardAvgLum = 6000;
	};
 
	class Lighting25 : Lighting25 {
		__aperture(91,130,156);
 
		diffuse[]		= {{1, 0.95, 0.77}, 9.5 };
		diffuseCloud[]		= {{1, 0.95, 0.77}, 8.6 };
 
		standardAvgLum = 7000;
	};
 
	class Lighting26 : Lighting26 {
		__aperture(8,8,15);
	};
 
	class Lighting27 : Lighting27 {
		__aperture(8,8,15);
	};
 
	class Lighting28 : Lighting28 {
		__aperture(8,8,15);
	};
 
	class Lighting29 : Lighting29 {
		__aperture(8,10,19);
	};
 
	class Lighting30 : Lighting30 {
		__aperture(10,11,34);
	};
 
	class Lighting31 : Lighting31 {
		__aperture(11,15,38);
	};
 
	class Lighting32 : Lighting32 {
		__aperture(13,17,42);
 
		diffuse[]		= {{0.216, 0.286, 0.384}, 0.7 };
		diffuseCloud[]		= {{0.054, 0.0715, 0.096}, 0.6 };
	};
 
	class Lighting33 : Lighting33 {
		__aperture(15,19,46);
 
		diffuse[]		= {{0.255, 0.325, 0.42}, 0.9 };
		diffuseCloud[]		= {{0.06375, 0.08125, 0.105}, 0.8 };
	};
 
	class Lighting34 : Lighting34 {
		__aperture(15,30,49);
 
		diffuse[]		= {{0.298, 0.365, 0.451}, 1.1 };
		diffuseCloud[]		= {{0.0745, 0.09125, 0.11275}, 1.0 };
	};
 
	class Lighting35 : Lighting35 {
		__aperture(38,48,67);
 
		diffuse[]		= {{0.376, 0.431, 0.506}, 1.4 };
		diffuseCloud[]		= {{0.094, 0.10775, 0.1265}, 1.2 };
	};
 
	class Lighting36 : Lighting36 {
		__aperture(86,114,152);
 
		diffuse[]		= {{0.5, 0.4, 0.5}, 1.7 };
		diffuseCloud[]		= {{0.5, 0.4, 0.5}, 1.7 };
		ambient[]		= {{0.5, 0.4, 0.5}, 9.8 };
		ambientCloud[]		= {{0.5, 0.4, 0.5}, 9.8 };
		ambientMid[]		= {{0.5, 0.4, 0.5}, 9.4 };
		ambientMidCloud[]	= {{0.5, 0.4, 0.5}, 9.4 };
 
	};
 
	class Lighting37 : Lighting37 {
		__aperture(133,190,228);
 
		diffuse[]		= {{0.45, 0.35, 0.45}, 1.9 };
		diffuseCloud[]		= {{0.45, 0.35, 0.45}, 1.7 };
		ambient[]		= {{0.45, 0.35, 0.45}, 10.8};
		ambientCloud[]		= {{0.45, 0.35, 0.45}, 10.8};
		ambientMid[]		= {{0.45, 0.35, 0.45}, 10.2};
		ambientMidCloud[]	= {{0.45, 0.35, 0.45}, 10.2};
 
	};
	class Lighting38 : Lighting38 {
		__aperture(133,190,228);
 
		diffuse[]		= {{0.4, 0.3, 0.4}, 1.9 };
		diffuseCloud[]		= {{0.4, 0.3, 0.4}, 1.7 };
		ambient[]		= {{0.4, 0.3, 0.4}, 10.8};
		ambientCloud[]		= {{0.4, 0.3, 0.4}, 10.8};
		ambientMid[]		= {{0.4, 0.3, 0.4}, 10.2};
		ambientMidCloud[]	= {{0.4, 0.3, 0.4}, 10.2};
 
	};
 
// under water ???
	class Lighting39 : Lighting39 {};
	class Lighting40 : Lighting40 {};
	class Lighting41 : Lighting41 {};
	class Lighting42 : Lighting42 {};
	class Lighting43 : Lighting43 {};
	class Lighting44 : Lighting44 {};
};

tpw posted lighting fix config example:

class DYALA_LIGHTING_FIX
{
	units[]={};
	weapons[]={};
	requiredVersion=0.1;
	requiredAddons[]=
	{
		"CUP_Worlds"
	};
};
 
class CfgWorlds
{
	class DefaultLighting;
	class DefaultWorld;
	class CAWorld;
	class DYA: CAWorld
	{
		delete Weather;
		delete Lighting;
	};
};

metacraze posted the following:

When parameter “skyColorInfluencesFogColor” is set to 0 (which is a part of visual update) - fog starts requiring an alpha channel value that old configs do not provide. Thus you get black horizon.

e.g. old way was fogColor[] = {r,g,b} , now it's fogColor[] = {{r,g,b},a}. So all classes under lightingNew have to be updated with that in mind.

This however lets you have fog color different from sky color which allows for much better sky looks versus old overly blueish fog - as if sky mixes with earth

Another change is new TrueSky settings for better clouds found in class simulWeather

VKing6 shared kunduz config fix in github.

Ground Detail Textures

Pennyworth made excellent comparison of the ground detail textures in google drive which lists all bis surface textures.

If you are using just bis textures then this is no issue for you as those textures are darkened already, but if you have bright textures of your own then that page is good guide for how to adjust your textures.

08-28-17 Update

Cre8or Documentation in the A3 #terrain_makers Discord channel

class Lighting7
{
	// = 17:05 (on October 10th 2008 - this is 100% dependent on date and time!)
	// Parameter syntax: {{R, G, B}, INTENSITY};
	diffuse[]               = {{0.90, 0.40, 0.20}, 8.0};  // The color of the sun-/moonlight - affects both the terrain and all objects
	diffuseCloud[]          = {{0.90, 0.40, 0.20}, 8.0};  // Same as above (frankly, I don't know what the difference between the 2 is)
	ambient[]               = {{0.36, 0.41, 0.47}, 8.4};  // The color of the terrain when not illuminated by the sun/moon
	ambientCloud[]          = {{0.36, 0.41, 0.47}, 8.4};  // Same as above
	ambientMid[]            = {{0.45, 0.51, 0.55}, 7.4};  // The color of objects when not illuminated by the sun/moon
	ambientMidCloud[]       = {{0.45, 0.51, 0.55}, 7.4};  // Same as above
	groundReflection[]      = {{0.40, 0.43, 0.45}, 7.0};  // What it says - visible within 1-2 meters above ground
	// I recommend spawning an Ghosthawk and looking at its underside to see what this does
	groundReflectionCloud[] = {{0.40, 0.43, 0.45}, 7.0};  // Same as above
	sky[]                   = {{0.14, 0.25, 0.42}, 8.8};  // Color of the sky, doesn't affect areas around/near the sun
	skyAroundSun[]          = {{0.85, 0.48, 0.05}, 11.8}; // Color of the sky around/near the sun, overwrites sky color in those areas
	fogColor[]              = {{0.50, 0.55, 0.63}, 5.4};  // Color of the fog
	cloudsColor[]           = {{0.45, 1.00, 1.00}, 12.2}; // Color of the clouds, however results will vary when looking from above/below
};

Further clarification on some parameters provided by Uro:

diffuse/diffuseCloud is the direct lighting from the sun when the sun object is revealed or hidden behind clouds.

Similarly, ambient/ambientCloud/ambientMid/ambientMidCloud/groundReflection/groundReflectionCloud are in relation to light sources from different angles. ambient = above ground / ambientMid = from the side / groundReflection = from the bottom.

bidirect[] = {}; is the light from the opposite direction than the sun. This value is not a part of the LightingNew classes

also one important factor for immersion is the fogColour array, it defines the fog colour with a few caveats. the skycolour param will have an effect on the colour of the fog you end up with so your actual fog colour will be a blend of the 2 parameters. The fogcolour also has an effect on the horizont line, where the VD ends it ceates a gradient that blends into the sky, so if for example you completely disable fogcolor it still effects how the skybox is drawn overall.

Conversation regarding the use of each lighting class and what purpose they serve:

Rylan: So, in the “LightingNew” subclasses, what does each one do? For example Lighting1 vs Lighting2 vs Lighting44? I don't understand why there are so many of them.
Ice: @Rylan @Cre8or posted this the other day, did you see it?
Rylan: @Ice I did, but that doesn't say anything about why there are 44 of them. Shouldn't there only be 24 if it's time of day? Or even 48? Why 44? I don't understand the logic here

Cre8or: @Rylan IIRC there are 45 of them, divided into 4 categories.
The first 3 categories cover a full day/night cycle each, but at different overcast values (0.25, 0.6, 0.8).
Each set encompasses 13 classes, the first one ranging from Lighting0 to Lighting12.
Each of these classes covers a different sun angle, between each angle the engine interpolates between the neighboring classes.
Currently, the sun angles of all 13 classes are as follows:

Lighting0 -24
Lighting1 -12
Lighting2 -11
Lighting3 -10
Lighting4 -5
Lighting5 -2
Lighting6 0
Lighting7 2
Lighting8 6
Lighting9 12
Lighting10 24
Lighting11 45
Lighting12 90

Then, from Lighting13 to Lighting25, the cycle repeats, and then again from 26 to 38. As for the remaining classes (39 to 44), I'm not entirely sure, but it seems like they handle the underwater lighting.

Cre8or's comments regarding date and time relative to lighting configuration:

The way I established what time of day goes with each lighting class was indeed trial and error, as the classes are indeed tied to multiple factors, such as the terrain's geographic location and the date (month and year included), however they are not tied to the “time of day.”

When I started, I picked a date/month that gave me the amount of sunlight in a full day that I wanted - in my case, October 10th did the trick

Next, I wanted to know which time of day was the closest to each of my lighting classes

So I went in all of the classes and changed the sunOrMoon parameter to 0, except for one class (where I changed it to 1)

Then I simply cycled through the time of day until I found the hour/time where the environment was the brightest, and I wrote that time down as a comment next to the lighting class

Mondkalb's comments regarding date and time:

The classes are not tied to hours in the day, but instead to combinations of sunAngle and overcast.

This way your lighting stays consistent, but the days will be longer or shorter depending on the seasons.

Mondkalb's comments regarding config organization:

I have my lighting configs divided into three .hpps, each with 13 lightings and one extra for the underwater stuff sorted into the three overcast levels: 25, 60, 85

Conversation regarding lighting configuration being affected by terrain coordinates:

Rylan: What determines which classes apply to what coordinates?

Mondkalb: The engine's geoid simulation.

Mondkalb: I havent checked in ArmA 3, but in all games from OFP to ArmA 2, the sky was correctly modelled depending on where the map placed you in the world. S/N hemi

Additionally, day and night transitions are faster near the equator and longer near the poles.

Rylan: How should I insert this into the document? I'm still not entirely sure exactly what it means

Mondkalb: Via config you control this through the “longtitude =” and “latitude=” parameters

class myTerrain : CAWorld
{
	latitude = -51;
	longitude = 11;
};

Rylan: How could you find out which lighting classes those coordinates would use?

Mondkalb: Trial and error.

Lighting 0-10 = day/night w/ clear sky
Lighting 11-21 = day/night w/ overcast sky
Lighting 22-71 address lighting underwater at specific depths governed by the “height = -0.001”; param

Also when in-game all lighting values (diffuse light, ambient light) will remain the same from overcast 0 - 0.4.

arma3/terrain/v1-60-visual-upgrade-lighting-config.txt · Last modified: 2017-10-06 19:24 by snakeman