Jump to content
AlexVestin

Help appreciated. Changing fog color? (CfgWorlds)

Recommended Posts

This is one part from the config:

				class Lighting7
			{
				height = 0;
				overcast = 0.6;
				sunAngle = 2;
				sunOrMoon = 1;
				diffuse[] = {{1.1,0.4116,0.194},8.7725};
				diffuseCloud[] = {{0.99,0.37044,0.1746},7.89525};
				ambient[] = {{0.424,0.45925,0.7371},4.38625};
				ambientCloud[] = {{0.3816,0.413325,0.66339},3.94762};
				ambientMid[] = {{0.4782,0.52197,0.784},4.82487};
				ambientMidCloud[] = {{0.43038,0.469773,0.7056},4.34239};
				groundReflection[] = {{0.3692,0.35256,0.438785},4.58363};
				groundReflectionCloud[] = {{0.33228,0.317304,0.394907},4.12527};
				bidirect[] = {0.03337,0.031866,0.029845};
				bidirectCloud[] = {0.030033,0.028679,0.026861};
				sky[] = {{0.4312,0.4433,0.5175},10.5749};
				skyAroundSun[] = {{0.4392,0.32186,0.3609},10.6067};
				fogColor[] = {0.087,0.11165,0.1743};
				apertureMin = 10;
				apertureStandard = 15;
				apertureMax = 20;
				standardAvgLum = 70;
				desiredLuminanceCoef = 0.2;
				desiredLuminanceCoefCloud = 0.4;
				luminanceRectCoef = 0.4;
				luminanceRectCoefCloud = 0.2;
				rayleigh[] = {0.00749,0.01388,0.02878};
				mie[] = {0.0046,0.0046,0.0046};
				cloudsColor[] = {{0.8,0.81,1},10.5749};
				swBrightness = 1;
			};

This is the part I'm confused about and presume is for the actual color:

					fogColor[] = {0.087,0.11165,0.1743};

Is it really the standard Red, Geeen, Blue?

I've tried lots of different combinations, number of zeros and the like. I can't seem to have the fog change to my desired color. In-game I've gotten results like really intense white fog and no fog but a dark horizon and other weird results.

Anyone know the correct way to get the right color in there? I've tried copying over simple RGB values from my pallet, but it has not turned out good in-game. Or if that is how you do it but I am doing it wrong, please advise.

Share this post


Link to post
Share on other sites

I did check it out, thanks for the suggestion. Altough I did not find anything. The values did not make any sense to me in there either. There must be some kind of converter to get the right color values for the config.

Share this post


Link to post
Share on other sites

what exactly do you want to do?

note that the sky color also has an effect on the fog color, though you should be able to set any fog color you like, one thing you have to mention is that the weather classes are all defined by certain overcast and sun angle values, therefore, when you set fog to green for 0.95 overcast 45° sunangle, and load the map at sunset with clearsky, you will not adress the according weatherclass.

  • Like 1

Share this post


Link to post
Share on other sites

I've more or less tried to get my fog looking something like this through out the 24 hours of a day:

cacp.jpg

Share this post


Link to post
Share on other sites
Is it really the standard Red, Geeen, Blue?

I've tried lots of different combinations, number of zeros and the like. I can't seem to have the fog change to my desired color. In-game I've gotten results like really intense white fog and no fog but a dark horizon and other weird results.

Anyone know the correct way to get the right color in there? I've tried copying over simple RGB values from my pallet, but it has not turned out good in-game. Or if that is how you do it but I am doing it wrong, please advise.

The Arma config RGB values range from 0 to 1. Normal RGB values range from 0 to 255. Therefore, we have convert regular RGB values to Arma's values.

1 / 255 = 0.00392156862745

(We'll call this our baseValue for now)

Now we have our base value which we can use to convert any RGB value to an Arma value. For example,

Orange = 255,158,61

255 * baseValue = 1

158 * baseValue = 0.62

61 * baseValue = 0.24

So in Arma 255,158,61 would translate to 1,0.62,0.24. I haven't tested this so I may be mistaken, but by logic this is how I'd assume you would go about converting RGB values to Arma's format.

Hope this helps :)

Edited by GDSN

Share this post


Link to post
Share on other sites

If I understood correcly - it's simplified like this:

This is the tan color I want.

udh2.png

R 204

G 191

B 163

These RGB values are then divided by 255:

R 204 / 255 = 0.8

G 191 / 255 = 0.74

B 163 / 255 = 0.63

Final code:

					fogColor[] = {[color="#FF0000"]0.8[/color],[color="#00FF00"]0.74[/color],[color="#0000FF"]0.63[/color]};

Makes a lot of sense in my head now :)

Edited by AlexVestin

Share this post


Link to post
Share on other sites

Ah yes that's right AlexVestin. Your method is also simpler :)

Share this post


Link to post
Share on other sites

this website might be handy not to have to convert 255er values into percentage manually each time you want to get a color from photoshot to the config and the other way around:

http://www.colortools.net/color_mixer.html

on the 24h cycle:

you only need to mind class Lighting 0-21

0-10 are different sunangles at overcast 0-0.4

11-21 are different sunangles at overcast 0.95-1

overcast settings inbetween blend over between the two values.

though you are only able to set colors for "half the day" meaning you can define the colors for the way the sun takes from the bottom up and then it just uses the same values backwards on its way down.

in one of the recent dev builds they apparently changed something about the way that fog is rendered at night, i didnt figue out what that means yet.

what are you working on btw?

Edited by Fabio_Chavez

Share this post


Link to post
Share on other sites

That's some very useful info there Fabio, thanks for sharing.

In relation to your AiA lighting config mod - do you think you'd be able to release a version that changes the default Altis/Stratis lighting to something that looks more desert-like (e.g. your dry_haze addon).

@Alex - What are you planning to use those colours for? That pallette looks very desert-like to me :)

Share this post


Link to post
Share on other sites

i dont know yet about stratis/altis, if anything i am going to make another destertish setting and besides that make the configs i got so far, to work for for arma3 in general but atm im still working on a complete rework for chernarus.

i kind of like the stratis/altis lighting as it is, it seems pretty authentic for mediterranean islands and it captures an original mood that i associate with arma3 now, so if i wanted to redo stratis/altis it would have to be at least as good as the original setting in therms of authenticity and artistic quality and i am not sure if i can do that.

(lets not forget, those guys litterally would go to jail for authenticity -_-)

Share this post


Link to post
Share on other sites
7 hours ago, brainboy said:

Is it possible to change the cloud color to red?

 

Hello there to everyone !

 

Is there any script approach for this ?

Thanks !

 

 

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

×