- Home /
2D Shadows?
Are 2D shadows included in Unity 2D? If not are there any tutorials out there explaining the concepts behind 2D shadows?
Answer by awplays49 · Oct 30, 2015 at 06:23 PM
You will have to design shadow sprites in a program like PhotoShop or GIMP I believe, then program them to play animations or scale them.
Answer by slembcke2 · Jan 13, 2017 at 08:35 AM
There are a number of assets on the store for this (shameless plug alert, we wrote one of them): https://www.assetstore.unity3d.com/en/#!/list/1354-lights-2d-resources
There are a couple of popular algorithms for casting 2D shadows. One is to create a visibility polygon and draw over your scene like in this article: http://ncase.me/sight-and-light/ There is a forum thread about that method here: https://forum.unity3d.com/threads/2d-dynamic-shadows.165283/ My favorite algorithm has always been the hard shadow algorithm from this article since it's so easy to implement: http://archive.gamedev.net/archive/reference/programming/features/2dsoftshadow/page3.html Super Fast Soft Shadows is basically that algorithm, but upgraded with shaders to render accurate penumbras.
Your answer
Follow this Question
Related Questions
Isometric game: 2D background mixing with 3D models 2 Answers
Looking for a simple way to Add an Image or text to a 3d Model 1 Answer
UDP app signature? 1 Answer
2D Battle System In a 3D Game 3 Answers
Background Image in a 2D game: problems of size/quality importing. What's the right workflow? 1 Answer