[FREE] Cloud Shadows

WebGL Demo | GitHub

Adding animated cloud shadows is a quick, easy and effective way to breath extra life into any outdoor environment. This asset is perfectly suited for top-down strategy or city-building games, but also looks great from other viewpoints and in other type of games.

Main Features:

  • Customization: The layer system enables you to customize the effect so that it matches the visual style of your project seamlessly
  • Editor preview: The cloud shadows are previewed inside the Unity scene editor, so tweaking is easy and straightforward
  • Easy to use: Includes several ready-to-use prefabs and full documentation
  • Performance: Designed with performance in mind, zero allocation during run-time
  • Open Source: Full source code is included

Requirements:

  • The scene needs to contain a Directional Light which is used to simulate sunlight.
  • This directional light needs to be rendered in real-time, baked light maps are not supported for this light (other lights can still use light maps).
  • The rendering path must be set to either forward or deferred. Vertex lit is not supported.

Supported platforms:

  • Desktop (PC, Mac, Linux)
  • Mobile
  • Virtual Reality

Now open source and available for free on GitHub:

4 Likes

Great asset! The result in the scenes is remarkable and pretty easy to achieve

Just one detail that will be very useful is a way to control de speed of the clouds. Since other assets have, I think is not a big deal.

Thanks for your work!

Thanks for the positive feedback!

You can control the speed of the clouds, by changing the velocity settings in each layer. Would you prefer having some sort of global speed multiplier?

Thanks for the hint!

BTW, I think will be great to have control over a global speed multiplier for scripting tasks.

Alright, I’ll try to add that feature in the next update.

I’ve created a small WebGL demo for this asset.

You can try it out here: http://entropi-games.com/files/cloud-shadows-demo/

Great Plugin!!

is this plugin support 2D?

I’ve just tested the asset and it does work in 2D projects.

The only requirement is that you use the Diffuse sprite material (Sprites/Diffuse) and that you use a directional light to light these sprites.

Here’s a screenshot of a simple test scene I made.

2974756--221066--Cloud-Shadows-2D-example.jpg

Version 1.1.0 is now available for download on the Asset Store: http://u3d.as/tJe

Here’s what new in this version:

  • Introduced new system for defining Cloud Layers using Scriptable Objects
  • Added Global Mutators for coverage, softness, speed and direction
  • Added Custom Editor script for all components
  • Added extra prefabs
  • Small shader fixes

Hey! Great asset! Was super quick and easy to incorporate and has a nice amount of customisability, thanks!

I have one concern, and it’s most likely me doing something wrong, however the cloud shadows appear in areas that are shadowed from other assets, for example inside buildings etc. Am I missing a setting somewhere?

Thanks

Hi, glad you like the asset.

The effect should no appear in shadowed areas, but you need to make sure that the shadows strength of the Directional light is set to 1.

If that does not resolve the issue, please post a screenshot if possible :slight_smile:

This asset is currently part of the “Biggest Sale Ever” on the Unity Asset Store, and can be bought for 30% off.

Get it here while it’s on sale: Cloud Shadows | Particles/Effects | Unity Asset Store

Just to clarify, you mention in a previous post that shadow strength should be set to 1 on the directional light. I have a scene with shadow strength at 0.5 for all objects - 1 is pure black. Would I be able to keep this at 0.5 for existing scene and still use this asset…?

Would expect all shadows to blend into one another, ie a tree shadow should not change intensity if the cloud shadow is cast on top.

Thanks

The cloud shadows are projected using light cookies, so they don’t blend correctly with the actual shadows of the directional light, if the strength is lower than 1. You can change the global opacity of the cloud shadows to match the shadow strength, which will make the problem less visible.

Ideally, the directional light shadow strength should be set to 1 and ambient light or indirect light should be used to prevent your shadows from being pure black. In reality, there is no such thing as a half strength shadow, either light is blocked or it’s not :slight_smile:

Hi - loving this asset so far, but I am hoping it is possible to adjust the settings from scripts not just the editor?

I want to randomly choose a few things on launch - e.g. direction - but I can’t find a way to get access to the CloudShadows component. I’ve tried adding “using EntroPi” etc, but it can’t find the namespace. Am I doing something wrong?

Thanks.

Hi, glad you like the asset :wink:

Every setting can be changed at run-time from scripts. Here’s a very basic example:

using UnityEngine;
using EntroPi;

public class Test : MonoBehaviour
{
    private CloudShadows m_CloudShadows;

    private void Start()
    {
        m_CloudShadows = FindObjectOfType<CloudShadows>();

        // Change global modifier
        m_CloudShadows.OpacityMultiplier = 0.75f;
       
        // Change layer data.
        m_CloudShadows.CloudLayers[0].Coverage = 0.5f;
    }
}

Now that this asset is on sale, I am interested to buy it. However, I have one serious question. AFAIK this asset uses Directional Light’s cookie to display such effect, but it requires the light to be in one place, not movable, or else the cookies will move with it. As such, does this plugin fix this? Will it be possible to use this in a dynamic sky solution where directional light follows the player?

Moving a directional light has no effect, since it’s position isn’t used to calculate the lighting, just the direction / rotation.

With this asset, you can rotate the directional light, to for example simulate day and night cycles.

So, does this really mean that clouds won’t move when I’ll move my directional light?

Sorry if I wasn’t clear, if you move the directional light, the cloud shadows will move with it.

But there’s no good reason to move the directional light, since it’s position is irrelevant to the lighting calculation, and so moving it will have no effect.
So why does it need to follow your character?