dissaifer 10 Posted November 1, 2009 I was just playing around with a mission checking out a few things and I started to play with the weather. According to the biki http://community.bistudio.com/wiki/setFog Ceeeb posted a comment about how you can't use setOvercast and setFog, which just seems odd to me. Trying to do a 0 setRain (random 1)... seems to only return 0, ever, when called by the "rain" command. Yes, I know that overcast has be to over 0.7 to have rain, but "rain" should not always be 0. About Rain and Fog... rarely have I seen rain without some level of fog. It seems odd to have a perfectly clear day and rain. :confused: Then there was fog. Frankly, fog is a programmer's best friend if used correctly. I set the fog to 1 or for those who don't know yet that is 100% and I could see the ground for like 10+ meters. I was expecting to not see past my gun when I did that... :( To make that more fun, there was a perfectly clear sky above me??? But the worst part of it was, that objects (trees, large buildings) were popping into view, which I was a little shocked at. When the fog is high, you could easily only preload objects that going to be in close view of the player. Basically, build a "fog bubble" around the player and only preload the objects say in a 50 meter radius for viewing, that way there wouldn't be a popping effect of objects. :) Just trying to help! Share this post Link to post Share on other sites
frederf 0 Posted November 1, 2009 setFog and setOvercast are the primary weather controlling parameters. Trying to force rain with setRain sounds problematic. It's best to just set the overcast level and let rain figure itself out. Fog and Overcast are perfectly independent and I see nothing wrong with a Overcast 1 / Fog 0 pair. Real rainstorms are often very clear fog-wise. If you set Fog 1 / Overcast 0 then you'll get something goofy but that's not the game's fault for giving you the option, just yours for using it. It does sound dumb if view distance wasn't adjusted by the fog level for better looks and performance. I suppose as a programmer you could adjust VD manually to correlate with fog for that effect. Share this post Link to post Share on other sites
dissaifer 10 Posted November 2, 2009 You make some points, but I tried Overcast 1 Fog 1 and it forced Fog to .9 which says there is some logic in there to try and control both or at least one over the other. I really wasn't trying to force the rain, I was trying to have a randomize weather scenario, when I came across this. It just so happen to turn out that setRain doesn't work like it say on the biki. Zero should be no rain, One should be full rain (downpour I guess) and all the numbers in between scaling up the rain volume. Right now, it appears rain is either off or on. Share this post Link to post Share on other sites
CarlGustaffa 4 Posted November 2, 2009 (edited) In Arma1 I think the solution was to use setFog and setOvercast in a specific order. That would make it work. But then I got into problems with setRain iirc. I ended up with controlling everything during different sections within the same loop. SetRain needs to be updated frequently in order to achieve a state of steady rain. It appeared to me that the internal weather system ran in serial, and changes had to be accessed that way. If the commands came in reverse order, the engine would simply forget about the first. Can't say yet if setRain works, but a minimum amount of clouds had to be present in Arma1. Which makes sense :) Currently working (well, experimenting) on some weather scripts, but I recently started and I'm still only setting up the tables/arrays :p About Rain and Fog... rarely have I seen rain without some level of fog. It seems odd to have a perfectly clear day and rain. :confused: If it rains heavily, you will get the apperance of fog, but it is mearly an illusion since it models how raindrops will limit visibility. So it's not "fog" as such, merely a reduction of visibility. You can have rain with good visibility, but it have to be light rain which is hard to get since the engine seem to turn off rain rather quickly. Edit, after some experimenting: * Very bad visible "shiny" near artifacts on too much fog. Stay away from these rather extreme values. At fog=0.9 you can only see about 50m, at 0.84 100m, at 0.71, 200m etc. 2-300m visibility should be the maximum allowed amount of fog in missions. Any more, although realistic, just renders badly. * Very bad visible distance rendering on too much fog and/or rain. Center of horizon renders ok, but egdes are plagued with some kind of visible blocks that pop in and out of view depending on view direction. Extremely ugly and highly annoying. BIS please fix? * Seems you can't get both fog and overcast to update simultaniously, no matter which comes first. Means you have to change one, sleep for as long as it changes, then change the other. If you're doing large steps over long time, you have to run individual step loops in sequence. * In order to produce rain via setRain, the magic overcast value seems to be above (but not equal to) 0.6. * Plotting an object draw distance (terrain not that important) curve against fog, it seems to go linearly from 1 to about 0.3, then it switches to either a much steeper linear curve or some exponential one. * SetRain needs to be set very frequently on clients in order for the engine not to make it visible that it tries to change rain itself. Several times per second is needed if you want to "set" steady low amounts of rain. * SetWind doesn't seem to update very fast, so forget about trying to do gusts, windshear, or microburst effects :) On clients you can have small variations in wind which is defined globally. The "general direction" will be obvious to all, but the small differences will make subtle changes on smoke without causing anything to look out of sync. Synchronized global variations is discouraged due to the amount of extra net traffic. * Thunderstorms seems to be broken while testing in the editor. I might get the first run to work ok, but on next preview no thunder will ever appear. Tested with 1.04 and latest beta, even with overcast and rain forced above one. Does anyone else have this problem? Trying to force rain with setRain sounds problematic. It's best to just set the overcast level and let rain figure itself out. Yes, as you can see form above, using setRain can be problematic indeed. However I think it is needed, since when we play we very often get unsynchronized rain. Some might have rain, others not, or any way inbetween. On light rain, it's mostly a matter of ambience. On more sever rain, differences in visibility becomes a major issue. Edited November 2, 2009 by CarlGustaffa Share this post Link to post Share on other sites