6
2012
Dynamic Clouds + Cloud Shadows on Terrain
Adding more stuff to the previous cloud test, now with fake shadows. (scene works with unity indie)
New features:
– Animated sky cloud shadows on terrain
– Bugs: Currently the clouds are not perfectly aligned..
– Shadow strength can be adjusted (now its 0.5 for the webplayer, 1 would give total black drop shadow for the cloud)
– I think it would need some cut-off value for the shadows, as almost transparent clouds still make quite visible shadows..
Webplayer:
http://unitycoder.com/upload/demos/AnimatedCloudsSkyDomeShadows1/
Get current test version source (2-in-1 : Animated clouds & Fake cloud shadows : works with indie):
(Direct download link arrives to your email!)
4eur [digishop id=”3″]
*Note that this is “developer version”, the example scene “just works”, you might have to tweak it to make it work in your scenes.. (email me if you have problems)
** Note#2: Doesnt work well with LINEAR mode (gamma is fine), also some problems with DEFERRED mode
FIX for Unity5 (tested on beta11)
Open shader “CloudShadow3.shader”
Find line:
float2 uv_PerlinTex: TEXCOORD0;
Comment it out:
//float2 uv_PerlinTex: TEXCOORD0;
Find line:
perturbValue = tex2D (_PerlinTex, half2(IN.uv_PerlinTex.x+translation,IN.uv_PerlinTex.y));
Replace that line with:
perturbValue = tex2D (_PerlinTex, half2(i.uv_Main.x,i.uv_Main.y+translation));
Find line:
_ShadowTex (“Cookie”, 2D) = “gray” { TexGen ObjectLinear }
Replace with:
_ShadowTex (“Cookie”, 2D) = “gray”
—
Image#2: Testing in unity5, after adding blend mode to see skybox behind it “Blend OneMinusDstColor One // Soft Additive”
(see info about sun game window problems here)

Related Posts
13 Comments + Add Comment
Leave a comment
Recent posts
- Favorites in PackageManager
- LudumDare59 : Signal
- Unity Editor: Tree Generator
- Leaf/Foliage Generator Tools (Runs in Browser)
- Testing Unity AI Beta
- Ways to Support UnityCoder Development
- Using UI Slider to Create 5-Star Rating Element
- Game Music Library For Unity (editor plugin)
- Fontastic : Easily Test Fonts in Unity Editor!
- GeoTiff Importer & Terrain Generator for Unity
- Create Baked DropShadow for UI images
- .JP2 Ortho Image Converter to PNG/JPG/TIFF
Recent Comments
- on Mesh Exploder (sources)
- on Sprite Sheet Flip Book Shader
- on Sprite Sheet Flip Book Shader
- on [Asset Store] PolygonCollider2D Optimizer
- on Trajectory Test Scene 2.0
- on Vector3 maths for dummies!
- on UnityHub 3.6.0: Remove Version Control & Cloud Dashboard columns
- on Using RenderDoc with Unity (graphics debugger)
Coin:
CUgDSbRqFcAumDSAcdKDvuXsw26VdkJe8C8WGUQHBAGS
An article by













That looks really awesome!
I guess you would need Unity Pro for the shadows though?
Would be really awesome if you would actually finish and release this one though. You’re really great at all this stuff. You should do tutorials =)
Doesn’t need pro (and i’m using unity indie too..)
Thanks!
it looks awesome!! 😀
when you post the download link??
Maybe in 4-6months.. still needs some work. (donaters get the current version as-is, that is might have some problems/bugs)
Direct purchase download link added for now! (so no free version atleast this year yet..)
Is this project still being maintained? Do the shadows work on a mesh (I.e. a terrain not generated in Unity)?
Thanks!
Also, what version of unity was this last tested on?
Thanks!
Just tested on 4.6.0b17, still works (and no warnings), but there hasnt been any updates or improvements on this since release..
It works on mesh also (shadows are made with projector in this version)
Works with Unity 5 beta?
tested on 5.0.0b11 (64bit), needed few modifications to work (adding them to main post now^)
Tried and it’s pretty cool, but I noticed that the projector doesn’t cast shadows on 3D object in the scene (of course, all this model has Mesh Renderer component). It’s possible for that objects to receive shadows? Thanks.
Could be because by default the “CloudShadowProjector” transform Y position is so low? (try moving it higher, and also adjust the Near/Far clip planes if necessary.
Animated cloud shadows asset for Unity
https://github.com/EntroPi-Games/Unity-Cloud-Shadows