Hi There,
Like in the title, is there a way to do this?
In my current game, which is quite like Starbound, I want to achieve a similar lighting style with soft and Tile-penetrating Lights. I tried a bit myself to do this, but i am just not a shader or VFX guy. But i also couldn’t find any Assets on the asset store that are just that type of lighting i need without an entire 2D Sandbox Engine build into it or any post online on how you can do this, so i hope someone with more Skill then me can help me here.
I went through this whole process recently, and no, there isn’t. You’ll need to code your own tile-based lighting system.
I recently implemented the same thing in my project. The long and short of it was that it is just a texture (assigned to a sprite) spread across and overlaying the entire world (my worlds aren’t particularly large), and I used a queue-based box-fill algorithm I wrote myself to proliferate light with fall-off.
Just gotta make sure you take a model-view approach. Have the lighting data separate to the texture, and use it to modify the pixels as needed. All-in-all the whole lighting data system is only around 500 lines of code, though not sure if posting it will help as it’s very tied to my project.
But I got what felt like pretty much the same result as games like Terraria and Starbound:
Thank you for finally giving me a clear answer to this. I was trying this for a long time, and hearing a clear no gives me some peace.
I actually have a system I was using before. But when I looked at the cool features from URP like Normal maps, I wanted to try to Switch.
My system uses 2 Cameras. One for the normal View and one for only the Shadow casting tiles and Light Sources. I then just blend them together.
It even sports Colored Lights, so it is a decent way. My biggest problem with this tho is that I need an additional Tile map for the second camera to capture where the lights and shadows are at and the fact that I need a 2. Camera to capture it. But maybe with your approach of rendering the Shadow Casting Tiles to a Texture and giving this to the Shader, but I need to try this.