[FREE] Cloud Shadows

Because I’m using a custom dynamic skybox solution that requires the directional light to be movable.

Okay, that’s strange. Are you sure it’s not just rotating the directional light instead of translating it?

I am sure. I’ve been digging in it’s core, it requires such manipulations in order to properly work.

Alright, in that case, this asset won’t work properly in combination with the dynamic skybox solution you’re using :confused:

1 Like

Hey, nice asset! I have a problem tho: as soon as I added Cloud Shadows script to my scene directional light the normal shadows are gone. Even during run-time if I enable Cloud Shadows component, normal shadows are back and they are gone when CS is re-enabled

Could you post a screenshot showing the problem?

Are you using any custom or 3rd part shaders?

Sure I use custom shaders, no Unity game runs on only Standard :wink: Mesh shader should not affect shadow tho, right? Will post screenshot tomorrow but not sure how showing missing shadow can help.

Someone had a similar problem in the past and it was caused by custom shaders that didn’t properly support light cookies. This asset works by rendering the cloud shadows into a render texture and assigning that texture to the directional light as a cookie.

Hi! could you add some bool parameter to affect global shadow falloff on cloud shadow?
https://gyazo.com/fe176f21fcb219ffc92b3ba4ff2fc45b
now clouds shadows cover all scene, but i want to have settings to fade it by distance…

Hi,

I don’t think it will be technically possible to add this feature, because the cloud shadows are rendered by setting a cookie on the directional light, and cookies don’t support distance fades.

Maybe you can add some fog to obscure the cloud shadows, or extend the shadows distance?

great!

Hi! Love this asset. There seems to be an issue with speed tree. It essentially turns off those shadows.

My guess is that the shaders Speedtree uses do not support light cookies.

Is there any option to use another material or shader for Speedtree?

Unfortunately no. Is there any other way around this?

You could try remapping the materials in the import settings of the speedtree asset: https://docs.unity3d.com/Manual/FBXImporter-Materials.html

The only other option would be changing the shader so that it supports light cookies.

What would I be looking for specifically from - say - the standard shader to bring over to the speedtree shader?

This might be a good starting point:

https://en.wikibooks.org/wiki/Cg_Programming/Unity/Cookies

hello, is this package supports LWRP??

thanks

I haven’t tested the asset with the LWRP yet, so I’m not a 100% sure.

But since the asset uses the directional light’s cookie to project the cloud textures and the LWRP supports a single light cookie support for the main light it should work in theory.

I have been unsuccessful in my attempts to get the asset to work with LWRP out of the box. The shader does not appear to be supported in LWRP (at least that is what the script is telling me).