Jump to content
Sign in to follow this  
mcnools

Map-specific lighting? (less red, colder light)

Recommended Posts

I know about these settings:

http://forums.bistudio.com/showthread.php?t=93128&highlight=Lighting

http://forums.bistudio.com/showthread.php?t=121433&highlight=lighting

But from what I can gather it's not possible to have specific lighting-effects for specific maps? (terrains that is, not missions). I'm working on a map with some snow, but right now the red-ish tint of the light often makes it look a bit pink (despite the weather being a bit snowy in december). Both the satmap and textures are rather desaturated, but it doesn't seem to help that much.

I was wondering if it's possible to set the lighting for the map to be a lot less saturated and less red, colder in other words, without going to the extreme, preferably settings that are activated/works well with the Environment - Colours-module in the editor.

Is it possible? How would I do this?

Edited by McNools

Share this post


Link to post
Share on other sites

inside island config

class Lighting: DefaultLighting
	{
//			groundReflection[] = {0.03,0.025,0.015};//shapue
//			groundReflection[] = {0.06,0.06,0.03};//default			
		groundReflection[] = {0.063,0.062,0.038};//zagrabad
	};

//from Chernarus config
	class DayLightingBrightAlmost: DayLightingBrightAlmost {
		deepNight[]  = {-15, {0.050000, 0.050000, 0.060000}, {0.001000, 0.001000, 0.002000}, {0.020000, 0.020000, 0.050000}, {0.003000, 0.003000, 0.003000}, {0.000100, 0.000100, 0.000200}, {0.000100, 0.000100, 0.000200}, 0};
		fullNight[]  = {-5, {0.050000, 0.050000, 0.050000}, {0.020000, 0.020000, 0.020000}, {0.040000, 0.040000, 0.040000}, {0.040000, 0.040000, 0.040000}, {0.010000, 0.010000, 0.020000}, {0.080000, 0.060000, 0.060000}, 0};
		sunMoon[]  = {-3.750000, {0.045000, 0.040000, 0.040000}, {0.040000, 0.040000, 0.040000}, {0.045000, 0.040000, 0.040000}, {0.040000, 0.040000, 0.040000}, {0.040000, 0.035000, 0.040000}, {0.100000, 0.080000, 0.090000}, 0.500000};
		earlySun[]  = {-2.500000, {0.120000, 0.100000, 0.100000}, {0.080000, 0.060000, 0.070000}, {0.120000, 0.100000, 0.100000}, {0.080000, 0.060000, 0.070000}, {0.080000, 0.070000, 0.080000}, {0.100000, 0.100000, 0.120000}, 1};
		sunrise[]  = {0, {{0.700000, 0.450000, 0.450000}, "5.16+(-5)"}, {{0.070000, 0.090000, 0.120000}, "1.0+(-0.1)"}, {{0.600000, 0.470000, 0.250000}, "1.66+(-0.1)"}, {{0.100000, 0.090000, 0.100000}, "4.3+(-5)"}, {{0.500000, 0.400000, 0.400000}, "6.49+(-5)"}, {{0.880000, 0.510000, 0.240000}, "1.39+(-0.1)"}, 1};
		earlyMorning[]  = {3, {{0.650000, 0.550000, 0.550000}, "6.04+(-5)"}, {{0.080000, 0.090000, 0.110000}, "1.5+(-0.1)"}, {{0.550000, 0.470000, 0.250000}, "1.54+(-0.1)"}, {{0.100000, 0.090000, 0.100000}, "5.02+(-5)"}, {{0.500000, 0.400000, 0.400000}, "7.05+(-5)"}, {{0.880000, 0.510000, 0.240000}, "1.88+(-0.1)"}, 1};
		midMorning[]  = {8, {{0.980000, 0.850000, 0.800000}, "8.37+(-5)"}, {{0.080000, 0.090000, 0.110000}, "1.42+(-0.1)"}, {{0.870000, 0.470000, 0.250000}, "1.87+(-0.1)"}, {{0.090000, 0.090000, 0.100000}, "6.89+(-5)"}, {{0.500000, 0.400000, 0.400000}, "8.9+(-5)"}, {{0.880000, 0.510000, 0.240000}, "1.88+(-5)"}, 1};
		morning[]  = {16, {{1, 1, 0.900000}, "13.1.5+(-0.1)"}, {{0.170000, 0.180000, 0.190000}, "1.26+(-0.1)"}, {{1, 1, 0.900000}, "12.67+(-5)"}, {{0.170000, 0.180000, 0.190000}, "1.71+(-0.1)"}, {{0.150000, 0.150000, 0.150000}, "12.42+(-5)"}, {{0.170000, 0.170000, 0.150000}, "1.42+(-0.1)"}, 1};
		noon[]  = {45, {{1, 1, 1}, "1.5+(-0.1)"}, {{1, 1.300000, 1.550000}, "1.5+(-0.1)"}, {{1, 1, 1}, "15+(-5)"}, {{0.360000, 0.370000, 0.380000}, "1.5+(-0.1)"}, {{1, 1, 1}, "16+(-5)"}, {{1.000000, 1.000000, 1}, "1.5+(-0.1)"}, 1};
	};

inside bin(or ca) config

class CfgMaterials {
class Terrain
{
	ambient[] = {1,1,1,1};
	diffuse[] = {0.6,0.6,0.6,1};
	forcedDiffuse[] = {0.05,0.05,0.05,1};
	specular[] = {0,0,0,0};
	specularPower = 1;
	emmisive[] = {0,0,0,0};
               .........................................
               .........................................
         };
};

Edited by nikita320106

Share this post


Link to post
Share on other sites

Thanks! I'm having a problem getting it work though, it tells me I'm missing enheritance-classes, so I'm guessing I need to define "DefaultLighting", what would be the best way to do this? this is my current config.cpp:

class CfgPatches
{
class TUT_SampleMap
{
	units[] = {TUT_SampleMap};
	weapons[] = {};
	requiredVersion = 1.03;
	requiredAddons[] = {"Takistan","CA_E","CARoads_E","CARocks_E","CAStructures_E","CAMisc_E"};
	version = "2009-9-1";
	fileName = "TUT_SampleMap.pbo";
	author = "SgtAce";
	mail = "Sgt.Ace@web.de";
};
};
class CfgWorlds
{
class CAWorld;
class Takistan: CAWorld
{
	class Grid;
	class DefaultClutter;
};
class TUT_SampleMap: Takistan
{
	description = "Hazar-Kot Valley";
	worldName= "\TUT\TUT_SampleMap\TUT_SampleMap.wrp";
	pictureShot = "\TUT\TUT_SampleMap\data\SM_Picture_ca.paa";
	centerPosition[] = {2720,2462,500};
	seagullPos[] = {2720,2462,500};
	longitude = 30; // positive is east, in degrees?
	latitude = -45; // positive is south, in degrees?

	class Clutter
	{
		#include "cfgClutter.hpp"
	};
	class Lighting: DefaultLighting
	{
//			groundReflection[] = {0.03,0.025,0.015};//shapue
//			groundReflection[] = {0.06,0.06,0.03};//default			
		groundReflection[] = {0.063,0.062,0.038};//zagrabad
	};
	class DayLightingBrightAlmost: DayLightingBrightAlmost {
		deepNight[]  = {-15, {0.050000, 0.050000, 0.060000}, {0.001000, 0.001000, 0.002000}, {0.020000, 0.020000, 0.050000}, {0.003000, 0.003000, 0.003000}, {0.000100, 0.000100, 0.000200}, {0.000100, 0.000100, 0.000200}, 0};
		fullNight[]  = {-5, {0.050000, 0.050000, 0.050000}, {0.020000, 0.020000, 0.020000}, {0.040000, 0.040000, 0.040000}, {0.040000, 0.040000, 0.040000}, {0.010000, 0.010000, 0.020000}, {0.080000, 0.060000, 0.060000}, 0};
		sunMoon[]  = {-3.750000, {0.045000, 0.040000, 0.040000}, {0.040000, 0.040000, 0.040000}, {0.045000, 0.040000, 0.040000}, {0.040000, 0.040000, 0.040000}, {0.040000, 0.035000, 0.040000}, {0.100000, 0.080000, 0.090000}, 0.500000};
		earlySun[]  = {-2.500000, {0.120000, 0.100000, 0.100000}, {0.080000, 0.060000, 0.070000}, {0.120000, 0.100000, 0.100000}, {0.080000, 0.060000, 0.070000}, {0.080000, 0.070000, 0.080000}, {0.100000, 0.100000, 0.120000}, 1};
		sunrise[]  = {0, {{0.700000, 0.450000, 0.450000}, "5.16+(-5)"}, {{0.070000, 0.090000, 0.120000}, "1.0+(-0.1)"}, {{0.600000, 0.470000, 0.250000}, "1.66+(-0.1)"}, {{0.100000, 0.090000, 0.100000}, "4.3+(-5)"}, {{0.500000, 0.400000, 0.400000}, "6.49+(-5)"}, {{0.880000, 0.510000, 0.240000}, "1.39+(-0.1)"}, 1};
		earlyMorning[]  = {3, {{0.650000, 0.550000, 0.550000}, "6.04+(-5)"}, {{0.080000, 0.090000, 0.110000}, "1.5+(-0.1)"}, {{0.550000, 0.470000, 0.250000}, "1.54+(-0.1)"}, {{0.100000, 0.090000, 0.100000}, "5.02+(-5)"}, {{0.500000, 0.400000, 0.400000}, "7.05+(-5)"}, {{0.880000, 0.510000, 0.240000}, "1.88+(-0.1)"}, 1};
		midMorning[]  = {8, {{0.980000, 0.850000, 0.800000}, "8.37+(-5)"}, {{0.080000, 0.090000, 0.110000}, "1.42+(-0.1)"}, {{0.870000, 0.470000, 0.250000}, "1.87+(-0.1)"}, {{0.090000, 0.090000, 0.100000}, "6.89+(-5)"}, {{0.500000, 0.400000, 0.400000}, "8.9+(-5)"}, {{0.880000, 0.510000, 0.240000}, "1.88+(-5)"}, 1};
		morning[]  = {16, {{1, 1, 0.900000}, "13.1.5+(-0.1)"}, {{0.170000, 0.180000, 0.190000}, "1.26+(-0.1)"}, {{1, 1, 0.900000}, "12.67+(-5)"}, {{0.170000, 0.180000, 0.190000}, "1.71+(-0.1)"}, {{0.150000, 0.150000, 0.150000}, "12.42+(-5)"}, {{0.170000, 0.170000, 0.150000}, "1.42+(-0.1)"}, 1};
		noon[]  = {45, {{1, 1, 1}, "1.5+(-0.1)"}, {{1, 1.300000, 1.550000}, "1.5+(-0.1)"}, {{1, 1, 1}, "15+(-5)"}, {{0.360000, 0.370000, 0.380000}, "1.5+(-0.1)"}, {{1, 1, 1}, "16+(-5)"}, {{1.000000, 1.000000, 1}, "1.5+(-0.1)"}, 1};
	};
	class Names
	{
		#include "TUT_SampleMap.hpp"
	};
};
};

class CfgWorldList
{
class TUT_SampleMap {};
};

class CfgMissions
{
class Cutscenes
{
	class TUT_SampleMapIntro
	{
	directory = "TUT\TUT_SampleMap\data\scenes\Intro.TUT_SampleMap";
	};
};
};

//SURFACES
#include "cfgSurfaces.hpp"

Share this post


Link to post
Share on other sites

at 1st level

class DefaultLighting;

class DayLightingBrightAlmost;

Share this post


Link to post
Share on other sites

Thanks for the quick reply! It seemed to work! (at least eliteness didn't have any problems), will try and see if it works ingame!

However, what is the "class CfgMaterials" for? And which config should I put it in? the ca-folder in my work-folder (and the P: drive)?

Edit: It worked! Now I need to experiment with colours, and look into what number means what, haha. Does anyone know which numbers decide the colour of the light etc?

seems there's some info here:

http://sites.google.com/site/islandconfigs/cfgworlds-overview/cfgworlds-lighting-weather

Edited by McNools

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×