Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

SilverLining for Unity: 3D volumetric clouds, sim-quality procedural skies [DEPRECATED]

Discussion in 'Assets and Asset Store' started by sundog, Oct 6, 2011.

  1. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Hi gang,

    A new version of SilverLining is now available on the asset store. It includes a few of the tweaks and optimizations discussed earlier in this thread.

    - Cloud densities are now more accurate on cumulus clouds, and in general more dense. As a result, if you're upgrading, you may need to dial down the "cumulus coverage" a bit to match the previous look and performance level.

    - Our approach to fog has changed as discussed earlier in this thread. If you have "apply fog to sky" enabled, we will use the fog density in your render settings but set the fog color automatically in order to ensure good blending of the terrain and sky at the horizon.

    - There is a new setting for "cumulus brightness" that can be used to create darker clouds that suggest stormy conditions. For example, here's a cumulus layer with a brightness of 0.2:

    $darkclouds.jpg

    You will need Unity 4.3.4 or newer to import this new asset version.

    Enjoy!
     
  2. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,231
    The "SilverLiningMoonLight" object always switches color to black at runtime, no matter what I've set it to. And since it's black, no light is emitted. How do I force it to use my color selection?
     
  3. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Price drop!

    FYI we have reduced the price of SilverLining from $125 to $100, in order to stay in line with our competitors. Of course I'm biased, but I think this is a pretty good deal for a dynamic sky 3D cloud asset that many have described as being the easiest to set up, and the most realistic :)

    This also marks the release of SilverLining for Unity 1.9, including a bug fix related to setting custom unit scale values, and improved documentation.

    Check it out in the asset store!

    (FYI, "gecko" and I resolved the issue mentioned in the previous post via email. Just realized we left it hanging here on the forums.)
     
  4. Baldwin

    Baldwin

    Joined:
    Apr 1, 2014
    Posts:
    37
    So this thing doesnt have sun cycle animation from day to night??? Only if you set it manually? How can I get the sun to rotate etcc like dynamic real time stuff...
     
  5. VIC20

    VIC20

    Joined:
    Jan 19, 2008
    Posts:
    2,603
    ? it has - it does it automatically based on location and time.
     
  6. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    There is a "continuous time advance" and "continuous time advance rate" setting in the _SilverLiningSky that you can use to make the sun and moon cycle automatically as time progresses. You can also just set the time each frame to whatever you want from a script if you prefer.
     
  7. Baldwin

    Baldwin

    Joined:
    Apr 1, 2014
    Posts:
    37
    Found it. Btw. Why can't I see the sun? Or the moon? Lol
     
  8. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Perhaps you're using a camera not tagged as "main", and therefore SilverLining couldn't push the far clip distance on it out for you to make them visible. Try setting your camera's far clip to 100,000.
     
  9. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    Hi Sundog

    I was looking to buy Time of Day but someone kindly pointed me towards your plugin as an alternative. I have a few questions:

    1) I will probably link the lat/long/UTC to a dropdown GUI interface listing major capital cities. Would there be any issues with this that you could foresee?

    2) Can you advise how the plugin handles multiple cameras? My typical scenes can have anywhere from 1 to 8 different cameras that are switched (dynamically enabled and disabled) through checkboxes on the GUI. It seems that it is just a prefab consisting of physical objects so theoretically it should be fine, I just wanted to double check.

    3) If the clouds are disabled, does it speed up the performance? Or are there still cloud calculations going on regardless of if they are visible or not?

    Finally, can you advise if you have any sort of trial or demo to make sure it will work in my scenes correctly?

    Thanks for your time!

    Michael
     
  10. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Hi Michael, thank you for looking at SilverLining!

    1. That should work just fine.

    2. You can use multiple cameras, but there is one thing to watch for - SilverLining automatically extends the far clipping plane of your "main camera" to 100km in order to ensure distant clouds, stars, etc. are visible. If you have other cameras, you'll need to make sure their far clipping planes are sufficiently far as well.

    3. Disabling clouds does speed up performance. Performance is mainly a function of the size and density of cumulus cloud layers in the scene.

    There is no trial version of SilverLining, but there is a web demo at http://media.sundog-soft.com/UnitySilverLiningWeb/WebPlayer/WebPlayer.html

    Hope this helps!
     
  11. mkpx

    mkpx

    Joined:
    May 12, 2014
    Posts:
    2
    Hi all,

    someone could help me? I don't understand what I'm doing wrong: I've made a sample scene where SL is added to an existing water plane of Triton trial, but I noticed that I get a weird effect of blue stripe on the horizon.

    Thanks in advance for your time,
     
    Last edited: May 13, 2014
  12. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    I think you just need to increase the size of SilverLining's sky dome. Try increasing the scale values on the _SilverLiningSky's translation object to 50,000 or so - that should clear it up I think.
     
  13. mkpx

    mkpx

    Joined:
    May 12, 2014
    Posts:
    2
    Yes, and thank you so much sundog!

    Shame on me, was very intuitive. May I ask if is possible also to have clouds generation extended even at the extreme limit of the horizon? In my scene that has very high camera pov seems that clouds will be generated around the middle of the sea.

    Thanks again in advance for your attention.
     
    Last edited: May 13, 2014
  14. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    You can always increase X and Z components of the "cumulus dimensions" to make the clouds extend further. You may however need to reduce the value used for cumulus coverage in order to maintain performance - the number of clouds in the scene will grow quickly as you make the length or width of the layer larger.
     
  15. EiKON-Andy

    EiKON-Andy

    Joined:
    Nov 13, 2010
    Posts:
    66
    Hi there!

    We've just started using SilverLining and it looks great. However, one thing I've noticed is a strange depth issue when rendering cumulus clouds and trees.

    Here is a screenshot of where I first noticed it:
    $clouds_trees.JPG
    You can see that they are rendering in front of the trees up the hill.

    I went to find another example and found this. Here I am looking at at clouds rendering in front of the trees:
    $in_front.JPG

    ...and if I move forward very slightly, the clouds render behind the tree:
    $behind.JPG

    Any thoughts as to what's going on?

    Thanks,

    Andy
     
  16. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Not something I've really seen before, but I can think of a few explanations.

    What is the altitude of your cloud layer, vs. the height of the trees? If they really are intersecting, the sort order between individual particles of the clouds and the trees might be changing based on the camera projection. If that's what's going on, just raising the altitude of the clouds a bit to get them above the tree line should help.

    If your world units are not equal to one meter, that could also lead to some confusion. I could explain what I'm seeing if you've compensated for the difference between SilverLining's default 1 meter per unit convention and your scene by making the clouds smaller and closer to the camera. This could result in intersections with your trees that really shouldn't exist. The proper way to deal with different unit conventions is described in SilverLining's readme file.

    It could also be that SilverLining's automatic adjustment of the far clip plane of the the "main camera" to 100km is causing the depth buffer resolution to become too imprecise. If you adjust the camera's far clip plane to be closer while running, does it clear this up? This looks more like a sorting issue than z-fighting however, so that one seems unlikely.

    Finally, one other possibility is that you are rendering SilverLining in a different camera from the main scene, and the cameras don't have the same near and far clip distances. This would cause the depth buffers in the two cameras to be incomparable, leading to depth sorting issues.

    Fundamentally the clouds are just Unity's legacy particles, and they should sort with your scene like any other particle.

    Hope that helps.
     
  17. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
  18. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Hrm, that does sound like it could explain it.. As you explained in your own thread, this is a Unity bug related to billboard trees with no apparent workaround. All we can do is vote up your bug report in hope that it gets Unity's attention (which I just did using your issue tracker link above.)
     
  19. EiKON-Andy

    EiKON-Andy

    Joined:
    Nov 13, 2010
    Posts:
    66
    Thanks Frank and Dantus. I checked out all the things in your response (Frank) and nothing worked and/or was relevant (our shoreline is at around Y=30 and we are using the standard world units).

    I think Dantus has hit the nail on the head and it's an issue with billboard trees and legacy particles - that would certainly explain why the sorting 'fixes' itself when I get closer (presumably at the point the billboard tree becomes a mesh tree).

    For what it's worth, I've voted up the bug report but since the issue is to do with Unity's legacy particles, I wonder if it will ever get looked at now..?

    Are there any plans to convert your clouds to Shuriken at all?
     
  20. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    There's a fix to the billboard terrain tree issue. I don't recall the exact steps I took, but it's a matter of shader sorting. Here's my settings for two shaders.

    BillboardTree (overriding the built-in Unity one by downloading from here and putting BillboardTree into your project then editing it):

    Code (csharp):
    1. Shader "Hidden/TerrainEngine/BillboardTree" {
    2.     Properties {
    3.         _MainTex ("Base (RGB) Alpha (A)", 2D) = "white" {}
    4.     }
    5.    
    6.     SubShader {
    7.         Tags { "Queue" = "Transparent-100" "IgnoreProjector"="True" "RenderType"="TreeBillboard" }
    8.        
    9.         Pass {
    10.             ColorMask rgb
    11.             Blend SrcAlpha OneMinusSrcAlpha
    12.             ZWrite Off Cull Off
    13.            
    14.             CGPROGRAM
    15.             #pragma vertex vert
    16.             #include "UnityCG.cginc"
    17.             #include "TerrainEngine.cginc"
    18.             #pragma fragment frag
    19.  
    20.             struct v2f {
    21.                 float4 pos : POSITION;
    22.                 fixed4 color : COLOR0;
    23.                 float2 uv : TEXCOORD0;
    24.             };
    25.  
    26.             v2f vert (appdata_tree_billboard v) {
    27.                 v2f o;
    28.                 TerrainBillboardTree(v.vertex, v.texcoord1.xy, v.texcoord.y);  
    29.                 o.pos = mul (UNITY_MATRIX_MVP, v.vertex);
    30.                 o.uv.x = v.texcoord.x;
    31.                 o.uv.y = v.texcoord.y > 0;
    32.                 o.color = v.color;
    33.                 return o;
    34.             }
    35.  
    36.             sampler2D _MainTex;
    37.             fixed4 frag(v2f input) : COLOR
    38.             {
    39.                 fixed4 col = tex2D( _MainTex, input.uv);
    40.                 col.rgb *= input.color.rgb;
    41.                 clip(col.a);
    42.                 return col;
    43.             }
    44.             ENDCG          
    45.         }
    46.     }
    47.  
    48.     SubShader {
    49.         Tags { "Queue" = "Transparent-100" "IgnoreProjector"="True" "RenderType"="TreeBillboard" }
    50.        
    51.         Pass {
    52.  
    53.             CGPROGRAM
    54.             #pragma vertex vert
    55.             #pragma exclude_renderers shaderonly
    56.             #include "UnityCG.cginc"
    57.             #include "TerrainEngine.cginc"
    58.  
    59.             struct v2f {
    60.                 float4 pos : POSITION;
    61.                 fixed4 color : COLOR0;
    62.                 float2 uv : TEXCOORD0;
    63.             };
    64.  
    65.             v2f vert (appdata_tree_billboard v) {
    66.                 v2f o;
    67.                 TerrainBillboardTree(v.vertex, v.texcoord1.xy, v.texcoord.y);  
    68.                 o.pos = mul (UNITY_MATRIX_MVP, v.vertex);
    69.                 o.uv.x = v.texcoord.x;
    70.                 o.uv.y = v.texcoord.y > 0;
    71.                 o.color = v.color;
    72.                 return o;
    73.             }
    74.             ENDCG          
    75.  
    76.             ColorMask rgb
    77.             Blend SrcAlpha OneMinusSrcAlpha
    78.             ZWrite Off Cull Off
    79.            
    80.             AlphaTest Greater 0.9
    81.             SetTexture [_MainTex] { combine texture * primary, texture }
    82.         }
    83.     }
    84.    
    85.     Fallback Off
    86. }
    Apparently mine has an extra subshader than the 4.3.4 download, I don't remember why, though it might just be that I started with an older version of the shader. (My project is super complex, and I had to make this work with water shaders too). And then I may have edited SilverLiningPuff.shader (for cumulus) to adjust the queue order, here's my setting:

    Code (csharp):
    1. Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"  "Queue" = "Transparent -100"}
    Anyway, try fiddling with the Queue ordering. Hope that helps or at least gets you on the right path.
     
    Last edited: May 28, 2014
  21. EiKON-Andy

    EiKON-Andy

    Joined:
    Nov 13, 2010
    Posts:
    66
    Thanks EarthLaunch - I'll look into that!

    Sundog: I noticed that there is actually a shuriken cumulus prefab and found
    Code (csharp):
    1. public bool shuriken = false;
    in SilverLiningCumulusCloud.cs

    I set that to true (hoping for too much maybe!) but lost all my clouds completely so I've set it back to false for now. Is this something that is supposed to work? Or maybe something that has been started but not yet finished?

    Thanks,

    Andy
     
  22. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    At one point we had Shuriken particles working, but we found it basically cut performance in half. So, that code was abandoned.
     
  23. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    I have an issue that's SilverLining related but may not be caused by SilverLining. My shadows all flicker with Deferred Rendering, but not with Forward Rendering. I need to use Deferred. I've tried a lot of things to pinpoint what's causing the flickering. Video of it here:

    https://www.youtube.com/watch?v=kLtV024a0rQ

    The only ways I've found to stop the flickering are:

    - Switching to Forward Rendering (don't want to have to do this).

    - Disabling SL "Continuous Time Advance". The flickering seems 'caused' by the movement of the light source. If I uncheck "Continuous Time Advance", the flickering pauses where it is.

    - Changing the Camera Far clipping plane to less than about 4000-5000 (which is way too small for my game and for SL). There isn't a discrete point when the flickering stops, it just gets unnoticeable around this range.

    Changing the Near clipping plane has no effect. Making the shadow shadow resolution higher (on the Light) makes the effect less noticable but still there (setting in the video above is Very High Res).

    This happens in the SL demo scene too (when I add a terrain, character, and enable Continuous Time Advance). It doesn't seem to have to do with the scale or position of my world, but still maybe it's a floating point issue in some way?
     
  24. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Since adjusting the far clip makes a difference, I would guess that internally Unity is creating a shadow map texture that covers the entire visible scene. Since this shadow map is of some fixed resolution, high far clip distances result in very low shadow resolution. As the light source moves, this results in aliasing.

    Not a SilverLining problem per se, but a more general issue around shadow maps with big far clipping planes and a constantly moving light source.

    I think the best workaround would be to just not move the light source so often. Instead of using SilverLining's built-in continuous time advance feature, you could set the time via some other script that only updates it every second or so. Or, you could modify the Update method in SilverLining.cs to do something similar. (I'd move the "elapsed" time variable into a class member variable, add to it each frame, and only apply it once it exceeds some threshold and then set it back to zero.)
     
  25. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    You're probably right about the shadows.

    I was thinking of doing something like that with the time advance. I'll do it that way, thanks for the thoughts.
     
  26. EiKON-Andy

    EiKON-Andy

    Joined:
    Nov 13, 2010
    Posts:
    66
    @EarthLaunch: Thank you! The updated BillboardTree and SilverLiningPuff shaders worked perfectly. Everything now seems to be rendering exactly as it should :)
     
  27. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    There is unfortunately no general solution for that issue. You can either have all billboard trees being rendered before the particles or after. If you create a flight simulator, your workaround is not going to work, because all the billboard trees will be drawn on top of the clouds.

    Only Unity can solve that problem!
     
  28. EiKON-Andy

    EiKON-Andy

    Joined:
    Nov 13, 2010
    Posts:
    66
    Ah, yes - you're right. And we will be in the air at some point... Ah well - I'll cross that bridge when we come to it! Everything looks good for now...

    Thanks for all your responses.

    Andy
     
  29. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    Yeah that is true, sorry I forgot about that.

    Here's my code for discrete time advance, for anyone reading later, SIlverLining.cs:

    Code (csharp):
    1.  
    2. public float elapsed = 0f;
    3. ...
    4. if (continuousTimeAdvance) {
    5.     elapsed += Time.deltaTime;
    6.     if(elapsed > 4f) { // Every X seconds
    7.         time.AddSeconds (elapsed * continuousTimeAdvanceRate);
    8.         elapsed -= 4f;
    9.  
     
  30. Baldwin

    Baldwin

    Joined:
    Apr 1, 2014
    Posts:
    37
    Can anyone tell me how to change the HEIGHT of the clouds??
     
  31. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    The height of each cumulus cloud is calculated at line 269 of Src/SilverLiningCumulusCloudLayer.cs (inside the GetNextCloud method). You could apply some sort of scale factor there if you want. Since there are many clouds of different sizes in a cloud layer, they won't all share the same height.

    The height is currently determined by an algorithm designed to fit real observational data gathered by meteorologists, so bear in mind changing the height may yield unnatural results.
     
  32. insiderrr

    insiderrr

    Joined:
    Feb 24, 2014
    Posts:
    50
    love this cloud systrem, it looks amazing :)

    I discovered something weird, maybe someone knows why this happens. i worked on a terrain and now i have dark black shadows. i have no idea how to solve this, when i disable silverling, it is solved
     

    Attached Files:

  33. Diviner

    Diviner

    Joined:
    May 8, 2010
    Posts:
    677
    My contractor bought Silverlining two days ago and I've been implementing it all morning. I'm almost done, except for one issue / bug. At precicely 12:30pm the sky goes dark till 13:49. Initially I figured it must be an eclipse you guys accounted for that specific day (which would be cool if it was the case), but changing the day or month or year didn't fix it.

    Can you confirm and give me a workaround for this?

    Thanks.
     
  34. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Gah! It seems the email notifications I usually get when people post here stopped getting to me for some reason. Sorry I've been silent.

    Diviner, I can't seem to reproduce what you're seeing using the sample scene that comes with SilverLining. Can you tell me the specific month / day / year and latitude / longitude you are simulating with SilverLining?
     
  35. Diviner

    Diviner

    Joined:
    May 8, 2010
    Posts:
    677
    I sent an email.
     
  36. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Diviner did find a bug specific to times where the sun is directly overhead. I'll submit a new revision to the asset store, but meanwhile the fix is a one-line change.

    In Src/SilverLiningSky.cs, add this:

    sunPos.Normalize();

    At line 439, just after Vector3 sunPos = ephemeris.GetSunPositionHorizon();
     
  37. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    SilverLining adds the SilverLiningSunLight light source to your scene, which is a fairly strong directional light. That might have something to do with it. Try adjusting the intensity and shadow settings on this prefab object, and/or you may find adjusting the "ambient light scale" and "sun light scale" settings in the _SilverLiningSky prefab might make a difference.
     
  38. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    104
    Hey,

    On the first page someone asked about Silverlining and the linear color space. You mentioned that the SilverliningSky shader would need altering to accommodate this.

    Is this a simple alteration or something more complicated?

    Thanks
    v
     
  39. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    it should be simple. Just look for this line in SilverLiningSky.shader:

    RGB = pow(RGB, oneOverGamma); // apply gamma correction

    And, comment it out.
     
  40. veddycent

    veddycent

    Joined:
    Jul 22, 2013
    Posts:
    104
    Worked a treat!
    Thanks!
     
  41. Iver_88

    Iver_88

    Joined:
    Aug 28, 2014
    Posts:
    6
    Hi,
    I have few questions:

    1. After starting of game, cumulus clouds are visible, but after his disapearing, no more cumulus clouds are created (only stratus & cirrus are created). Is something wrong with Silverlining? I'm using Continuous time function for day/night cycle simulation. Or is there method for creating new ones cumulus clouds? In asset, there isn't any complex manual. Only small readme file.
    2. When I'm using Apply Fog to Skydome function, I'm getting ugly orange sunrise after unchecking this option, everything is OK. Now I have script which turn on this option within 5am and 18pm and disable it withing 18pm and 5am due to flashing Cirrus clouds. Is this a bug too?
    3. How can I do sun more visible at day? Sun is always above clouds and only light is visible.
    4. How can I add sunlights effect? For example when sun is behind trees?
    6. How can I add sun flares? Becouse now when I add flares to sun gameobject or sun light gameobject. Nothing happened...
     
  42. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    1. After starting of game, cumulus clouds are visible, but after his disapearing, no more cumulus clouds are created (only stratus & cirrus are created). Is something wrong with Silverlining? I'm using Continuous time function for day/night cycle simulation.

    I don't really understand what you're seeing. Why are the cumulus clouds disappearing? For me, even with continuous time set to 1000, the clouds stay in the scene indefinitely. I tried disabling and re-enabling "Has cumulus clouds" and that seemed to work properly as well. Can you explain the issue a little more?

    2. When I'm using Apply Fog to Skydome function, I'm getting ugly orange sunrise after unchecking this option, everything is OK. Now I have script which turn on this option within 5am and 18pm and disable it withing 18pm and 5am due to flashing Cirrus clouds. Is this a bug too?

    The fog color will be the sun color multiplied by whatever fog color you have in your render settings, when "apply fog to skydome" is on. Perhaps you could adjust the sunrise color to your liking by adjusting your fog color.

    You can also gain some control over the sunset colors by adjusting the oneOverGamma and groundAlbedo values in SilverLiningSky.cs.

    I haven't seen the flashing of cirrus clouds you are describing. Does this only happen when your script is active? Check that the far clip plane on your camera is sufficiently far out; over 100 km.

    3. How can I do sun more visible at day? Sun is always above clouds and only light is visible.

    Are you asking for the sun to be visible through the clouds? Not really sure what you're looking for there. You can always raise the Y value of the cumulus clouds or make them less dense to make it more likely for the sun to not be obscured.

    4. How can I add sunlights effect? For example when sun is behind trees?

    I know Unity Pro has an image effect for this, but I don't know much about it. Perhaps the community can chime in here.

    6. How can I add sun flares? Becouse now when I add flares to sun gameobject or sun light gameobject. Nothing happened.

    It worked for me - I imported the light flares standard asset, then just set the Flare property of the SilverLiningSunLight object to use it.
     
  43. Iver_88

    Iver_88

    Joined:
    Aug 28, 2014
    Posts:
    6
    1. See images - 13pm - clouds. After speedup using Continuos Time 2400 on 15pm - no more clouds. I'm not sure if year 1660, which i was set, can cause this or other issues. I have really huge world. Maybe is there something like maximum of clouds rendered. When I uncheck and check Cumulus Clouds option again, clouds are rendered.
    2. See sunrising images (first - apply fog to skydome on = bad, second - apply fog to skydome off = good)
     

    Attached Files:

    Last edited: Aug 29, 2014
  44. Iver_88

    Iver_88

    Joined:
    Aug 28, 2014
    Posts:
    6
    2. Clouds and fog flashing while mouse moving and apply fog to skydome is off (first - no mouse moving, second - mouse moving). Fog color is set to black due ugly white color on distance.
    6. See images - no flares, but in inspector are set and camera has layer for flares. And of course, no clouds bug again :/
     

    Attached Files:

    Last edited: Aug 29, 2014
  45. Iver_88

    Iver_88

    Joined:
    Aug 28, 2014
    Posts:
    6
    And here my SilverLining settings. Maybe I may something wrong here.
     

    Attached Files:

    Last edited: Aug 29, 2014
  46. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Your clouds are disappearing because you turned off the "wrap cumulus clouds" option, you have wind simulated, and you accelerated time a great deal. So, your clouds have blown away into the distance. It seems to be behaving as designed there. You'll either need to put the "wrap cumulus clouds" option back on to prevent the cloud layer from blowing away, turn off wind, or increase the size of your cloud layer. Wrapping is by far the best option there... increasing the cloud layer size will impact performance.

    As for the fogged horizon color, like I said before the fog color in your render settings will affect this when "apply fog to sky dome" is on. If you want to tone down the effect, open up silverlining/src/SilverLinignSky.cs and go to line 231 where it says:

    fogDensity = 0.0003f;

    You might want to lower that number to get the look you want. You'll also see a commented-out alternate implementation of fog below it that you may prefer.

    I can't seem to get the "flashing fog color" thing to happen here. If apply fog to sky is off, SilverLining does not change Unity's fog color at all, so I suspect something else is going on there.

    Here's a screen shot of Unity's sun flare effect working fine with our SilverLiningSunLight object. One thing I noticed in your screenshot is that you have a camera component attached to our light; I don't know if that might have something to do with it.

     
  47. Leito

    Leito

    Joined:
    Apr 8, 2014
    Posts:
    37
    Hi

    Is it possible to use Unity Pro's Depth of Field Image Effect with this?
     
  48. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    The clouds are standard Unity particles, so I don't see why not.
     
  49. Leito

    Leito

    Joined:
    Apr 8, 2014
    Posts:
    37
    Hrm, I guess what I mean is is it possible to have Unity's Depth of Field ignore the clouds? Tried it out and the sky becomes a blur even before the terrain gets affected (which makes sense because of the clouds distance).
     
  50. sundog

    sundog

    Joined:
    Dec 29, 2009
    Posts:
    429
    Oh, I see. It sounds like it's working the way it should, really.

    The only idea I'd have there would be to create a second camera for things you don't want Depth of Field applied to, and draw it over the first camera by not clearing the depth or color buffers and matching the first camera's FOV, position, etc. Then you could turn off clouds in the first DOF'ed camera to just get the sky, and add SilverLining to the second non-DOF'ed camera with clouds on, but the MeshRenderer of the _SilverLiningSky disabled so you only get clouds in it, and not the sky dome.

    If the depth of field effect messes with the depth buffer however, this might not work properly. This unanswered question implies it might not: http://forum.unity3d.com/threads/two-cameras-on-rendertexture-one-with-depth-of-field.239534/

    The real question here is "how do I get depth of field to apply to some things but not others in my scene." I'm not really enough of a Unity expert to say in all honesty, but perhaps others here can chime in.