[released] Overcloud - Volumetric Sky And Lighting

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.

Compatibility information.

Media

Changelog

1.10

Fixed an issue where a shader conflict could arise if another asset provided a “Hidden/SeparableBlur” shader.

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.

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

1.09

Fixed an issue where the cloud shadows would always be pure white.

Added a global intensity multiplier for the cloud shadows under Lighting > Cloud Shadows.

1.08

Exposed the global wind time as a public variable (OverCloud.weather.WindTime). This can be used to randomize or sync the environment.

Added a warning for when a constellation of different settings results in OverCloud updating the environment lighting regularily, causing performance spikes.

1.07

Fog color is now based on the color of the atmosphere, making it more realistic and easier to configure. Because of this, the “Fog Direct Intensity” parameter (which previously controlled the amount of sunlight in fog) has been removed, and the “Fog Ambient Intensity” now instead controls how much the scattering mask will affect fog lighting, with a value of 0 meaning that the fog will appear completely black when in shadow.

Fixed a bug where the cloud albedo was not getting applied to the cloud LOD plane.

1.06

Re-enabled fog albedo (color) which was accidentally left out in a previous update.

Fixed a precision issue with the 2D fallback clouds which would result in black squares on the screen when the camera perfectly aligned with the cloud plane height.

1.05

Added two new parameters to the atmosphere rollout: Planet Scale and Height Scale. These can be used to adjust the apparent size of the atmosphere. Both are measured in Earth-like units (meaning a values of 1 = Earth-like appearance).

Fixed a bug where the downsampled depth buffer (used for cloud & volumetrics rendering) didn’t clear itself, which could result in false values over time which in turn prevented the clouds from being rendered (this was only a problem in built players).

1.04

Added a slider which can be used to control the atmosphere density. This should be used with care, as values other than 1 will break the physically based result.

Added a slider which can be used to control the far clip plane fade.

Added some static delegates to the main component which can be used to execute code right before or after certain events. These are: beforeCameraUpdate, afterCameraUpdate, beforeRender, afterRender, beforeShaderParametersUpdate, afterShaderParametersUpdate.

1.03

Added a flag to the OverCloudCamera component which allows toggling the rendering of the 2D fallback clouds, which normally are rendered in place of the volumetric clouds.

Split the mie scattering distance fade parameter into two: One which is used when the scattering mask is active, and one when it is not. This allows for more control in both scenarios.

Fixed an issue where some old code complained that the blue noise texture (which is no longer used) was not present.

1.02

Added two functions which can be used to tell if a world position is above or below the cloud volume (OverCloud.IsAboveClouds() and OverCloud.IsBelowClouds()). If the position is inside the volume, both functions will return false.

Added a function which computes the volumetric cloud visibility between two points (OverCloud.CloudVisibility). This works by sampling the cloud volume at select positions between the two points. Of note is that it is not a 100% accurate representation of the visual result, but for most cases it should be just fine.

Added a toggle to the main component which can be used to turn cloud shadows off entirely (Lighting > Cloud Shadows > Enabled). Additionally, rendering of the cloud shadows buffer is now skipped if the opacity/density is too low.

Added a toggle on the OverCloudCamera component which allows toggling the downsampling of 2D clouds. Previously, 2D clouds were always downsampled along with the volumetric ones, but this can result in some aliasing depending on your scene setup.

Moved the volumetric cloud alpha sliders to the main component (previously located on the material) under Volumetric Clouds > Shape (3D Noise).

Fixed an issue where the skybox would render as black in cameras which performed rendering during OnPreCull (such as reflection cameras).

Fixed an issue where the scattering mask world-space floor parameter wasn’t actually used when calculating the mask.

Fixed an issue where the volumetric fog drifted in the skybox when the camera moved very far from the origin.

Fixed an issue where the LOD plane for the volumetric clouds would have their alpha attenuated by scene depth against the skybox, making it invisible.

Fixed an issue caused by Unity 2019.1 where XRSettings.eyeTextureDesc fails to properly initialized HDR render targets (solved by forcing the color format to DefaultHDR is the camera rendering is HDR enabled).

Fixed an issue where OverCloud.timeOfDay was not marked as static as intended.

Fixed an issue where the “Add Preset” button at the bottom of the main component was broken. If you are using any custom floats and upgrade, this might break your prefab. To fix this, reimport the prefab fresh from the asset download.

Fixed an issue where OverCloud still rendered its own sky even if ‘Override Skybox Material’ was unchecked.

Updated some default values of the OverCloud prefab.

1.01

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).

13 Likes

Finally! Looking forward to getting my hands on this.

1 Like

Awesome! Some questions (Sorry, I’ve asked a couple of these before, but I figure that other people may have them as well):

  • 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.

  • How in-depth can we customize the atmosphere? Is it possible to create alien worlds with funky colors?

  • Are we able to place single clouds by hand in addition to the cloud plane? Can we have more than one cloud plane? :smile: Is the could plane infinite?

  • Does this asset require special materials to be added to gameobjects for correct lighting?

  • 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?

  • 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.

  • Does the sky still support transitions for extreme altitudes when the camera enters space?

  • 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.

  • Will this asset work with water assets like Aquas out of the box, or will it require modification?

  • Are there prefabs included for quick setup?

  • 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!

1 Like

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 :stuck_out_tongue:
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.

3 Likes

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?

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.

1 Like

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.

Looks nice! What’s the price gonna be?

The price will be $100.

1 Like

Any early buy in discount?

Can we have a demo for VR testing?

Lovely, cant use it cos HDRP, but still lovely work.

1 Like

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.

1 Like

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.

That looks awesome. Any chance, that the wet glass effect (the effect from the UHawk video) will be included in the asset?

1 Like

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.

  • 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?

  • Will this work with HDRP or LWRP?

  • What type of customization options will the clouds have?

  • What is the possibility of having more stylized clouds in the future? Would love a cloud system that resembled Sea of Thieves (Example Below):

  • 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.

  • Will you include some type of skybox system with the clouds?

Impressive find, I thought the website would be hidden until I launched it but I guess not :wink:

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:

  • 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.
  • 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.
  • 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.
  • 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.
  • The only hardware requirement I can think of is you need a compute shader-capable GPU (so DX11 and up).
  • 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!

4 Likes

Looking forward, can’t wait to get Overcloud. :wink:

Still not available? Was their issues in the approval?

Nope, still waiting. I will make sure to update the thread when it goes live. :slight_smile:

2 Likes