Search Unity

Environment Gator

Discussion in 'Assets and Asset Store' started by Karlbovsky, Jan 17, 2014.

  1. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    I do have a request for a future update!

    At the moment, Rain and Snow are not tied to the cloud system. I would like to see the rain or snow effect lower and eventually stop as the clouds dissipate, and more importantly, not start snowing/raining until there are sufficient clouds in the scene to have such weather.

    It would also be nice to see snow turn to rain if temperature is high enough, and rain turn to snow if temperature lowers enough.

    Im going to implement these things myself, but it would be awesome if they were just part of EG!!
     
    Last edited: Sep 5, 2014
  2. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    Here is a video of the process in action!



    I changed the weather from Winter to Summer at 2:30 to make the snow melt, but for some reason the snow didn't stop (I let the forecast system switch from heavySnow to overcast before switching seasons, but the snow kept a comin)

    -removed as old-

    Rain or snow will build up on the ground according the current weather and the current temperature. High temperatures will keep the ground dry for longer where cold temperatures will slower or prevent water or snow from dissipating.
    Water will freeze into snow if the temperature is cold enough (and there is enough water), and snow will melt into water if its warm enough (if there is enough snow).
    Finally the overall saturation of the ground will cause any change to slow down or speed up according to the amount of saturation.
     
    Last edited: Sep 9, 2014
    Teila, treshold and John-G like this.
  3. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103


    Here is a video of Rain -> Snow -> Dry
     
    John-G likes this.
  4. John-G

    John-G

    Joined:
    Mar 21, 2013
    Posts:
    1,122
    Excellent, will definitely be using this combination.
     
  5. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    I am curious, does the rain collide with objects? for isntance if your in a city and enter a resturant.. u should still see rain outside but not inside. You should be able to see it from the inside just pouring outside.
     
  6. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    I will update it shortly for you with my latest tweaks. ground saturation is working much better and will cause the ground to darken and stay dark for a long time if the ground gets too saturated.

    These two together really amaze me and you have so much control over them both. Weather and specifically the effects on the environment are a large part of my games core and EG was the clear winner. RTP has no competition :p

    I just tried this myself and the particles can be set to collide (the prefab is set to a specifc layer, I switched it to everything), I placed a flat cube above my character and moved it around runtime, it stopped the rain. However by default the emitter is 20 or so meters above the camera, so you would need to handle this somehow for tall structures.
     
    John-G likes this.
  7. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    296
    This one flew under my radar, but looks really well done - dat weather! - ill pick it up! Hopefully, as others have said, this can integrate well with Sunshine's features.
     
  8. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    Karlbovsky, loving this system so much! I have a few questions if you wouldn't mind indulging me.

    How would I go about adjusting the rate at which rain and snow stop on a weather change, and how do I adjust the rate at which it changes from current weather to forecast?

    A suggestion if I may, make thunder only happen some of the time when it switches to rain or overcast so that you can have dark drizzly days without thunder.

     
    Last edited: Sep 7, 2014
    John-G and F-B-S like this.
  9. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi to all,

    @TemplarGFX
    Your implementation improves more and more. Great job!!
    Hehe, absolutely free to ask!
    Most of your suggestions are spot on and already in the "toDo" list of the new weather/precipitations system ;).
    I'll write something about the new features as soon as i've defined the whole thing.
    Meanwhile you can tweak things a bit, via code.
    This is already possible but it's a bit hard-coded inside the ElementsGator.cs. You can change the "fade In / fade out" of precipitations via code, changing the <t> ( last parameter ) inside the Mathf.Lerp() functions.
    Code (CSharp):
    1.  
    2. public void [B]SetCurrentElement[/B](int precType) //0=All,1=LightRain,2=HeavyRain,3=LightSnow,4=HeavySnow
    3.     {
    4.         if(ElementsAreActive)
    5.         {
    6.             if(precType == 1 || precType == 2)
    7.             {
    8.  
    9.          //ACTIVATE  EGTL ( thunder/lighting )  ** [I]HERE YOU COULD DO SOMETHING FOR THUNDERS [/I] **
    10.                 if(!thunder.gameObject.activeInHierarchy)
    11.                        thunder.gameObject.SetActive(true);
    12.  
    13.                 //FadeOut and TurnOFF Snow
    14.                 if(ps_Snow.gameObject.activeInHierarchy){
    15.                     ps_Snow.emissionRate = Mathf.Lerp(ps_Snow.emissionRate,0f,0.025f); //<< --- < t > for  transitions speed
    16.                 if(ps_Snow.emissionRate < 6f){
    17.                         ps_Snow.Stop();//New 1.5
    18.                         ps_Snow.gameObject.SetActive(false);}
    19.                 }
    20.                 //ACTIVATE the ps_Rain particle system
    21.                 if(!ps_Rain.gameObject.activeInHierarchy){ .........
    22.  
    Note that you may need to modify the EGSoundsManager Panel values, according to new fades's lenght.
    Here you can do something inside the ACF panel, for the moment. Overcast Speed indicates Clouds's transitions speeds.
    APC - 2014.03.21 13.41 - 001.3d.jpg

    As said before, all these aspects and something more will be exposed and " Gatorized " soon, in the new system. So I suggest you to don't go crazy too much at writing code, just tweak them brutally via script, for the moment.;)

    I'll be back soon with weekly dev-update!!

    Regards,
     
    John-G likes this.
  10. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    Thankyou for the information! I went about changing the rain just as you described, so Im glad I did it right! :p

    At the moment I am just "playing" most of what I am doing is ensuring asset A can do task B etc etc. So no big customizations if I can!

    Can't wait for the update!


    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class EGSync : MonoBehaviour
    6. {
    7.   private AtmosGator accessAtmosGator;
    8.   private ReliefTerrain accessRTP;
    9.   private ElementsGator accessElementsEG;
    10.   private EnvironmentGator accessEG;
    11.   private float current_water = 0f;
    12.   private float current_snow = 0f;
    13.   private float current_temp = 0f;
    14.   private float current_rain_intensity = 0f;
    15.   private float current_snow_intensity = 0f;
    16.   private float current_saturation = 20f;
    17.   private float surface_temp = 0f;
    18.   private float current_absorbtion = 0f;
    19.   private float current_evaporation = 0f;
    20.   private float current_freeze_level = 0f;
    21.   private Color[] default_water_color = {Color.white, Color.white,Color.white,Color.white,Color.white,Color.white,Color.white,Color.white};
    22.   private float[] default_water_opacity = {0f,0f,0f,0f,0f,0f,0f,0f};
    23.   private float[] default_water_flow = {0f,0f,0f,0f,0f,0f,0f,0f};
    24.   private float[] default_wet_flow = {0f,0f,0f,0f,0f,0f,0f,0f};
    25.   private float[] default_water_level = {0f,0f,0f,0f,0f,0f,0f,0f};
    26.   public int RTP_layers = 8; //number of texture layers used in RTP (currently maxed at 8 as you can tell by the above arrays. just expand those to 12 if needed
    27.   public Color ice_color = Color.white; //Color of the water when its frozen (use inspector. Alpha is specularity in RTP)
    28.   public float ice_opacity = 1f;
    29.   public float ice_flow = 0f;
    30.   public float ice_level_adjust = 0.15f; //lower the appearance of the water level on the layers. can be used to increase visible detail of terrain when iced over
    31.   public float min_saturation = 10f; //Absolute Minimum ground saturation
    32.   public float water_soak_level = 55f; //Maximum RTP water level to respresent saturation in the ground (55 is a good value just before water appears on surface)
    33.   public float water_accum_rate = 0.1f; //max speed at which water increases in RTP per update
    34.   public float snow_accum_rate = 0.3f; //max speed at which snow increases in RTP per update
    35.   public float water_evap_rate = 0.006f; //max speed at which water (on surface) will evaporate per update
    36.   public float water_absorb_rate = 0.07f; //max speed at which surface will abose water (on surface) per update
    37.   public float water_freeze_rate = 0.04f; //max speed at which water freezes to ice  (not yet used) per update
    38.   public float snowice_melt_rate = 0.6f; //max speed at which snow or ice melts to water per update
    39.   public float snow_melt_temp = 5f; //melting temperature
    40.   public float water_freeze_temp = 3f; //water freeze temperature (not yet used)
    41.   public float max_temp = 40f; //maximum temperature atmosphere can reach (can be used to make tiny adjustments to abdorbtion/evaporation
    42.   public float saturation_temp_adjust = -5f; //Maximum change in surface temperature from saturation
    43.   public float snow_temp_adjust = -20f; //maximum change in surface temperature from snow accumulation
    44.   public float rain_temp_adjust = -10f; //maximum change in surface temperature from water accumulation
    45.   public float update_speed = 0.1f; //speed at which script updates
    46.   void Start ()
    47.     {
    48.     //assign our access
    49.     accessAtmosGator = GameObject.FindGameObjectWithTag ("EnvGat").GetComponentInChildren<AtmosGator> ();
    50.     accessRTP = GameObject.FindGameObjectWithTag ("Terrain").GetComponentInChildren<ReliefTerrain> ();
    51.     accessElementsEG = GameObject.FindGameObjectWithTag ("MainCamera").GetComponentInChildren<ElementsGator> ();
    52.     accessEG = GameObject.FindGameObjectWithTag ("EnvGat").GetComponentInChildren<EnvironmentGator> ();
    53.     //setup current atmo
    54.     current_temp = accessAtmosGator.temperature;
    55.     //set initial surface temp according to saturation
    56.     surface_temp = current_temp + (saturation_temp_adjust * (current_saturation / 100f));
    57.     current_water = accessRTP.globalSettingsHolder.TERRAIN_GlobalWetness * 100f;
    58.     current_snow = accessRTP.globalSettingsHolder._snow_strength * 100f;
    59.     base.Invoke("GrabRTP", 0.5f);
    60.     base.InvokeRepeating ("UpdateWeather", 1f, update_speed);
    61.     }
    62.  
    63.   void GrabRTP ()
    64.     {
    65.     for (int i = 0; i < RTP_layers; i++)
    66.       {
    67.        default_water_color[i] = accessRTP.globalSettingsHolder.TERRAIN_WaterColor[i];
    68.        default_water_opacity[i] = accessRTP.globalSettingsHolder.TERRAIN_WaterOpacity[i];
    69.        default_water_flow[i] = accessRTP.globalSettingsHolder.TERRAIN_Flow[i];
    70.        default_wet_flow[i] = accessRTP.globalSettingsHolder.TERRAIN_WetFlow[i];
    71.        default_water_level[i] = accessRTP.globalSettingsHolder.TERRAIN_WaterLevel[i];
    72.       }
    73.     }  
    74.   void UpdateWeather ()
    75.     {
    76.     //set intensities.  This would be better done reading particle emission rate and equalizing to 0..1  working on it
    77.     accessRTP.globalSettingsHolder.TERRAIN_RainIntensity = 0f;
    78.     current_rain_intensity = 0f;
    79.     if (accessAtmosGator.WeatherNow == AtmosGator.WeatherStatuses.lightRain)
    80.       {
    81.       current_rain_intensity = 0.5f;
    82.       }
    83.     if (accessAtmosGator.WeatherNow == AtmosGator.WeatherStatuses.heavyRain)
    84.       {
    85.         current_rain_intensity = 1f;
    86.       }
    87.     current_snow_intensity = 0f;
    88.     if (accessAtmosGator.WeatherNow == AtmosGator.WeatherStatuses.lightSnow)
    89.     {
    90.       current_snow_intensity = 0.5f;
    91.     }
    92.     if (accessAtmosGator.WeatherNow == AtmosGator.WeatherStatuses.heavySnow)
    93.     {
    94.       current_snow_intensity = 1f;
    95.     }
    96.     //read current atmo  (temp is limited to >0.  sub-freezing to be added later)
    97.     current_temp = Mathf.Clamp (accessAtmosGator.temperature, 0f, max_temp);
    98.     current_water = accessRTP.globalSettingsHolder.TERRAIN_GlobalWetness * 100f;
    99.     current_snow = accessRTP.globalSettingsHolder._snow_strength * 100f;
    100.     //calc current evaporation, absorbtion and surface temperature
    101.     current_evaporation = water_evap_rate * (current_temp / max_temp);
    102.     if (current_water <= water_soak_level && surface_temp > water_freeze_temp)
    103.       {
    104.       //only evap saturation if there is no standing water and its warm enough
    105.       current_saturation -= (current_evaporation * (1-(current_saturation / 100f)));
    106.       }
    107.     float surface_want_temp = current_temp - Mathf.Lerp(0f,snow_temp_adjust, current_snow / 100f);
    108.     surface_want_temp += Mathf.Lerp(0f, rain_temp_adjust, current_water / 100f);
    109.     surface_want_temp += Mathf.Lerp(0f, saturation_temp_adjust, current_saturation / 100f);
    110.     surface_temp = Mathf.Lerp(surface_temp, surface_want_temp, Mathf.Abs(surface_want_temp - current_temp) / max_temp);
    111.     current_absorbtion = (water_absorb_rate * (1-(current_saturation / 100f)));// * (surface_temp / max_temp);
    112.    
    113.     if (surface_temp >= snow_melt_temp)
    114.       {
    115.       //convert falling snow to rain on surface
    116.       float melt_amount = Mathf.Lerp (0f, current_snow_intensity, (surface_temp - snow_melt_temp) / (max_temp - snow_melt_temp));
    117.       current_snow_intensity -= melt_amount;
    118.       current_rain_intensity += melt_amount;
    119.       if (current_snow > 0f)
    120.         {
    121.         //melt standing snow to water
    122.         melt_amount = Mathf.Lerp (0f, snowice_melt_rate, (surface_temp - snow_melt_temp) / (max_temp - snow_melt_temp));
    123.         current_snow -= melt_amount;
    124.         current_rain_intensity += melt_amount;
    125.         }
    126.     }
    127.     //calculation rain absorbtion/evaporation
    128.     if (current_rain_intensity >= current_evaporation)
    129.       {
    130.       //rain is strong enough to not evap on contact
    131.       current_rain_intensity -= current_evaporation;
    132.       if (current_rain_intensity >= current_absorbtion)
    133.         {
    134.         //rain is strong enough to obsorb into ground
    135.         current_rain_intensity -= current_absorbtion;
    136.         current_saturation += current_absorbtion;
    137.         if (current_saturation > water_soak_level)
    138.           {
    139.           //over saturated ground converts saturation back to water
    140.           current_rain_intensity += current_saturation - water_soak_level;
    141.           current_saturation = water_soak_level;
    142.           }
    143.         if (current_rain_intensity > 0f)
    144.           {
    145.           if (current_freeze_level <= 0.5f)
    146.             {
    147.             accessRTP.globalSettingsHolder.TERRAIN_RainIntensity = current_rain_intensity;
    148.             }
    149.           //any remaining rain added to RTP water level
    150.           current_water += water_accum_rate * current_rain_intensity;
    151.           }
    152.         }
    153.       }
    154.     if (current_snow_intensity > 0f)
    155.       {
    156.       //accumulate snow (will be melted/evaporated next update according to atmo)
    157.       current_snow += snow_accum_rate * current_snow_intensity;
    158.       }
    159.     if (current_rain_intensity == 0f && surface_temp > water_freeze_temp && current_water > current_saturation + 1f && current_snow < 50f)
    160.       {
    161.        //only absorb/evap surface water if snow is not thick
    162.        float absorb_amount = Mathf.Lerp(0, current_absorbtion, (surface_temp - water_freeze_temp) / (max_temp - water_freeze_temp));
    163.        current_water -= absorb_amount;
    164.        current_saturation += absorb_amount;
    165.        current_water -= Mathf.Lerp(0, current_evaporation, (surface_temp - water_freeze_temp) / (max_temp - water_freeze_temp));
    166.       }
    167.     //calculate visual level of water freezing for interpolation below
    168.     if (surface_temp <= water_freeze_temp)
    169.       {
    170.       //freeze water
    171.        if (current_freeze_level < 1f)
    172.          {
    173.           current_freeze_level += water_freeze_rate;
    174.          }
    175.        else
    176.          {
    177.           current_freeze_level = 1f;
    178.          }
    179.       }
    180.     else
    181.       {
    182.       //melt ice
    183.       if (current_freeze_level > 0f)
    184.         {
    185.         current_freeze_level -= water_freeze_rate;
    186.         }
    187.       else
    188.         {
    189.         current_freeze_level = 0f;
    190.         }
    191.       }
    192.      
    193.     //interpolate between default (water) and ice layer settings according to above
    194.     for (int i = 0; i < RTP_layers; i++)
    195.       {
    196.       accessRTP.globalSettingsHolder.TERRAIN_WaterColor[i] = Color.Lerp(default_water_color[i], ice_color, current_freeze_level);
    197.       accessRTP.globalSettingsHolder.TERRAIN_WaterOpacity[i] = Mathf.Lerp(default_water_opacity[i], ice_opacity, current_freeze_level);
    198.       accessRTP.globalSettingsHolder.TERRAIN_Flow[i] = Mathf.Lerp(default_water_flow[i], ice_flow, current_freeze_level);
    199.       accessRTP.globalSettingsHolder.TERRAIN_WetFlow[i] = Mathf.Lerp(default_wet_flow[i], ice_flow, current_freeze_level);
    200.       accessRTP.globalSettingsHolder.TERRAIN_WaterLevel[i] = Mathf.Lerp (default_water_level[i], default_water_level[i] - ice_level_adjust, current_freeze_level);
    201.       }
    202.     //clamp values to limits
    203.     current_water = Mathf.Clamp(current_water, current_saturation, 100f);
    204.     current_snow = Mathf.Clamp(current_snow, 0f, 100f);
    205.     current_saturation = Mathf.Clamp(current_saturation, min_saturation, water_soak_level);
    206.     //push values to RTP and refresh
    207.     accessRTP.globalSettingsHolder._snow_strength = current_snow / 100f;
    208.     accessRTP.globalSettingsHolder.TERRAIN_GlobalWetness = current_water / 100f;
    209.     accessRTP.globalSettingsHolder.Refresh();
    210.     }
    211. }
    First the atmospheres ability to evaporate water is calculated, then the grounds ability to absorb water. Next Surface Temperature and Surface Saturation is modified according to temperatures, saturation and rain/snow.
    Next snow is melted to water on contact if temperature is high enough. Any remaining snow is then accumulated to the ground. Any existing accumulated snow is melted according to the temperature.
    Next rain is calculated, first some of the rain evaporates on ground contact, next some of the rain is absorbed by the ground, and then the remaining rain is accumulated on the surface.
    Accumulated water is finally evaporated according to the atmo and the final settings are sent to RTP.


    --EDIT--

    Updated the code above to now include freezing of water and changing the water properties to match. Now you can have water underneath the snow which will freeze into ice!

    --EDIT2--
    Fixed a few bugs and applied my values derived from testing (30m day cycle).

    Next up : Take current light attentuation from clouds into account for calculations

    I hope you dont me posting these updates here!
     
    Last edited: Sep 9, 2014
    John-G likes this.
  11. Jesse_Pixelsmith

    Jesse_Pixelsmith

    Joined:
    Nov 22, 2009
    Posts:
    296
    Hi I've been just diving in to using this and I have a bit of feedback.

    In my project I use a layer called "Ground" for the terrain and all walkable surfaces. This name is hardcoded into my scripts via string with NameToLayer.

    Upon doing the crash course I see the instruction that I need to add the CollideWithElements layer and change my terrain to that. Rather than changing all of my scripts which mention "Ground" to "CollideWithElements" to suit the plugin, I'd prefer that there be some kind of layermask property on the EG prefab to select which *existing* layers should collide with elements. This would also open up the possibility that there could be more than one layer if someone needed to (for whatever reason) use two layers that both should collide with elements. That would also free up an extra layer (there's only 32 :))
     
  12. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Salutations to all,

    The CollideWithElements layer is required for Rain - Snow particles collision check. You can easily change the layer inside the particle systems, collision tab. everything should work the same, hopefully :).
     
  13. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    Could you point me in the right direction for some doco on your sun-shaft implementation? I'm having issues with the built in unity system, and this custom one I am using is ok, but lacking in options. Unfortunately I see no shafts with your enabled :(



    Spent most of today changing the curves and gradients. you can get some pretty good GI faking going on
     
  14. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    After further investigation, it appears that the GEO object (and its children) are blocking the sun-shafts (unity pro) from being visible to the camera. Turning of "rely on zbuffer" causes a weird "negative" shaft effect where the areas that should be in shadow have the shafts, and where the shafts should be is shadow.

    If I disable GEO and its children at run time, the shafts show up. Anyone willing to assist me on getting around this?
     
  15. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    @TemplarGFX
    Hi, don't panic. We'll figure it out. ;)
    • Are you in Flat or Spherical world mode? ( aKa are u using atmospheric scattering or skyboxes?)
     
  16. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    Im in Spherical mode, full atmo and full ACF. Thankyou for assisting!
     
  17. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Ok, let's start with the UnityPro shafts. The process should be very simple. The fact that Geo objects block the shafts, may depend on a wrong position of the sun ( maybe of the entire EG ) inside the scene.
    try this:
    • Go to Add Settings Panel.
    • Disable Custom Shafts
    • Click the Check&Set Button
    • Now attach the SunShafts.js ( UnityPro Image Efx script ) to the camera.
    • Put theSun gameobject as Shafts Caster go.
    • At this point you should be able to see something.(keep the other SunShafts settings as they are by default for the moment ).
    • Enter Play mode and have a look.
    • If you still have the same issue ( Geo blocking shafts ) , please check the position of theSun and of the EG at runtime. ( the EG should be at 0,0,0 or at your scene relative 0,0,0 ).
    it's just a first step..
     
  18. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    I did this, and unfortunately when I add the sun-shaft script I see nothing on screen, unless I disable "rely of z depth buffer" but then the shafts appear only inside my "world" game objects. (see this thread : http://forum.unity3d.com/threads/sunshaft-culling-somehow-inverted.267710/) for screenshots of this inverted culling with z-depth disabled.

    At runtime my EG is correctly at 0,0,0 and the sun is out at around the 11000, 4000, 0
     
  19. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Mmh..that's strange.
    How is your main camera set?
    Try the sunshafts.js on another camera (default one ) and see what happen..
     
  20. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    I tried creating a new camera and using that, at first I thought it was working, then I realised the Far Clipping plane was was at 1000 (clipping out GEO). when I push it back to 9000 the shafts go away :(

    I have read in a few threads people using 2 cameras, one for effects and one for drawing the world, Perhaps I need to do this?


    --EDIT-- So I should have checked this earlier. This is only happening in Deferred mode. In Forward, the sun shafts correctly display with "rely on z-buffer" selected.
     
    Last edited: Sep 11, 2014
  21. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    Looks like Im stuck in Forward rendering for now. All sorts of other things (no EG related are going haywire in Deferred mode)

    Is there a way to control Ambient intensity separate to the Ambient Light Curve?


    Here is a video of Nasos' GI Proxy integrated into Environment Gator

     
    nasos_333, treshold and John-G like this.
  22. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    In the documentation there is mention "As soon as i finished the scripting of some new features(calendar,etc..)"
    Is there any insight when calendar system will be implemented, like before 2.0 etc? What kind of system have you thought of? Like can we define days in month and which current season range is in months for example?
     
  23. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi,

    Yes, the idea is to have an in-game time calendar, based on the EG day-night cycle. This will allow season changes ( @RunTime) and some useful time/date related references. For example we will be able to program some events based on a given date/day of the month, etc..When this will be implemented? I don't know yet, hopefully before the 2.0, in the worst case scenario, in 2.0. Now that i've implemented an xml parser to handle presets, things may speed-up a bit. ;)

    Do you mean, how to have a "fixed" Ambient Light Gradient?
    If that's the case, you can do this inside the Global Illumination panel, there's a toggle that says, Ambient Light Use Gradients, deselect that, and the Ambient Light Gradient should be.. free.

    sorry guys, i'm a bit of a hurry right now, be back soon with the weekly dev-update!
    Regards,
     
  24. Rico21745

    Rico21745

    Joined:
    Apr 25, 2012
    Posts:
    409
    I saw the new demo and this is looking a lot nicer. Just a few questions:

    How easy is it to customize the art for the system? Things like particle effects, sounds, etc

    If I grabbed this I'd be looking to replace the standard particles (are they shuriken?) with something like this:
    https://www.assetstore.unity3d.com/en/#!/content/5048

    And the weather effects with some of my own that can loop a little better (you can sort of tell the looping with the ones in the current demo)
     
  25. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi,

    This is one of the main goals of the component, you can easily create new art assets and replace the "default" ones.
    As far as i can tell, you can do this on pretty much every asset, if you need any help on that, i'll be glad to help.

    Same thing for the Shuriken particle system, you can:
    • modify the default one as you wish ( rain & snow ) .
    • create a brand new one and put it inside the EG. ( just need to call it as the default one, for them moment ) .
    • replace the default one with 3rd party assets. ( must be build with Shuriken , and called as the default one ) .
    hope it helps.

    stay tuned for the weekly update..

    Regards,
     
  26. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi to all,

    it's time for a ( quick ) weekly-update..

    The 1.6 has entered in beta stage and is under stress during those days, let's see what's inside.

    Presets system ( beta ).
    A first version of the preset system will be one of the main features of the 1.6.
    Now we'd be able to store current settings in a preset, pair it with an ACF ( clouds prefab ) and quickly switch between different settings. Read more about the Preset System here.

    ElementsGator.
    As stated many times, the next big thing will be the rework of the weather system , precipitations, clouds, etc..
    The ElementsGator will be the main actor of this rework, so i've started making a smarter guy of it.
    Now the component has a new set-up/start feature that will control his behaviour at runtime, we can decide if it is Dynamic or Static, the gameObject to follow in case it's dynamic, the moment in time when the ElementsGator should attach itself to a gameObject to get his positon's reference, the particle systems to use for Rain and Snow, etc..
    ( read more here ).

    p.s.
    This will bring more freedom in scene's setup, since now the ElementsGator is no more related to the presence of the MainCamera in the scene.

    There are a lot of other minor fixes and adjustments in 1.6.
    There's a new cloud's shader, that takes AmbientLight into account. The output is really nice, there's now more contrast between the clouds layers. The Editor has been reworked a bit , with some "user-friendly" adjustments.

    Anyway, it's still in beta, so i may decide to add something else before 1.6 will be released. ;)
    Keep an eye on the dev-log from time to time.

    Happy week end!!

    Best Regards,
     
    Last edited: Sep 21, 2014
  27. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    I cannot wait to see the new features, tweaks and updates! I'm loving EG!
     
  28. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi to all,

    we probably have a release candidate for the 1.6 update. Actually i've delayed it a bit 'cause of some editor related bugs and , mostly, because i was experimenting with the new clouds system ( not included in 1.6 ), but it's too early for that, performances are baaad. Anyway, there's a lot of new stuff in 1.6 and if everything goes in the right direction, i'll be able to publish the update, during this week-end / early next week.

    Change Log:
    Edit. Internal. File Versioning changed to ( 4 numbers format. 0=alpha 1=beta 2=rc 3+=Release ) [i.e vers# 1.6.0.2 is Version 1.6 alpha 2].
    Edit. Editor & Internal. Now the System ( EG ) will tell us when we need to click the Check&Set button after changes.
    Edit. EGShafts. Now we can choose to have or not the EgShaft applied to theMoon. Internal System reworked.
    Edit. Shaders. Main Perlin's shader ( egcpBumpNoBlend ) and egc_1.5 shader, now are affected by AmbientLight.
    Edit. ElementsGator. Now the component has a new Editor and new features. We can select if it's Dynamic or Fixed, and we can choose the gameObject to follow, in Editor and/or at runtime.(more in user Doc ).
    The ElementsGator will set by itself, according to our entries. We can now assign the particleSystems to spawn [ internal, custom/3rdParty ] ( started with Rain-Snow will then be added SandStorms, Tornadoes, etc..). Read more inside the Doc.
    Edit. EGShafts. Smoother transition between Clear and Overcast weather situations.
    Edit. EGClouds. Enhanced clouds textures.
    Edit. Particle System. Adjusted PS_Rain Texture and particle system settings.
    Added. ElementsGator. Precipitations_Mist Particle. New ParticleSystem that adds Mist and Ground Mist to precipitations. Activable by current Weather.
    Added. ElementsGator. WindZones Control ( alpha ). Dynamic WindZone according to current Weather.
    Added. EnhancedNight. The moon will have a role in 'sky night lighting' .
    Added. HdrNightXOver ans HdrDayXOver values. This allows to program "when" the switch from theSun to theMoon (& viceversa ) should be performed.(!!According to HDRCurves's values!! ).
    Added. HardCoded OverallASEventsSpeed. This controls the overall speed of all the Atmospheric Scattering parameters.
    Added. EGClouds. bool FixNightAlpha and a flotat NightAlpha. Used in order to have a particular layer with a specific ( different from ACF settings ) alpha during night-time.
    Added. Editors Selections Grids. More Compact Editors.
    Added. PRESETS in Editor. Store/Load EG's values from XML files and from EGDrawer.prefab + Set up prefabs to instantiate. ( feature in beta stage, read the documentation).
    Added. EGclouds. MultiplyBrightness parameter. Set a multiplier for the Brightness value of the corresponding cloud layer. Useful in order to have brighter clouds on top.
    Added. Global Illumination. Ambient Light now can be animated to simulate cloudy conditions.

    There's a gallery of some recent screens here.
    Unity 2014-10-08 17-44-18-56.png
    Unity 2014-10-08 17-49-40-76.png
    Unity 2014-10-08 18-23-43-54.png

    EG1.6 is coming soon..

    Best Regards,
     
    John-G likes this.
  29. 2dchaos

    2dchaos

    Joined:
    Sep 11, 2013
    Posts:
    63
    Hi there, your asset looks great, will it be compatible with Unity 5 shaders? ;]
     
  30. TemplarGFX

    TemplarGFX

    Joined:
    Aug 21, 2014
    Posts:
    103
    @Karlbovsky
    Looking really nice! I can't wait for the update, some of the listed changes are sweet! The enhancements to ElementsGator in particular sound great!
     
  31. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Thx! Actually, in Unity 5 a lot of things should change, starting from the Uber shader , realtime global illumination, HDR all the way down, scripting sintax, and then the audio system and other tons of new feats or improvements,
    so the short answer is: "I dunnooo..!" ;)
    Jokes apart, i'm really waiting 5 for a lot of reasons and as far as i know, what i can say is that the EG should be compatible with Unity5, the Uber shader and PBS need to be tested though.

    I also believe that there are some interesting things in this update..it's almost ready!

    now, back to work..

    Regards,
     
  32. 2dchaos

    2dchaos

    Joined:
    Sep 11, 2013
    Posts:
    63
    Thanks, can't wait for it too ^^
     
  33. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi to all,
    the fall update is, finally, here!!

    Environment Gator 1.6 has been released and...an HotFix has been released too!! t.t

    You can find all the news inside this update along with the updated documentation @ www.sixteenleft.com .
    Check the Dev-Log online.
    New WebPlayer Demos released.

    Note:
    Currently the 1.6.3.1 version is fully working except for a small bug that prevents to build pointing the
    WebPlayer platform. The good news are that the 1.6.3.2 hotfix has been already submitted and waiting
    for approval !! So you might want to wait for the hotfix to be released , before downloading the update.
    Sorry for the inconvenience, but 1.6 it's a pretty big update and a couple of editors related definitions went wrong.

    Anyway 1.6.3.2 will fix it, in a blink !!

    Stay tuned for a " What's next ? " topic!!
    Hope you'll like the 1.6 update!!

    Best Regards,
     
    John-G likes this.
  34. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi,

    the EG 1.6.3.2 is online!!
    The update contains the hotfix for the webplayer platform issue.

    EdiT:
    "Never prepare packages late at night..."
    There is a tiny oversight inside the EGBlank prefab though. An EGAudioZone has the collider not set as "Trigger", this can screw up things in your scene. It's the first EGAZ you'll find inside the EGBlank prefab.

    We have several way to solve it. ( i'll upload the fix as well ).
    1. Kill the EGAZ or
    2. set his collider as "Trigger".
    EGAudioZones inside the EGPrefab are just placeHolders and we can delete/add and set them as we wish!

    I'll be back soon with info about the next update!

    Best Regards,
     
    treshold and John-G like this.
  35. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    billboard_trees_issue.jpg I have a slight problem with billboarded trees - billboard tree edges have highlight and I think this has to do with the render order of things but how do I change it so billboard would get blended better with clouds and stuff?
    I'm using Unity Free :D
     
  36. treshold

    treshold

    Joined:
    Nov 9, 2013
    Posts:
    225
    Okay I used Advanced Foliage Shader V3 and adjusted little bit render queue on it's billboard shader. Looks good to me lol
    AFS_billboard1_.png
     
    John-G likes this.
  37. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Right choice!! I'm happy you solved it !!
    .. and, nice screenshot! ;)
     
  38. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi to all,

    i'm testing the EG with the Uniyt5.0.0b9 during these days and , luckly, things are not so messed up as i thought, but there are some issues. Some tags are missing and need to be manually replaced and some strange behaviours with some colliders occur (i.e. the GDome collider, even if is set as "Trigger", performs normal collisions and throws the player in deep space ). Anyway, nothing serious ( the GDome will no longer have a collider in next versions ) and if you are going to test your game with Beta5, just deactivate the SphereCollider attached to the GDome and the problem it's gone.

    A part from that , everything seems to work well with Unity5, that's a good news!
    After those tests, i'll be back with a more precise "what's next" topic, about the upcoming versions of the EG.

    Best Regards,
     
  39. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Is there a way already to have stars 'twinkle'? Really loving the night skies on Mars in Bungie's Destiny. Beautiful effect that I would like to emulate in my game. Thanks and thanks for the great asset.

    Gary
     
  40. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi Gary,

    The current Starfield actually rotates, giving a bit of that kind of effect, that it's more noticeable if you enter GodMode with the EG and speed up the Time ( RightMouseBtn ), even better with a full clear sky .

    Another thing you can try to do, is to activate the StarsGator ( SkyBox Panel ). This will activate a programmable Particle System that can be used to reproduce stars. Since it is 'just' a Shuriken gameObject, you can tweak it as you wish, and let the EG to handle when it's time to spawn Stars and when it's time to set them to sleep.

    Oh, i was forgetting about the GSpheres. You can play with them too , in fact they can be tweaked in depth, starting from their textures/material, their life-span ( Time or Weather related ), their rotation, and so on...

    Now, i don't know if this will be enough to reach the beauty of Bungie's works, but you can definetly give it a try! ;)
    Let me know if you have any suggestion or request !

    Thank you for the support!

    Best Regards,
     
  41. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    Okay. I am running Gator in Unity 5 beta, and attempting to get it working with Oculus Rift DK2.(latest SDK) and OVRController. I see no way to get this setup and working with the Gator. Any help would be greatly appreciated!
     
  42. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    Let us know if u get this working. My project is on rift DK2 as well.
     
  43. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi,

    there's a lot involved here.
    Probably a list of "implementation issues" will help me.
    I had no idea of what OVRController was, before this post, and i'm not sure if i've googled the right thing,
    is OVRController == This ? o_O

    Anyway, if u have issues with beta5, i can help, with the Oculus ( not yet ) and the other component, mmhh, i'm not sure.
    Try to post a more exaustive "what's the problem ( s )", maybe, if not me, someone else could help.

    Regards,
     
  44. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    I will be purchasing a copy of this system very soon, but I have a question.. Do you think this will work with upcoming version of Skyshop and Unity 5?
     
  45. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    No.. ovr controller is what occulus has on their website as a unity package. https://developer.oculus.com/

    Just go there sign up as a developer and go to the downloads section for developers. You will find the unity package. Even if u dont have a rift u could use it... and see whta it looks like in play mode.
     
  46. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    It is a controller/camera rig. As kurylo3d said sign up and get the SDK and you can get Gator ready for those developing now and for its eventual release. Thanks.
     
  47. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi there,

    Hi, what i can say for sure , is that it works in Unity Beta5, there are some tiny things to fix here and there ( see above topics ), but hopefully the transition to 5 should be smooth.

    Ok, my fault. I think i've delayed this moment for too long. Will be Oculus time soon!!
    Probably i'll be able to look at the whole thing during this weekend!

    Stay tuned and thanks for supporting the Gator!!

    Best Regards,
     
    kurylo3d likes this.
  48. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    601
    That is great news! I hope 'soon' means REALLY soon :) Thank you for the asset and your support.

    Regards,

    Gary
     
    kurylo3d likes this.
  49. Wavinator

    Wavinator

    Joined:
    Dec 24, 2013
    Posts:
    79
    Hi. Is it possible to add more than one sun with this kit? I'm looking around for solutions that might work for a sci-fi game, preferably one that might work with the stars and nebulas of either Space Graphics Toolkit or Space for Unity.
     
  50. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hi to all,
    the usual quick update.

    Road to Unity 5
    As i said in previous posts, the EG is working great inside the Beta13. Last week i worked on shaders, physics, etc..in order to respect the rules of unity5.

    I've noticed some strange behaviours though, when it's time for the compiler to "put things toghether".
    i.e. All the old shaders just work fine in unity5 if we import the package, we can rebuild and recompile nTimes without getting any error. Things changes if we do "convert" an old project with the EG inside, some of the shaders won't compile due to some ( very easy to fix ) float truncations and other little things. My question is, why is the same shader compiled with no errors and working if i just import the package? Anyway, i've started rewriting them in order to solve every issue.

    I've also started to play a bit with the Oculus DK( no hardware, yet ) and... it's working.
    I mean, i've made just a couple of tests and commented a couple of lines of code, and i was at least able to have a first working setup of the scene for testing. Unity 2014-11-20 16-58-33-05.png
    Since now i have an overall idea of what we're talking about we can start tracking issues with the Rift DK. @garyhaus

    Networking the EG.
    I'm working on a small free project that has a Multiplayer mode and i'll probably put the EG inside the project. This might lead to a script that will control the EG over a networked environment..

    In short, yes. With some few limitations ( aKa no light emission for the "others" sun) and some
    adjustments we can have more than 1 sun in our scene.

    That's all for this update, like usual, feel free to ask for further info or suggestions.
    see you all soon!


    Best Regards,
     
    Teila likes this.