]> git.mxchange.org Git - flightgear.git/commit
Precipitation updates from ThorstenR
authorTorsten Dreyer <torsten@ŧ3r.de>
Tue, 21 Oct 2014 08:44:55 +0000 (10:44 +0200)
committerTorsten Dreyer <torsten@ŧ3r.de>
Tue, 21 Oct 2014 08:47:32 +0000 (10:47 +0200)
commit06e8fe747fb1733528aa1e01bc6bd285a53ec127
treefd826c823177578dde74161279ba8ac8717da5bb
parenta30dadcf1822e617a30a4fd0496c401f5505081a
Precipitation updates from ThorstenR

required SimGear commit 75271c44a82ae0fb1ff9c91e93a12fa8b10099fd

Since the consensus seems to be that the precipitation clipping issue is with the panel code, attached is  my proposed update for the precipitation system in SG and FG

* without corresponding control structures in FGData it falls back to default, except I have fixed an inconsistency in freezing behavior - previously rain changed suddenly to snow when the temperature dropped below zero, but the reverse transition was dragged out and gave odd visible motion with the wind as snow gradually changed back to rain with the particle speed not well defined. Now both transitions are sudden. And I see no more particles flow against the wind

* with

 <!-- definitions for the detailed precipitation manager -->
 <precipitation-control>
     <rain-droplet-size type="float" userarchive="n">0.015</rain-droplet-size>
     <snow-flake-size type="float" userarchive="n">0.03</snow-flake-size>
     <detailed-precipitation type="bool" userarchive="n">false</detailed-precipitation>
     <illumination type="float" userarchive="n">1.0</illumination>
     <clip-distance type="float" userarchive="n">5.0</clip-distance>
  </precipitation-control>

added to Environment/environment.xml, the new system allows to switch more detailed management on. This provides

* explicit setting of rain droplet size and snow flake size by the weather system

* automatic sqrt(r) scaling of the vertical speed of raindrops

* automatic transition to snow when freezing for small droplets but hail for large droplet sizes (looks like snow, but has different particle dynamics)

* an illumination scaling factor to dim the precipitating based on the light we have in the scene (I still need to devise a property rule to set this automatically)

The clip distance is also exposed now and considered at startup of the system - might be useful for e.g. airships when the gas bag provides rain cover (?)   or to be simply off for open airplanes
src/Environment/precipitation_mgr.cxx