Search Unity

  1. Unity 2020.2 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[released] Overcloud - Volumetric Sky And Lighting

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

  1. banksysan_unity

    banksysan_unity

    Joined:
    Feb 4, 2020
    Posts:
    7
    Should I be worried about this missing script?
    Is it possible that this is why I can't see the Overcloud effects in the Scene View?

    OvercloudMissingScript.png
     
  2. munozpro

    munozpro

    Joined:
    Sep 30, 2013
    Posts:
    3
    Hello there. Has anyone else reported this issue here? The only other time I saw someone report this was in the asset store reviews. Is this something that I should be worried about? Or just let it slide for now? Thank you!
     

    Attached Files:

  3. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    243
    Did you delete the example content folder? The Lightning script is contain within so that would explain why it is missing. If you don't want lightning effects it is fine to just remove the lightning object from the prefab.
    Probably not great to have the main prefab link to an example script though, I'll move it in the next patch.
    Does it not work at all in the scene view? No skybox, no clouds, no nothing?

    I'm working on fixing this right now. It seems to be an issue in Unity 2019 and forwards but it has been very difficult to reproduce on my end so it has taken a bit longer than expected.

    Also on a general note I'd like to apologize for being slow to respond lately. For some reason this thread no longer sends me notifications for new posts so I've started checking it every other day instead. Took me a while to realize this though. I'm dedicated to fixing the issues that the recent influx of users has uncovered so if you're still sticking with the asset, thanks!
     
    Last edited: Oct 16, 2020
  4. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    243
    1. I'm rechecking how correct the date system is for the next patch as I've had reports about it being off in the past. It should be accurate enough to use real dates for eclipses.

    2. Don't remove the multiplier, just multiply it with 'moonIntensity' as well. Something you can try if you want a stronger moon light but not so bright clouds is to darken the cloud albedo (under Lighting) at night time.

    4. Instead of removing the multiplication with 'transmittance' in the skybox shader, you can instead add your own shader global (Shader.SetGlobalFloat("_SkyTransmittanceAmount", 0.25f)) and replace
    Code (CSharp):
    1. transmittance
    with
    Code (CSharp):
    1. lerp(1, transmittance, _SkyTransmittanceAmount)
    That way, you can control the amount of transmittance in the sky manually, for example toning it down during night time.

    5. The easiest way to do this is to use the sun direction as an indicator of the current "day lighting" amount:
    Code (CSharp):
    1. float dayDelta = -OverCloud.components.sun.transform.forward.y * 0.5f + 0.5f;
    2. OverCloud.atmosphere.mieScatteringPhase = Mathf.Lerp(nightAmount, dayAmount, dayDelta);
    Where you replace dayAmount and nightAmount with your desired Mie intensities for day and night respectively.
     
    Duende likes this.
  5. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    157
    First of all, thank you very much again for helping me, Fewes. :)

    Ok, perfect. When you update the asset you can also share the web with the eclipse dates that you use to check if the eclipses are correct.
    Ok, I have tried to modify the cloud albedo and it works very well:
    upload_2020-10-19_20-22-46.png
    I had to modify the albedo cloud of Cirrus and Stratoculumbus as well. Where would I have to modify so that the "cloud albedos" of all the clouds go dark when night comes? Also in OverCloudLight.cs?
    Sorry I'm very noob with shaders, I need you to be more specific so I can make those changes.
    Also, it would have to rotate the image of the Milky Way. I mean, right now it's "horizontal" and I think it should be "vertical", right?
    upload_2020-10-19_20-45-1.png
    Ok, but should I add this change in OverCloudLight.cs?
     
  6. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    243
    You could add it there, but it's better to create your own script for it. That way it won't break whenever OverCloud updates.

    I'll see about adding this natively to the skybox shader. It would benefit other users as well.

    Replace the OverCloudLight.cs Update function with this:
    Code (CSharp):
    1. void Update ()
    2. {
    3.     if (OverCloud.instance)
    4.     {
    5.         if (m_Type != Type.Point)
    6.         {
    7.             // Evaluate light color
    8.             var elevation = Vector3.Dot(light.transform.forward, Vector3.down)*0.5f+0.5f;
    9.             switch (m_Type)
    10.             {
    11.                 default:
    12.                 case Type.Sun:
    13.                     light.color = Color.Lerp(m_ColorOverTime.Evaluate(elevation), OverCloud.atmosphere.solarEclipseColor, OverCloud.solarEclipse) * multiplier;
    14.                 break;
    15.                 case Type.Moon:
    16.                     float moonIntensity = Vector3.Dot(OverCloud.components.sun.transform.forward, -OverCloud.components.moon.transform.forward) * 0.5f + 0.5f;
    17.                     light.color = Color.Lerp(m_ColorOverTime.Evaluate(elevation), OverCloud.atmosphere.lunarEclipseColor, OverCloud.lunarEclipse) * multiplier * OverCloud.moonFade * moonIntensity;
    18.                 break;
    19.             }
    20.  
    21.             // Only allow one active directional light at a time
    22.             light.enabled = (light == OverCloud.dominantLight) && !(light.color.r == 0 && light.color.g == 0 && light.color.b == 0);
    23.  
    24.             // Check if we need to initialize or clear buffers for this lightp
    25.             if (light.enabled && !m_BufferInitialized)
    26.                 InitializeBuffers();
    27.             else if (!light.enabled && m_BufferInitialized)
    28.                 ClearBuffers();
    29.  
    30.             if (light.enabled && OverCloud.lighting.cloudShadows.mode == CloudShadowsMode.Injected && !m_ShadowBufferInitialized)
    31.                 InitializeShadowBuffer();
    32.             else if ((!light.enabled || OverCloud.lighting.cloudShadows.mode != CloudShadowsMode.Injected) && m_ShadowBufferInitialized)
    33.                 ClearShadowBuffer();
    34.         }
    35.     }
    36.     else if (m_BufferInitialized)
    37.     {
    38.         // No OverCloud instance found. Clear buffers if they exist
    39.         ClearBuffers();
    40.         ClearShadowBuffer();
    41.     }
    42. }
    and you should be good :)
     
  7. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    243
    OverCloud version 1.10 was just accepted and should be available for download! Here is the changelog:

    1.10

    Fixed an issue where a shader conflict could arise if another asset provided a "Hidden/SeparableBlur" shader (resulting in an "Invalid Pass" error).

    Added checks for Unity versions running the new XRDisplaySubsystem, which in turn fixes an error message that would appear on these versions.

    Added a warning to the OverCloudCamera component if the far clip plane is set lower than the volumetric cloud plane radius, which hides the volumetric clouds in the game view.

    Moved the Lightning script out of the example content folder, as it is included in the main OverCloud prefab and would lead to "Missing Script" warnings if the example content folder was removed (if this results in duplicate script errors for you after upgrading, just delete Lightning.cs in the Example Content folder)

    The manual is now a link to a Google Drive document instead of a PDF.

    Moreover, the manual now contains more specific and highlighted information on how to avoid the most common pitfalls and how to get going with the visuals in your own project.

    Thanks to everyone who reached out to me with details regarding the "Invalid Pass" error. This should be fixed now but please let me know if you are still encountering issues.
    No changes to the date system are included in this patch. I am investigating it currently but wanted to get out the critical fixes as soon as possible so I opted not to hold off on the patch. Thank you for understanding.
     
    weseb likes this.
  8. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    52
    Hey Felix,

    I'm evaluating the asset and have found a few issues that I didn't see mentioned in this thread (which could turn out to be show-stoppers), so I wanted to check with you first if you think they're fixable:

    1. Looking through volumetric spotlight causes these artifacts in the distance:

    video: https://www.dropbox.com/s/q3wz7g7f1hrrh5c/2020-10-22_15-20-52.mp4?dl=0

    2. Sun glare renders over objects

    video: https://www.dropbox.com/s/0raz54ura35w4nv/2020-10-22_15-30-36.mp4?dl=0

    3. Volumetric spotlight doesn't play well with Temporal Antialiasing's jitter
    (no image, must be seen in video)
    video: https://www.dropbox.com/s/b0rrqc5m5n8g6tz/2020-10-22_15-40-24.mp4?dl=0

    4. Is it possible to block wetness shader (e.g. to keep interiors dry), e.g. by putting a mesh/collider (like a decal) so that everything under/inside it gets dry?
     
  9. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    442
    Hi @Fewes
    Have you had a change to take a look at this yet? Thanks
     
  10. ProtoPottyGames

    ProtoPottyGames

    Joined:
    Dec 18, 2015
    Posts:
    71
    Hi. Just trying to sort out Lux Water with this and unfortunately the documentation isn't looking to be matching up with what I'm looking at here. Its pointing to Line 1231 in LuxWater/Shaders/Includes/LuxWater_Core.cginc but I think maybe there must have been some changes to the Lux Water asset since then? any help in finding the proper bit to replace would be greatly appreciated. thanks!
     

    Attached Files:

  11. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    243
    1. Are you using temporal anti-aliasing? I might have to add some extra code for making the noise itself temporal, too.

    2. Is this with the scattering mask on? Either way, there are sliders for adjusting this under OverCloud > Atmosphere > Mie Scattering (the distance fades).

    3. Same as 1 most likely.

    4. Yes, check "Render Rain Mask" on the OverCloudCamera. The effect can then be tweaked under OverCloud > Weather Effects (it works like a shadow map projected from above). Do note that this is only supported in deferred rendering mode.

    Not yet no, sorry. I have some outsourcing work to take care of so it might take some time before I can get to it but I'm hoping to have it in the next patch.

    Can you PM me the shader you are trying to modify? It's most likely just a case of finding the right place for the code. Thanks!
     
    iddqd likes this.
  12. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    442
    Thanks for the update!
     
    Fewes likes this.
  13. bgrz

    bgrz

    Joined:
    Mar 22, 2015
    Posts:
    52
    Yes, although it's not related to TAA at all, here's a new video where I change forward/deferred, no MSAA/TAA, HDR on/off, post-processing on/off. I also change the camera far plane, which changes the appearance of the artifact.

    I wasn't aware of that setting, sorry, let's ignore this one until I see it again and try the settings.

    Yes, this one is due to TAA, but seems unrelated to 1. It's TAA from Unity Post Processing package 2.3.0

    I was aware of Rain Mask, but I asked in hope of better artistic control + hopefully better performance than having to render the mask. I've played with Wet Stuff for a short bit before Overcloud and it works by using boxes to define wet and dry areas. I figured it'd be more light-weight than relying on a mask. However, upon playing with Overcloud's wetness a bit more, I saw I'd need more features (which I don't mean to ask you to implement them, since I understand they're out of scope of the asset), e.g. support for moving objects - vehicle which moves and can tip over, rain effect "scrolls" sideways while vehicle moves which breaks the illusion.

    Bonus:

    5. I've been having this "black sky" bug in deferred which I didn't manage to find solution for, it happens after starting the game and seems to fix itself after a while: link to video
     
  14. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    157
    Ok. ;)
    Perfect, I'll wait for the update. :)
    But that code is simply for add the moon lighting. I mean, the only change there is multiply by moonIntensity, and that change I already made.

    I was referring to this change that you said:
    Should I also add this in OverCloudLight.cs?
     
  15. cordmeister

    cordmeister

    Joined:
    Apr 1, 2018
    Posts:
    2
    I am using Overcloud in a scene with volumetric fog, HX volumetric lighting, and massive clouds. All were working well together until I attempted to increase cloud shadowing by switching from the internal shader to the deferred method you recommend in the documentation. Now none of the effects are displaying in editor or at runtime. Any thoughts on what I can do to rectify? I'm at my shader limit, but use shader control to manage this. I feel I may have finally gone too far... But would love some insight/assistance. Great asset btw! I was really enjoying what it added to the scene.
     
  16. lohitsheperd

    lohitsheperd

    Joined:
    Apr 30, 2018
    Posts:
    1
    After importing overcloud. the sky goes black with no sun but GI works. the project has multiple cameras.
    The error im getting is "texture 2d access kernel info". Please help.
    Thanks in advance
     
  17. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    157
    In addition from what I said in this post, could you look at this conversation I had with larsbertram1? I have not been able to make Overcloud compatible with Lux Water by following this link.
    Why are the clouds still transparent when they are in front of the water? Is the link out of date?
     
    Last edited: Nov 27, 2020
  18. Enginhk

    Enginhk

    Joined:
    Jun 14, 2013
    Posts:
    4
  19. Frank-1999-98K

    Frank-1999-98K

    Joined:
    Jun 30, 2015
    Posts:
    14
    Hi, I'm very interested in the asset but I found this video on your YouTube channel:

    I wanted to know if I could get a similar result with Overcloud or if it's just a custom cloud rendering solution that you specifically tailored and designed for your game.

    I'd die to be able to have anything like the one showed in the vr sim, and before buying Overcloud I wanted to know if it was achievable with the asset out of the box, if it's a separate thing that you planned on releasing in the future perhaps (which I'd happily wait for), or if it's just a thing you made for your game and so I'll have to settle for what's in the trailer video in the store page (which don't get me wrong, is still pretty cool, but your flight sim demo is soo good, especially with the multi-layered capability!)

    Thank you in advance
     
    Last edited: Dec 16, 2020
  20. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    532
    Ya come on Fewes not fair man. Share with your customers plz:)
     
  21. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    CLOUDS ;D
     
    Fewes likes this.
  22. Purumo

    Purumo

    Joined:
    Aug 9, 2019
    Posts:
    6
    Hey!
    My shadows from objects in the scene "fly away" at sunset. Everything is ok during dawn.
    Can you help me with this?
     

    Attached Files:

  23. Purumo

    Purumo

    Joined:
    Aug 9, 2019
    Posts:
    6
    More than a year and a half has passed since you posted this answer, and now I need this feature.
    I need to do this as early as possible. Please give me a recipe or an idea.
    I don't want to integrate with other assets to create weather, this is very painful :(
     
  24. sasa42

    sasa42

    Joined:
    Jun 6, 2018
    Posts:
    20
  25. Duende

    Duende

    Joined:
    Oct 11, 2014
    Posts:
    157
  26. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    243
    Hi guys! I'm on vacation until January the 11th, and I'll get on fixing the stuff that has popped up during the Christmas period then. Thank you for your patience!

    Cheers,
    Felix
     
    Duende likes this.
  27. dhkwon

    dhkwon

    Joined:
    Aug 27, 2014
    Posts:
    1
    hi.



    We are making an airplane game after purchasing the overcloud asset.



    By the way, I use floatingOrigin.



    http://wiki.unity3d.com/index.php/Floating_Origin





    All other objects can be moved,



    How do you move the cloud object?



    Basically, the clouds are moving,



    Naturally, I want to move the whole object to the origin.



    Is there a way to move the overcloud object to the origin?



    Thanks.
     
  28. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    243
    Okay, I'm back! Let's get to fixing.

    You can place that code anywhere in an Update function, since it uses static functions to set the Mie value.

    The modified internal deferred shader should be very similar to the default one. Have you confirmed this issue goes away if you switch back to default? If so, something might have changed in the internal deferred pipe since last I checked (although I would hope Unity didn't make changes to this any longer).

    I haven't heard of this error before. Could you post or send me a screenshot of the full error stack? Thanks!

    This seems to be related to the stereo rendering. What version of Unity are you using, and are you using multi pass or single pass stereo rendering?

    OverCloud can not render such volumes, no. The system shown in the video is another system entirely which I've tailored to my game. Currently I have no plans on releasing it as an asset or anything.

    Does this happen only when OverCloud is enabled? Have you tried adjusting your camera clip planes and see if that affects it? Unity might be doing some stuff with the shadows based on the geometry in the scene, but the cloud plane shouldn't be affecting that.

    I don't have any plans for scoping up the wind system, but if you must have this feature, I suggest looking at how the compositor texture is rendered (this is where you would specify a wind vector), then checking the cloud sprite shader and in the vertex shader, find and remove the code that scrolls the sprites. The cloud density function is also mirrored on the CPU, so if you want to support cloud volume probing you'll have to change that as well.

    Yes, OverCloud supports a floating origin. Use the static functions OverCloud.MoveOrigin and OverCloud.ResetOrigin to move and reset the origin respectively. If you are using the script from the wiki you linked, add
    Code (CSharp):
    1. OverCloud.MoveOrigin(-cameraPosition);
    somewhere in the
    Code (CSharp):
    1. if (cameraPosition.magnitude > threshold)
    2. {
    3. }
    block.
     
    Duende likes this.
  29. dl290485

    dl290485

    Joined:
    Feb 4, 2018
    Posts:
    154
    @Fewes I'm trying to use this with a Vive but the sky just smears the dead image from the scene on it. Sorry don't know the technical name. Basically it's not drawing the sky, and doesn't clear the left over images which are on the screen when you look at the spot. Is there instructions on how it needs to be configured to work on Vive?
     
  30. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    243
    There's nothing in particular that needs to be done in order to get it working with the Vive. What version of Unity are you on (and are you using the default render pipeline), are you using single pass or multi pass stereo rendering and are you seeing any errors in the console? Are you seeing any clouds at all or is it just not drawing the sky/anything?
     
unityunity