Ground Fog - Guide

Just a little comment since it might happen to someone...

It seems that when you do the exec call on the Game Logic it's case sensitive. I had created my fog file as Fog.sqs but the call was for fog.sqs, and it wasn't working. I changed it to the capital F and it started working. Kinda funny how such a little thing makes such a big difference.

Also, I might have an easier way to inject the fogs into the map.

Just go to the 3D editor and create the gamelogic with the call for the fog.sqs where ever you want it in the map and then save the mission. Now grab the mission file (.sqf) and delete everything unrelated to the fog (centers, groups) except for the processinitcommand at the bottom.

It should look something like this:

Code:
_unit_4 = objNull;
if (true) then
{
  _this = _group_1 createUnit ["Logic", [3958.0471, 4128.6079], [], 0, "CAN_COLLIDE"];
  _unit_4 = _this;
  _this setVehicleVarName "ODCFog1";
  ODCFog1 = _this;
  _this setVehicleInit "[this,100,150] exec ""Fog.sqs"";";
  _this setUnitAbility 0.60000002;
  if (true) then {_group_1 selectLeader _this;};
};
 
processinitcommands;

Edit the name of this .sqf to something like "FogSpawner" or whatever suits your needs and copy both this new file and the fog.sqs to your mission foler.

Now go to your init.sqf (on the mission files) and go to the bottom. Add the following:

Code:
[] ExecVM "FogSpawner.sqf";

And that should be it.

PD: It does works on other maps. I tried it in Lingor and it was just fine.

EDIT: Fog does look kinda odd as other users have posted here. Smoke grenades all over I think it's being called.
 
I've managed to get it looking alright. The compromise is a much limited range on the fog. This would work reasonably well for flatter maps, but it wouldn't look very nice on any map with hills and bumps all over. Spent time trying to figure it out, but can't determine why things go all smoke grenade with an expanded range.

2017effects.png
 
Sorry I'm at a loss right here Nohrt, what mod are you talking about? I'm afraid I mostly play DayZ and Lingor.

If you have your own version of a myst spawn mechanic, I'd love to see it. At least some pictures.
 
nohrt can you give us some insight on how you did it in BP?

I can't get over the little puffs of fog and it's driving me nuts :)
 
Okay, so here's what I've learnt in the past two days since I started playing with this fog idea.

First and foremost. The script posted here is Yac's work. (http://www.armaholic.com/page.php?id=7122)

Second. There's a better script made by Rockhount, based on Yac's, that's much easier to customize. (http://www.armaholic.com/page.php?id=13101)

Third, getting the ground fog about right from a man's perspective doesn't mean that it won't look like crap from the air. Many times I thought I got it right but when I took an aereal view it looked unnatural.

Fourth, the way the game handles fog, if you are standing inside of it and look up, it seems to momentarely disperse, clearing the view. Of course, when you look down it all comes back. This can be kinda worked around by increasing the height.
 
Okay, so here's what I've learnt in the past two days since I started playing with this fog idea.

First and foremost. The script posted here is Yac's work. (http://www.armaholic.com/page.php?id=7122)

Second. There's a better script made by Rockhount, based on Yac's, that's much easier to customize. (http://www.armaholic.com/page.php?id=13101)

Third, getting the ground fog about right from a man's perspective doesn't mean that it won't look like crap from the air. Many times I thought I got it right but when I took an aereal view it looked unnatural.

Fourth, the way the game handles fog, if you are standing inside of it and look up, it seems to momentarely disperse, clearing the view. Of course, when you look down it all comes back. This can be kinda worked around by increasing the height.

I tried the second one you posted, but I never could get it to work, but if you find a way please post it! maybe I was going at it wrong.
 
It's really very simple if you read the instructions properly.

Just download the fog.fsm (second link) and put it into your mission file.
Enter your game, press Control + E to enter you 3D editor.
Put down a Game Logic (create a Center Logic, Group Logic and in Units look for "Game Logic").
Name this Game Logic something, I went for "FogTrigger".
In the init of the Game Logic put the suggested command:

Code:
null=[l1,100,11,10,3,7,-0.3,0.1,0.5,1,1,1,13,12,15,true,2,2.1,0.1,4,6,0,3. 5,17.5] execFSM "Fog.fsm";

Now, change the "l1" for "FogTrigger" (try it with and without the inverted commas if it doesn't work and bear in mind it's case sensitive) and then see how it works.

Now all that complicated line of code is actually the different configurations of the fog you are putting down. If you look at the Fog.fsm file, it comes with a very detailed explanation of what each number is related to. Size, height, quantity of clouds, respawn frecuency, if affected by wind or not, wind strength, etc.

I found out that for a "thick" realistic fog, it's better to keep cloud size between 10-20 and quantity to four or five times the affected area. Suppose you are trying to cover a 50m area, set cloud count to 250. But you can try your own combinations and see what fits your idea best.
 
Any chance you can share your modifications to the original file?

Hey Deathcall - sorry, completely forgot to reply. Basically, I only changed two things in fog.sqs:

Code:
_height=-0.35
_Rradius=10

This works alright for flatter maps, but doesn't look as nice on bumpier maps.
 
You have to modify the cloud maximum minimum size and their amount... and transparency... I mean, toy around with the settings.

This particular setting works well for me. Try it out.

Code:
null=[LogicTrigger6,50,5,200,10,20,-0.3,3,0.7,1,1,1,20,20,40,false,0.3,10,0.3,0.5,0.5,0,3.5,17.5] execFSM "Fog.fsm";
 
mission.sqm for fogs ONLY FROM 7pm to 7am :
Code:
init="[this, 10000, 10000, 7, 19] exec ""fogs.sqs""";

Just gave this a try. Quick question though...is the '7, 19' above out of order? Is that:

1) 7AM to 7PM or
2) 7PM to 7AM

Thanks
 
I just added the fog to my test server and have some people come test it. They could all see the fog but I can't. I bounced my graphics settings off of theirs and can't figure out what the issue could be. Anyone have a clue what the issue could be?
 
Just gave this a try. Quick question though...is the '7, 19' above out of order? Is that:

1) 7AM to 7PM or
2) 7PM to 7AM

Thanks
they seem to be working, its 7pm to 7 am, the fog is only on at night, when hackers were on my non BE server, they switched it to day and the fog disappeared instantly, so its only night setting
 
Back
Top