Search Unity

  1. Unity 2019.1 is now released.
    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:
    61


    Hi there!

    I'm making this thread for my volumetric sky plugin, OverCloud, which is a complete lighting and sky solution for Unity's default rendering pipeline. Featuring volumetric clouds, fog and lighting, physically based time of day, multiple weather effects, a preset-based sky system and VR support.

    It has been released and is available (along with demos) at http://overcloud.me/

    Manual for the current version.






    Patch notes:
    • Fixed a bug where OverCloud failed to take into account other depth rendering modes of the camera (such as Depth+MotionVectors) and instead always forced depth only.
    • Separated cloud shadows intensity variable into two: Density and opacity. Density is applied before shadow refinement, opacity is applied after. This allows for more granular control over the cloud shadows appearance.
    • Went over the entire project and scrubbed warnings (both C# and shaders).
     
    Last edited: Apr 18, 2019 at 6:25 PM
  2. christoph_r

    christoph_r

    Joined:
    May 20, 2013
    Posts:
    453
    Finally! Looking forward to getting my hands on this.
     
    Fewes likes this.
  3. Quiznos323

    Quiznos323

    Joined:
    Oct 26, 2015
    Posts:
    7
    Awesome! Some questions (Sorry, I've asked a couple of these before, but I figure that other people may have them as well):
    1. Will we be able to choose between rendering the clouds with sprites (like one of your earlier youtube videos) and rendering with 3D noise? I can see cases where someone would want to swap out sprites/textures to match the style of their game if they are not going for super realistic.
    2. How in-depth can we customize the atmosphere? Is it possible to create alien worlds with funky colors?
    3. Are we able to place single clouds by hand in addition to the cloud plane? Can we have more than one cloud plane? :D Is the could plane infinite?
    4. Does this asset require special materials to be added to gameobjects for correct lighting?
    5. Do we have full control over sun/moon position and appearance? For instance, can I replace the sun and moon graphics with custom ones, or remove them entirely?
    6. Can the camera field of view be changed without limit at runtime? I tried out Aura for volumetric lighting but there was strange scaling artifacts that appeared when the camera changed fov during gameplay.
    7. Does the sky still support transitions for extreme altitudes when the camera enters space?
    8. Does this asset require the use of many layers in the project? I have tried some other cloud and fog assets that hog a lot of layers.
    9. Will this asset work with water assets like Aquas out of the box, or will it require modification?
    10. Are there prefabs included for quick setup?
    11. I highly suspect not, but is is possible to adapt this system to spherical worlds? That would blow my mind, but I understand why if not.
    Congrats on releasing to the asset store!
     
    Fewes likes this.
  4. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Great questions! Here are some hopefully great answers:

    I've had several people ask about alternate styles for rendering. I've done some testing with a cel-shaded style which I think looks pretty good and the package has this as a "hidden" shader feature (need to uncomment a #define).
    Doing 2D sprite-based clouds is tricky now that the lighting is based on 3D noise, but probably not impossible. I'll have to look into it some more.

    Currently, you can tweak the Rayleigh and ozone density, as well as change the color of the atmosphere. Some additional physical parameters are hard-coded for earth-like atmosphere but can be changed in the script itself (although I can't guarantee what kind of results you will get).

    Not really, no. I have some ideas of adding "manual painting" of clouds on top of the simulated result though (the coverage is stored in a render texture).

    Only one volumetric cloud plane is supported, but you can have an infinite amount of 2D cloud planes. Multiple volumetric cloud planes is something I would like to support but I decided against trying to include it in the initial release because of the rendering complexity it would introduce to the system.

    Yes. It stretches over the horizon and scrolls infinitely with the world. At far distances it is first rendered as a lower-quality volume, then a 2D plane.

    Nope. Unless you want to specifically add some of the features to your own shaders (adding cloud shadows for example has some benefits compared to using the screen-space shadow mask injection, which is the default method).

    Yes. You can move the sun/moon, tweak their size, intensity and color. For the moon you can also specify a cubemap surface texture. It should work without the lights but honestly I haven't tested removing the sun. Didn't figure that was something you would want to do :p
    A feature I have planned for a later version is an interface for adding custom planets to the sky, which will be lit in the same way the moon is.

    Yes. All effects support changing camera parameters at runtime, including FOV, resolution/scaling and render path.

    Yes. The sky/atmosphere is not limited to any height above the horizon, meaning you can go far, far up into space without anything breaking (you might see some cloud texture tiling depending on your settings).

    Nope. No layers are used.

    Hard to tell, it depends on how they are implemented. If they are rendered as transparent surfaces, they will need specific shader support (the manual specifies how to do this). If they render to the depth buffer then the atmosphere/etc will be added automatically.

    Yes. To initialize in a scene you simply drag a prefab into it and add a component to the camera. There's also an example scene provided.

    It does not support spherical worlds currently. The horizon extends infinitely and moves with the camera, as it has been authored with flat worlds in mind.
    I don't think it is impossible to add support for this, but it seems very complicated and setup-dependent unfortunately.
     
  5. Quiznos323

    Quiznos323

    Joined:
    Oct 26, 2015
    Posts:
    7
    Thanks for the quick reply and detailed answers, I appreciate it :). All sounds good to me!

    Edit: I forgot to ask this as well: Are we able to use custom skyboxes for the night sky?
     
    Last edited: Mar 26, 2019
  6. ryanvalentin

    ryanvalentin

    Joined:
    Jun 24, 2017
    Posts:
    1
    Looking forward to this! I have a couple of questions to add on:

    1. Would this support offsetting the cloud map when shifting the camera back to the origin? Specifically to avoid floating point issues in large worlds.

    2. Would there be any way to know if there were clouds between two objects? Imaging a scenario where the AI might not be able to see the player as well through the cloud layer.
     
    Fewes likes this.
  7. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    It does! There are functions for moving, modifying and resetting the origin. If you already have a working floating origin setup, all you need to do is call OverCloud.MoveOrigin(offset) whenever your origin moves.

    There is a component (OverCloudProbe) which allows you to sample the 3D cloud volume on the CPU. This can be used to determine if a position is inside a cloud or not. Currently, there is no way to test a ray, however I realize this would be a very useful function to have and so it is something I would like to add.
     
  8. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    1,358
    Looks nice! What's the price gonna be?
     
  9. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    The price will be $100.
     
    iichiversii likes this.
  10. local306

    local306

    Joined:
    Feb 28, 2016
    Posts:
    106
    Any early buy in discount?
     
  11. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    80
    Can we have a demo for VR testing?
     
  12. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    24,963
    Lovely, cant use it cos HDRP, but still lovely work.
     
    Fewes likes this.
  13. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    The asset will launch at full price.

    Yep! There will be a "regular" demo and a VR demo. Both will be made available at launch.
     
    Last edited: Mar 27, 2019
    iichiversii likes this.
  14. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    80
    Awesome, I look forward to it, I noticed the regular demo is available on your website, tried it out and its impressive, VR is my main concern however so I will wait to demo that once it goes live.
     
  15. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    217
    That looks awesome. Any chance, that the wet glass effect (the effect from the UHawk video) will be included in the asset?
     
    iichiversii likes this.
  16. Berserker44

    Berserker44

    Joined:
    Sep 1, 2013
    Posts:
    21
    I've been following your progress for months now and can't believe the work you've been doing. Super excited to support this asset if it fits my needs. I do have a few questions though.

    1. How is the performance of the clouds while in a scene? I assume its very optimized, but do you have any benchmarks we can go off of?
    2. Will this work with HDRP or LWRP?
    3. What type of customization options will the clouds have?
    4. What is the possibility of having more stylized clouds in the future? Would love a cloud system that resembled Sea of Thieves (Example Below):
    5. Will there be any particular hardware requirement. I'm working on a game that i'd like to port to the Nintendo Switch in the future and would like to see if this is an option.
    6. Will you include some type of skybox system with the clouds?
     
  17. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Impressive find, I thought the website would be hidden until I launched it but I guess not ;)

    Not really. That effect is made using some resources I don't have the license to sell. Maybe in the future I'll create a new, separate package for it.

    Thanks! Here are some answers:
    1. I dare to say that for a volumetric cloud system, the performance is really good. This is mostly due to the unique rendering method (particle grid) which keeps the fill rate cost down. It also means less cloudy sky = cheaper rendering.
    2. This is probably my most asked question. Unfortunately the answer, at least for now, is no. I'd like to support it of course and I have looked into it, however the plugin is very tightly integrated into the default pipeline and thus I decided to not try and port it.
    3. You can customize the 3D noise, how the 3D noise is applied, the look of the cloud coverage, the color of the clouds, fine-tune the lighting to your liking (over 10 parameters for this alone) as well as some weather effects. The demo will showcase more of this.
    4. I have looked into alternate render styles and I'd say you have two options. Either use the "cel-shaded" lighting mode which gives the lighting hard edges, and/or use very large noise values with the alpha sharpness turned up. I'll try and create some screenshots showing this off.
    5. The only hardware requirement I can think of is you need a compute shader-capable GPU (so DX11 and up).
    6. Yes, included is a complete solution for atmospheric scattering and volumetric fog. This works for all opaque surfaces, includes documentation on how to add support to transparent shaders and also renders the skybox. Additionally, the effect for the world fades into the skybox, so you never get seams between the two.

    Also, just a small update on the release. The asset passed review (yay!) but due some miscommunication with the store support it has to be submitted again (nay!). On the bright side this has allowed me to further improve some features (mainly quality of rendering) and so I'm thinking it's a net gain. Stay tuned for the final release!
     
    Last edited: Apr 3, 2019
  18. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    217
    Looking forward, can't wait to get Overcloud. ;)
     
  19. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    80
    Still not available? Was their issues in the approval?
     
  20. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Nope, still waiting. I will make sure to update the thread when it goes live. :)
     
    Berserker44 and iichiversii like this.
  21. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Great news! OverCloud has passed review and has been released. It is now available at http://overcloud.me/ (trailer can be found in the top-most post). Enjoy!
     
    iichiversii likes this.
  22. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    80
    That’s great news Felix, congrats, when will you be making a VR demo available?
     
  23. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    It is available already, check the website :)
     
    iichiversii likes this.
  24. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    80
    That’s great, thanks Felix, I will test today, may I make a suggestion, have the demos linked on the asset store.
     
    Fewes likes this.
  25. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Good idea, I will update the description. Thanks!
     
    iichiversii likes this.
  26. iichiversii

    iichiversii

    Joined:
    Nov 23, 2011
    Posts:
    80
    No problem Felix, again congrats on your launch.
     
    Fewes likes this.
  27. E_T_

    E_T_

    Joined:
    May 14, 2018
    Posts:
    7
    Hi Felix. Congratulations on the launch. I sincerely hope this asset is a great success for you. Please note your website link from the asset store is broken (typo in the link address)

    Question. Will the effects synchronise in a multiplayer game? IE, will each player be seeing the same thing at the same time? Lightning strikes, rain starting and stopping, cloud shadows ect.
     
    Fewes likes this.
  28. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Regarding the link I have submitted a new version of the metadata but it appears this also needs to go through the review process. Thanks for bringing it to my attention.

    It will not sync automatically, but you only need to sync a few variables yourself to make sure it matches up between clients (time of day, active weather preset and wind time should be enough). I don't really understand the state of Unity's network code as they've marked the entire API as deprecated but there seems to be no replacement, which is why I didn't try and add any networking functionality. I'll look into providing a synchronization feature for a future version (this is something I'll need myself in the future). Thanks!
     
  29. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    217
    Great, congrats to the release. :)
     
    Fewes likes this.
  30. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    A new version (1.01) of OverCloud has been submitted for review. Changes can be found below and will be moved to the OP once it has passed.

    • Fixed a bug where OverCloud failed to take into account other depth rendering modes of the camera (such as Depth+MotionVectors) and instead always forced depth only.
    • Separated cloud shadows intensity variable into two: Density and opacity. Density is applied before shadow refinement, opacity is applied after. This allows for more granular control over the cloud shadows appearance.
    • Went over the entire project and scrubbed warnings (both C# and shaders).

    Thank you :)
     
    Bartolomeus755 and christoph_r like this.
  31. D3ck3R

    D3ck3R

    Joined:
    Jun 14, 2015
    Posts:
    6
    Hey @ll,

    first congrats for the release. Great Work!

    One question:
    I realized that some Gameobjects (Render Queue: 2900+) and all treebillboards are rendering behind the OverCloud Cloud Plane. Is there a chance that the 1.01 (depth) Patch fix it?
     
  32. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Hi there! I assume you mean that objects render "on top" of the cloud plane? If your shader is in the 2900+ render queue range, it will render as a transparent surface. OverCloud renders the clouds after the AlphaTest queue, meaning that any transparent surface rendered after that will always appear on top. To fix this, there is a cloud depth buffer which can be used to blend transparent surfaces (you'll need to modify your shaders). There is a page in the manual which explains how to do this. If you're unsure how to proceed, please post what shaders you are using and I will try and help out.

    Also, just to be clear, the 1.01 patch will not address this. It is an inherent limitation to rendering transparent surfaces.
     
  33. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    406
    Hi, does this support volumetric fog color on particles by using custom particle shaders or by adding some code to existing particle shaders?

    Can the volumetric fog be used without height for space scenes?
     
  34. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Hi, do you mean adding support for the fog in custom shaders? If so then the answer is yes. You just need to add three macros to your shader (in the interpolator struct, vertex shader and at the end of the fragment shader) and it will support fog and scattering from OverCloud.

    As in having fog in space? Currently no, but this could be added in the form of allowing Unity's default fog at the same time. I'll need to know a little more about the use case and I could probably add that functionality.
     
  35. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,311
    Looks really good!

    Is the sun disc HDR? With most sky rendering packages the sun disc is not HDR and thus regular screen space bloom will not work without hacks.

    Are you going to release a terrain engine as well?

    Does the fog support density/coverage noise?

    1+ for LWRP support.

    The asset store page and the website do not have a link to this thread.

    Please add Unity editor style camera control to the demo so it is easier to inspect the clouds.
     
    Last edited: Apr 14, 2019
  36. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Everything in the asset outputs HDR colors. The sun disc is not even a texture, it is calculated based on the sun sphere in the skybox shader (with limb darkening). You can tweak the sun intensity parameter until you have the desired output for your bloom effect. Thanks!
     
    keeponshading likes this.
  37. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,311
    You were too quick to reply ;-)
    I added a few more questions since.
     
  38. D3ck3R

    D3ck3R

    Joined:
    Jun 14, 2015
    Posts:
    6
    First thanks for the quick reply :)
    Yup I ment the objects render on top (behind in renderpipeline). The trees are Unity-TreeCreator-Trees and using the Unity-Tree-Billboard shader. I don't know if and how I could edit this one. Also had that problem earlier with other assets and didn't find a fitting solution.
     
  39. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Whoops. I'll answer them here instead:

    Not in the foreseeable future, no.

    No. However, you can use the volumetric cloud plane to simulate this (can be seen in the demo).

    I'm aware of this and I will update asset store page once 1.01 have rolled out (I didn't expect meta changes to require a review).

    Good idea. I'll have to put this on the todo list for now but it will make it into the demo eventually.

    I can't find this shader, is it the "Nature/SpeedTree Billboard" one? Could you take a screenshot of your material and post it here?
    Alpha-tested shaders should "just work" but transparent ones won't. I would generally recommend to use alpha-testing for foliage, let me know if you try this and how it works out.
     
    Last edited: Apr 14, 2019
  40. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Version 1.01 is out, patch notes can be found in the OP. 1.02 will most likely be out this week as well and will contain some rendering improvements and cloud ray casting (on the CPU).
     
    bmeijer and Bartolomeus755 like this.
  41. bmeijer

    bmeijer

    Joined:
    Apr 3, 2018
    Posts:
    8
    Hi!

    I was wondering whether OverCloud is determenistic, or synchronizable across multiple clients. We're working with a setup where we use at least 3 Unity clients to render the world to a surround screen (for simulations), and therefore the world, clouds, lighting, and everything else have to be in exact sync.
     
  42. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Hi! OverCloud is deterministic, but currently lacks function to synchronize over the network. I would like to add this, and I would love some input on how it should work since I am somewhat of a novice when it comes to network coding.
    I was thinking of adding two functions: PackSync and UnpackSync, which packs/unpacks the necessary variables to a byte array. It would then be up to the user to implement these functions in their network code. Does that sound like it would be a good system?
     
  43. bmeijer

    bmeijer

    Joined:
    Apr 3, 2018
    Posts:
    8
    Great! Thanks for your quick reply. I think for us, it is as simple as replacing all code where you use Time.deltaTime with a call to our own master network time clock because we don't have a Unity master instance running the game, we just have clients listening to a network clock.

    PackSync and UnpackSync sounds like a good system for traditional games, that is also how other weather systems seem to do it (Tenkoku). I'm also a bit of a rookie in network programming, so finding some extra opinions is probably a good idea!
     
  44. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    If you can guarantee all Unity instances start at the same time, that sounds like it could works, yes. As long as you sync what weather preset is currently active (assuming the weather presets are the same on all machines) since this it what determines what the current sky will "fade towards", based on deltaTime.
     
  45. bmeijer

    bmeijer

    Joined:
    Apr 3, 2018
    Posts:
    8
    One more thing: I'm sometimes seeing some pixels that don't seem to blend very well, in the far distance. This happens when I set the downsample factor very low as you can see on the horizon of the second image. But overall, it looks beautiful!

    CETO-Overcloud.jpg Artifacts.jpg
     
  46. bmeijer

    bmeijer

    Joined:
    Apr 3, 2018
    Posts:
    8
    I'll give it a try!
     
  47. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    This might be because in the current version, the 2D clouds are downsampled along with the volumetric clouds. I have added a toggle for this which will make it into 1.02. Hopefully that will fix your issue, and if not I'll take a look at it and see if I can't fix it.
     
  48. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    I just realized, you COULD maybe get away with syncing the wind time only (besides the time/date). This is what drives the appearance and position of all effects. The variable is called m_WindTimer and it is a member variable of the OverCloud script.
     
    bmeijer likes this.
  49. bmeijer

    bmeijer

    Joined:
    Apr 3, 2018
    Posts:
    8
    Seems to work fine!
     
    Fewes likes this.
  50. Fewes

    Fewes

    Joined:
    Jul 1, 2014
    Posts:
    61
    Great! Of note is that if you start to change the active weather preset during runtime, you might experience some desync unless you can guarantee that it happens on all machines simultaneously. The desync should only last for as long as the weather is fading (Fade Duration in the inspector).