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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[released] Overcloud - Volumetric Sky And Lighting

Discussion in 'Assets and Asset Store' started by Fewes, Mar 25, 2019.

  1. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    257
    Hi all! Sorry for my absence from the thread for a while, I had a longer winter leave than expected but I am back now.
    First just a general update: I am aware of the fog issue reported by multiple people where the fog changes when the camera moves/rotates. I have been able to reproduce this on my end and am working on a fix.
    Onto answering questions:

    This looks like a normalization issue with the cloud point lights. I'll have a look and should have a fix soon!

    It should work in the latest stable version, 2019 and (probably) 2020 as well.

    Try increasing the camera far clip plane. The volumetric clouds are affected by the clip planes and the default far clip value is just 1000, which is lower than the default cloud plane altitude.

    Looks awesome! I considered adding support for this but dropped it because of performance concerns. The cloud plane consists of a maximum of 64000 vertices, so this shouldn't be too bad though. It's certainly better than doing it in the fragment shader. I recommend setting up a test scene and measuring the performance with it on/off to determine if it is too heavy for your use case.

    Definitely sounds like a bug. It might be related to the fog issue people have been reporting. Will take a look!

    Hi there! The cloud particles fade away when the camera gets close, which should take care of this for you, unless your cockpit is huge. In that case, I can help you modify the near fade distance value which should solve it for you.

    Does this also happen with the scattering mask turned off? I'll take a look in any case and see if I can solve it.
     
    dayronhacker likes this.
  2. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,196
    If I turn the scattering masks intensity to 0, it becomes slightly more prominent.It looks like it might be rendering the division between the sky and the end of the water plane.

    How I tested it:
    1) I loaded: 11 Lux Water Ocean Demo.
    2) Added the OverCloud prefab to the scene.
    3) Deleted the directional light.
    4) Added OverCloud Camera script to the camera.
    5) Dove underwater and you should be able to see the problem.

    Thanks for you help.
     
    Last edited: Jan 16, 2020
  3. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    I get that seam in Lux whenever I'm not set to deferred . It's especially bad in VR when tilting your head.
     
  4. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,196
    It happens in both Forward and Deffered for me.
     
  5. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    Actually yeah it's less noticible but still there.
     
  6. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    936

    Hey. Did you have had a chance to look into the shadows?
     
  7. BoogieD

    BoogieD

    Joined:
    Jun 8, 2016
    Posts:
    236
    How do you set-up the rain?
     
  8. BoogieD

    BoogieD

    Joined:
    Jun 8, 2016
    Posts:
    236
    So far I'm pleased with this asset for fly through clouds although some issues have surfaced on first use.

    The decimal latitude and longitude of Melbourne, Australia is -37.814, 144.96332
    Time and dates are correctly set in the inspector.
    It's midday here but your asset is displaying night time.

    An example of setting up the rain would be good too because there is no info that I can find in manual, website, forum or asset itself.
     
  9. dayronhacker

    dayronhacker

    Joined:
    Dec 23, 2019
    Posts:
    6
    Global Reflection Probe not working in CREST. Sea is shown very dark.
     

    Attached Files:

  10. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    @Fewes Is there any way to control the direction of the wind?
     
  11. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    257
    I had a look at this and it seems to have been caused by an oversight with how the shadows were multiplied. It should be fixed in the patch I've submitted today.

    I had a look at this but I'm not sure what is causing it. I think you might have better luck checking with Lux's developer since it seems to be related to the way they do underwater rendering.

    For rain, you need to use an OverCloudProbe, which will tell you how much rain it is receiving. It is then up to you to use this info to drive for example a particle system, however the demo scene has an example script set up which does exactly this. Check the "Rain Particles" GameObject in the camera rig hierarchy.

    There shouldn't be a conflict with the reflection probe between the two assets, but make sure you don't have duplicate reflection probes in your scene (and Crest is using the wrong one) and also make sure realtime reflection probes is enabled in the player settings.

    Unfortunately not. Because of the way the cloud plane is rendered (scrolling sprites), I had to lock the direction down to the positive X-axis.
     
    keeponshading and dayronhacker like this.
  12. dayronhacker

    dayronhacker

    Joined:
    Dec 23, 2019
    Posts:
    6
    Thank you very much, it worked for me. I changed the quality from "simple" to "good" in the project settings.
     
    Fewes likes this.
  13. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    324
    Any plans on adding HDRP support? We switched to HDRP just today and realized in HORROR that Overcloud is not compatible :(
     
  14. KeithW

    KeithW

    Joined:
    Dec 15, 2017
    Posts:
    9
    @BoogieD In my software I make a
    Code (CSharp):
    1.  DateTime currentTime
    with the current time from
    Code (CSharp):
    1.  TimeOfDay tod
    Code (CSharp):
    1.   int hourAdj = (int)Math.Floor(Math.Abs(tod.longitude) / 15f) * Math.Sign(tod.longitude); // kludge because time is not right
    2.    DateTime adjTime = currentTime.AddHours(-hourAdj);
    Then set tod from adjTime and your day should appear correctly.
     
  15. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    77
    Iirc @Gooren I read something about it being a pretty major rewrite. I'm awfully sad about it too as it seemed like the perfect solution for my project as well, but after switching to the URP not so much. :/
     
    Gooren likes this.
  16. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    257
    This is indeed the case. HDRP support would be very cool but I am currently working on two different projects, plus supporting OverCloud. Because of this, digging into the SRPs is not an adventure I can embark on at the moment.
     
    KarlLakner, jashan and one_one like this.
  17. borkbork

    borkbork

    Joined:
    Jul 5, 2014
    Posts:
    64
    Hi Fewes, I really love the look of the clouds in Overcloud - I think you've really surpassed your competitors aesthetically.

    Couple questions:

    1. Is the relationship between Cloud Plane Altitude and Camera clipping x10? Trail end error led me to a far clip of 16000 with a CPA of 1600. Does this sound right?

    2. Any way to set the wind direction?

    3. Does Overcloud work with Unity Postprocessing screen space reflections?

    +1 for HD/URP support. ;)
     
    Last edited: Feb 20, 2020
  18. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    It's a little tricky to decouple the X/Y movement from the code, but what I've done is expose the global wind time as a public variable for you (OverCloud.weather.windTime). This value controls the cloud positions in a linear fashion, so you can set it to random values to get a pseudo-seed type behaviour. Once the patch drops, let me know if you decide to try this!

    I downloaded latest from the store and it looks the same to me for the seed value to change clouds around that don't move when in play mode just a way to change there seed values and stay static. Can you point out exactly in the prefab where this new value is please with category and exact name as there's different parts where wind affects the clouds etc? I've tried all the winds in here don't see any seed value actually changing the clouds without them actually flying thru the scene.
     
  19. dayronhacker

    dayronhacker

    Joined:
    Dec 23, 2019
    Posts:
    6
    Why does the sky appear so white on the horizon when it should be more blue?
     

    Attached Files:

  20. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    257
    Hi there!
    1. The camera clipping and cloud altitude are not related per se, but the clouds are affected by the clip planes so you might need to crank it up a bit to see the full extent of the clouds. x10 should give you quite a good bit of range.
    2. Unfortunately not. It had to be hard coded due to the way the cloud sprites scroll.
    3. It should yes, if the SSR can reflect the skybox and are rendered after the clouds (they should be).

    You need to set OverCloud.weather.windTime from code. Did you try this?

    The sky outputs colors with a value greater than (1, 1, 1), and for your display to be able to show the full range you need to use a tonemapper.
    One is available in Unity's Post Processing Stack, or you can use the simple one that comes with OverCloud called Tonemapper.cs.
     
    dayronhacker likes this.
  21. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    145
    Are the clouds Spherical? or flat? Like could i cover an entire spherical planet?
     
  22. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    257
    They are rendered as a flat plane which is curved to appear spherical. This means you can see the clouds curve around the horizon for example.
    The system is not made to work with spherical worlds however, so they will not work if you want to render something like this.
     
    killer1171090 likes this.
  23. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Can you tell me which script is this part in and what line as well?
     
  24. killer1171090

    killer1171090

    Joined:
    Feb 23, 2013
    Posts:
    145
    What about Lat/Long positions?
    In Theory i could use a Second camera to render OverCloud and convert my Lat/Long positions to a X/Z position and adjust OverClouds settings to accommodate.
    My Planets are 1:1 scales, so having it being rendered as Flat with a curve is entirely fine, it would rarely ever be noticeable if noticeable at all.

    Only other question would be altitude, How High can you go before clouds stop rendering?
    You said its a curved plane, how curved? Can i get to the point i can see Half the planet as well as its clouds?
     
  25. VR_Rookie

    VR_Rookie

    Joined:
    Nov 24, 2012
    Posts:
    35
    Hi

    I just purchased your plugin - still trying to get my head around it. I'm working on a VR flight game. When I add the overcloud camera onto my VR camera the atmosphere (2d plane) seems to be attached to my camera, so when I move my head the atmosphere plane moves with the camera. Am I doing it wrong? Are there special rules for using VR camera? Please help

    I'm already using single pass rendering (I saw that you mentioned this previously)
     
    Last edited: Mar 21, 2020
  26. cbodapati

    cbodapati

    Joined:
    Oct 13, 2008
    Posts:
    13
    Hi,

    I tried to make a standalone build with overcloud 1.09 on unity 2019.3.2f1. Just imported the asset and made the build.

    I got the build with the artifacts as attached.
    Can someone please point me to how to get a clean build?

    thanks
     

    Attached Files:

  27. D1234567890

    D1234567890

    Joined:
    Aug 11, 2019
    Posts:
    56
    I see. I had no idea about that. Thank you for the information!

    So I mentioned an issue earlier about the fog rendering over the waves when using Crest. This only appears to happen when the Downsample 2D Clouds option is enabled. I don't think this is an issue for me since that option artefacts too much at the horizon at ground level anyway.

    Another issue I have come across that another has mentioned is that there is an issue with double vision and other artefacts in VR. It is most prominent with fog or storm preset. It only occurs when the Render 2D Fallback option is enabled with Render Volumetric Clouds. I didn't think these two options were suppose to work together?

    Screenshot (141).jpg

    Another issue is that if I only have the Render 2D Fallback option enabled, but neither Render Volumetric Clouds nor Downsample 2D Clouds, the lighting breaks when entering play mode. If Downsample 2D Clouds is enabled the issue doesn't occur. If I enable Downsample 2D Clouds in play mode after the issue occurs it fixes the problem too. The follow shows what the issue looks like:

    Screenshot (143).jpg

    This is all forward and single-pass.

    Thanks!
     
  28. AERwaevs

    AERwaevs

    Joined:
    Feb 28, 2013
    Posts:
    5
    Hi Felix!

    I'm having some trouble with getting my lighting set up with Overcloud. It seems to me that Overcloud does not enable unity to calculate the spherical harmonics from it's skybox? This issue has stumped me for some time and so now I'm giving in and asking for help.

    This is an example of a pre-dawn lighting scenario with Overcloud (ambient intensity set to 2 to demonstrate problem). Note how the ambient colour is flat, and a mysterious red colour. The horizons are somewhat red, due to the scattering in the Earth's shadow, but nowhere near the intensities that could be causing this.
    upload_2020-4-4_12-42-4.png

    This is a picture of the effect I'm trying to achieve. This was done using a custom version of uSky I had been maintaining since the creator went AWOL.
    upload_2020-4-4_12-44-59.png

    It is very difficult to find documentation on how unity actually calculates it's ambient spherical harmonics.
    The only useful info I've found seemed to mention that unity doesn't like it when the skybox shader cares about view direction? This seems odd to me as the uSky skybox above also uses view direction (as do most skyboxes). I noticed your skybox shader returns 0 if the camera is rendering the atmosphere, could this perhaps be part of the problem? If it is, I find it peculiar that the colour returned is red-ish.

    Would really appreciate your help with this one, as digging through the Overcloud files has not proven to uncover anything that seems to indicate why this is the case.
    Cheers!
     
  29. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hello, short question : is OverCloud compatible webgl ?
     
  30. snipedavid22

    snipedavid22

    Joined:
    Jan 9, 2020
    Posts:
    1
    How can you make the time go faster.I am changing the speed,but i don't see any changes the sun stays at the same position and it chagnes only when i use the slider from the editor
     
  31. NikkiC5

    NikkiC5

    Joined:
    Jun 11, 2016
    Posts:
    11
    Hi,

    I've just installed OverCloud, dropped a SteamVR CameraRig prefab into a new scene and added an Over Cloud Camera script to the VR camera and clicked play. I immediately see issues with artifacts in both eyes. Is this something that can be easily remedied? Thanks!
    [edit] Actually, volumetric clouds are not rendering at all to the VR camera. Only to the scene view.
    [edit] Setting the far clipping plane to 20000 solves the issue I'm having. Will play with it a bit more. Actually 40000 removes the streaking completely.
     

    Attached Files:

    Last edited: Apr 29, 2020
  32. NikkiC5

    NikkiC5

    Joined:
    Jun 11, 2016
    Posts:
    11
    Have you tagged your main camera as MainCamera? This was my issue too, until I tagged it correctly.
    OverCloudMainCamera.JPG
     
  33. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,196
    @Fewes

    So I'm adding OverCloud to my Oculus VR scene. I'm guessing I need to add the 'Over Cloud Camera' to the CenterEyeAnchor, correct? Anything else I need to do to get this working correctly in VR?

    Also when I Play the scene the clouds look like this:
    In.jpg
    But if I pull the the Scene camera back they look like this which is what I want:
    Out.jpg

    What am I missing? Thanks.
     
  34. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    257
    Hi there. You need to add the OverCloudCamera component to your Camera gameObject. You also need to increase the far clip plane to something like a few KM for the clouds to show. Hope this helps!
     
  35. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    @Fewes Hi! I'm having a problem making a build of my project using IL2CPP on Unity 2019.2.21. I've posted in greater detail about the issue here: https://forum.unity.com/threads/unity-freezes-during-build-process.883789/ Adding components gradually back into the project, it looks like Overcloud may be what it's choking on--not that I can see anything directly relating to Overcloud appearing in the log.

    A representative from Unity gave me this response...
    Can you make any sense of what he says with regard to code inside Overcloud?
     
  36. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    @Fewes Hmmm... With further testing, I'm not sure anymore that Overcloud is causing this issue. I've switched to Mono compilation, at least for now, and can make a build successfully.
     
    Last edited: May 11, 2020
  37. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    98
    Hello. I know there's been some posts about Crest + OverCloud. I'm running into some issue too, not sure if this is fog or not. I've added the extra lines of code to the Crest ocean shader mentioned on the OverCloud compatibility page. I didn't get any compile errors, though it didn't seem to fix anything for me. This is what I see
    'Render Atmosphere' checked on. You can see the silhouette of my terrain under the water.
    upload_2020-5-11_20-26-4.png
    Below = 'Render Atmosphere' checked off
    upload_2020-5-11_20-34-44.png
    Any ideas?
    I'm on Unity 2018.3.8 and I'm on github Crest Feburary 2020.
     
    Last edited: May 12, 2020
  38. vovch_vl_ru

    vovch_vl_ru

    Joined:
    May 5, 2020
    Posts:
    2
    How to install it to my scene?
     
  39. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    500
    you can try checking the editor log files for where it crashes https://docs.unity3d.com/Manual/LogFiles.html
     
  40. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    98

    Update. Looks like I just needed slip a massive geo plane under the water and that fixed the silhouette.
     
  41. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    98
    Hi, I have two other questions.
    1)
    upload_2020-5-12_10-54-25.png

    In the demo scene I'm wanting to tighten and push this atmosphere haze on the horizon further away from the camera. I originally thought this might be fog, but I have the fog density set to zero. This haze goes away with the 'Render Atmosphere' turned off. Can I adjust the range on this haze?


    upload_2020-5-12_10-52-32.png
    2) I noticed the demo scene uses a Tonemap camera script to prevent the horizon from blowing out white. If I adopt this this Tonemapper, I'll have to re-balance a lot of my world art. I'm instead wanting to reduce the skybox horizon brightness circled in red below. Is there some way I can reduce this? Related to this... is there any way to change the skybox color? My game has a fantasy setting and I want to tint the daytime skybox a deeper/saturated blue color .

    upload_2020-5-12_10-51-5.png
     
    Last edited: May 13, 2020
  42. kenazossou

    kenazossou

    Joined:
    Mar 28, 2017
    Posts:
    6
    Hi everyone,
    Thanks @Fewes. Great job!!

    I have 2 topics :
    1. I'm not able to get it work right on webgl too. I get a dark sky instead. Is OverCloud compatble with Webgl.
    2. On the other hand I got an anti-aliazing issue while viewing an object through a cloud or fog or with a cloud or fog in the background; both in windows build and unity editor.

    Could anyone help me fix those? Thanks!!!!
     

    Attached Files:

  43. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    257
    Hi, please check the manual for an example of how to get the asset up and running.

    Unfortunately this is not possible. The luminance output from the sky is based on physical equations and as such it has limited artistic control. I really recommend using a tonemapper of some sort, but if you absolutely don't want to, the only other option I see is adding the tonemapping effect manually to the end of the skybox shader.
    To change the color of the sky you can change the "Actual Sun Color" parameter under the Atmosphere rollout. To decrease the density of the atmosphere, decrease the "Density" parameter also under the Atmosphere rollout.

    I have checked compatibility for WebGL and determined that it is not compatible. It seems that while it does support compute shaders, it lacks support for the render texture formats used by the atmospheric implementation. If this invalidates the asset for you, you can contact me for a refund.
    The issue with anti-aliasing is because the camera depth texture (which is used when adding the atmospheric effects + clouds) does not benefit from MSAA. This will result in aliasing whenever the scene depth causes the clouds/atmosphere to be culled. Unfortunately this is just a limitation of the engine and not something that can be circumvented by OverCloud.
     
  44. kenazossou

    kenazossou

    Joined:
    Mar 28, 2017
    Posts:
    6
    Thanks Fewes!!!
     
  45. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    @Fewes I'm attempting to upgrade my project from 2019.2.21 to 2019.3.10

    As you can see, something's gone amiss visually. I'm also seeing the following error spamming the log every frame:
    The error goes away when I disable Overcloud in the scene. Has anybody else seen this happen?
     
  46. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    257
    That does indeed look wrong. I think I might know what is happening here (RenderTexture is incorrectly bound when adding the atmosphere/fog, Unity seem to be constantly changing this stuff). Can you confirm this is the case by decreasing the amount of fog? The scene should be black if that's the case. Also, does the error point you to a line of code? That would help in pin-pointing it.
     
  47. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    Not sure which setting you mean. I turned "Atmosphere >> Mie Scattering >> Fog Phase" all the way down to zero, with no effect. Under Unity's Lighting panel, Fog isn't activated. I tried turning Attenuation Factor in the material "OverCloudFogLight" down to zero, again with no effect. ---but none of these is what you're referring to, I'm guessing.

    That's all it shows. Helpful, right?
     
  48. MixedupJim

    MixedupJim

    Joined:
    Mar 12, 2018
    Posts:
    7
    Hi, not sure if this is still the place to get support with overcloud.... :)

    I'm trying to get the included transparent shader to work correctly. It blends into the clouds ok but you can actually see the transparent boxes for the particles. I've attached a photo that shows the effect. It looks like the particles behind the transparency are getting effected by it.

    I don't know much about shaders, but I've tried to solve it by looking at other particle shaders but I can't work it out :)

    Any help would be greatly appreciated.

    Unity 2019.2.3f1
    Overcloud 1.09

    Thanks
     

    Attached Files:

  49. MixedupJim

    MixedupJim

    Joined:
    Mar 12, 2018
    Posts:
    7
    I found the reason for the transparent boxes and it is a very easy fix (took me a while to find as I've never edited shaders before).

    In the shader script simply add...

    "ZWrite Off" below the line "Blend SrcAlpha OneMinusSrcAlpha"

    The particles will now render correctly.
     
    Barliesque likes this.
  50. wlad_s

    wlad_s

    Joined:
    Feb 18, 2011
    Posts:
    148
    Hello @Fewes ,

    I'm trying to get custom planets with rings drawn onto the skybox but I'm finding the particular code in OverCloud too advanced for me to understand.

    I've found that in Skybox.cginc the moon is drawn using texCUBE(_SkyMoonCubemap, moonNormal). I've aded my own Texture2D variables in OverCloud and I guess I should try drawing it with planet_Tex = tex2D(_MyPlanetTexture... but I'm not sure how to do this. I've tried various things without success.

    Please, can you help? How should we go about drawing a 2D texture in the sky instead of the current moon? I know I can change the moon cubemap but I could achieve so much more with 2D textures (like adding city lights, glowing atmosphere to the planet, and rings around it).

    I did manage to do this with other sky package but it was a much simpler shader that did the sky rendering.

    Thanks

    PS
    We did communicate via e-mail before but I thought I should post this here since it could be useful to others.