This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
TL;DR - I wrote an article with a .unitypackage and details about converting Sprites to Meshes so that they can be used with things like realtime shadows. You can read it here.
When Unity 5 was released I was very excited to get my hands on real time lighting, post processing, and all the other awesome things it provided.
Unfortunately some of those things didn't seem available for 2D features by default, such as shadows being cast by and received by sprites.
After trying a bunch of tricks and shaders that other people had suggested for 4.x and 5, none of which seemed to work for me, I took one of the more stable concepts I had come across and wrote a couple small scripts to fit it that process into my workflow.
I've written an article - you can read it at my site - which goes over the basics.
Essentially the tool takes all the Sprite mesh info it can, generates (and saves) meshes, and updates the Sprite game object to use Mesh rendering instead.
After conversion the used-to-be-sprite is pretty much immediately ready for real time lighting: http://gfycat.com/ApprehensiveShabbyBongo
There are some shortcomings, such as not working with Sprite animations (flipbook), but for static sprites such as tiled backgrounds and environments, this should do quite well.
Hopefully this is helpful!
Let me know if you have any feedback or other thoughts. I'm contemplating writing a post about setting up a 2D scene with more interesting shadows and lighting as an extension of what this post sets up, if this post has been interesting enough?
Subreddit
Post Details
- Posted
- 9 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Unity2D/com...