How to: Cloud Shadows
Hello there, my name is Dylon and Today I will explain how to make moving cloud shadows for your game.
You will be making two alpha textures for the clouds. Both textures can be created in any photo editor like photoshop. The textures should resemble something like this you can make it look however you want. Some things to keep in mind are that the dark spots are the shadows, and the light spots are the light. So, make the clouds darker and the space in between lighter. Save out the photo as a .TIFF file.
The next step is to import these two textures into unity and create a folder and name it cloud shadows. Next in the same folder create a custom render texture. To find this right click in the folder go to create>shader>custom render texture. Name it something like cloud shadow and open it.
For the next step I’ll Walk you through briefly on what the code is doing. Line 5 is going to be controlling the speed of the texture across the ground. Line 6 and 7 is just getting the two textures that we made. Lines 31 through 38 is where the action is really happening, and speeds and locations are getting multiplied.
Now exit out of the code and go back to the folder and right click and create a material and name it cloud Material. And apply the two cloud textures.
Go back to the folder and right click again and create a custom render texture. This is going to be what you put the cloud material onto. There's a few settings we need to change on the custom render texture.
Change what’s next to red. This is to always make sure the texture repeats across the landscape.
The last step is to assign the Custom Render Texture to the cookie slot on the directional light.
This is where you can adjust the size of the images to whatever fits your needs.
That’s all from me I hope this was useful and that you learned something I hope you have a chance to play our game and leave some feedback thanks and have a good day.
Get Not so Trash Panda
Not so Trash Panda
You're a raccoon just trying to do the right thing.
Status | Released |
Authors | Dylon999, jojoman941, LauraG914, slleggott, Navebackwards, Lord Unchemael |
Genre | Puzzle |
Tags | Casual, Cute |
More posts
- How To Throw ObjectsJul 23, 2024
- Using empty game objects as target points.Jul 22, 2024
- Common Mistakes when coding GamesJul 15, 2024
- 2D Art and UIJul 08, 2024
- How to make a water sprinkler with unity's Visual ScriptingJul 08, 2024
- What is Not so Trash Panda?Jul 01, 2024
- How to pick up ObjectsJun 18, 2024
- Completion Detection System for Unique TasksJun 18, 2024
- Creating the Cute Protagonist for Our GameJun 10, 2024
Leave a comment
Log in with itch.io to leave a comment.