SiR R.i.P.P.E.R. Posted November 11, 2011 Posted November 11, 2011 When in the university (a couple of years ago), I was interested in making an analysis system that would model the oceans in a large scale, by calculating the fluid properties depending on variables such as local temperature, winds, salinity and generally parameters that define the fluid motion. The interesting thing is that once you definded the fluid's basic properties and local temperature and sunlight exposures, it would "live on its own". It's an idea I find interesting, but didn't have time to develop. The oceans would be divided in large cubes of 10x10x10km with those general properties, and then a calculation would occur to define the fluid mixing, flow direction, temperature, density and salinity layers, surface waves. After the calculations, the program would divide the 10x10x10km cubes in smaller ones of 1x1km and recalculate, based on the results provided by the 10x10km ones. After the detailed 1x1x1km calculations, the results would be re-synthesised and the 10^3km cubes would be updated. In a game engine, that would mean a huge power consumption to do in real time. Considering though that a sort of LOD system is already in place, the world would be calculated once via this algorithm, then updated as required locally. Since the player cannot notice the difference of sea water currents when in 10ft or 10000ft ASL, it wouldn't mean much to them. The thing with it is that the same algorithm can be used for weather generation. Since the atmosphere is basically a layer of fluids interacting with each other, depending on solar energy output, density, humidity and many other parameters, a similar pattern could be followed. Dividing the atmosphere in cubes of the same area, but different height would allow for a layering of the atmosphere, while keeping the interaction area between layers the same. Using a "stack" pattern, the cubes would allow an interaction with the 6 layers to the top, bottom and 4 same altitude sides of the box. Instead, using a brick wall pattern, where each block corners borders with the middle of the upper layer ones, would allow fluid mixture between the box and: 4 upper layer boxes, 4 lower layer boxes, 4 same layer ones After all weather boxes are calculated, they're then normalised so that the weather doesn't have great variations between boxes when going from one box to another. That could be achieved by using mean averages between bordering boxes globally, to achieve uniform changes Depending on the local box's characteristics, you could decide whether or not clouds, turbulence or rain have a probability of developing. If the probability is going high, then the box can be subdivided in real time and the forming of such phenomena can be made to appear. Of course, when such weather phenomena appear, the probability of the phenomenon appearing in the bordering boxes has to be calculated too. This way, you can have an atmospheric layout of many large boxes containing general atmospheric properties, and reduce frequent real time calculations to the areas where the phenomena are expected to appear. These calculations can be done in real time, or in advance in the general vicinity of where the player aircraft is expected to appear. The rest of the global weather can be updated based on the detailed area, on a basis of once every 10-15 minutes. Of course, since fighter jets travel slightly faster than donkeys, that range of detail would have to be an area that the jet can't travel in a time less than 20 minutes (add +5-10 minutes to allow for weather preloading). The ocean and atmosphere system can be further combined to create a more believable environment, where the 'sphere and ocean interact and the weather is recalculated if the sea warms up locally, or a water current changes speed or direction. With air-landmass interaction, things would be much simpler, as landmass properties are far less in quantity and dynamics than sea characteristics. So considering that combat simulators take place in limited environments of 100x100km to 1000x1000km theatres, the feature could be implemented with some success. The general water and atmosphere features should be hardcoded to the engine, and the user would be able to change the temperature and time of day and see a weather pattern evolve, during the course of a campaign. Of course, the used should be able to select what type of weather he should have in custom missions, but that would have to be done via an FS9/FSX style weather menu, to allow for editing the local weather's general properties. The weather system would then select from a range of parameters to allow for the weather to exist and develop. I think that such a tech would make for long loading times, and would certainly require a CPU core of its own to work without killing the FPS. That's it, I think I baffled enough anyone that was curious to read this. Curiosity killed the cat 1
CTR Posted November 12, 2011 Posted November 12, 2011 I like the idea of cubes with different calculation levels! I think this could add a new dimension for heli-operations in high mountains. If the weather engine is able to calculate up- and downwind in a vally, one could use it the upwind to climb higher for example. I think that such a tech would make for long loading times, and would certainly require a CPU core of its own to work without killing the FPS. Hmm... as a software developer i think this is no big problem, because the algorithm can be forked on many cpu-cores. I don't know it the DCS-Engine use all available cores, i think they use not much parallel operations (maybe UI and Model caculation), so it would be interesting to see such weather engine in DCS. Fingers crossed :-) [sigpic][/sigpic] Flanker driver since 1996 DxDiag.txt
SiR R.i.P.P.E.R. Posted November 12, 2011 Author Posted November 12, 2011 Considering the weather is calculated in detail only in the immediate area, up/downdrafts can be calculated anywhere. The mountains' landmass only adds more parameters, but it should be very doable.
Nobody96 Posted November 12, 2011 Posted November 12, 2011 Talking about many cpu-cores: You both know that most of the work done by the Top-500 supercomputers is calculating exactly this sort of weather prediction. You have to scale it down massively or else you would need a pretty big machine. The Earth Simulator was built for this kind of work and has 5120 vector processors, just to clarify what I mean with big :-) so long Mathias My System: Intel Core i7-4770K, Asus ROG Strix RX480 O8G, 24GB Ram
SiR R.i.P.P.E.R. Posted November 12, 2011 Author Posted November 12, 2011 I know, but testing on a smaller scale, with some simplifications in detail, would be interesting.
Recommended Posts