Game
The Vrennman Case
7 years ago

Making of Light v3


Hello, programmer person here.

5d0a5370ebdf0.gif

I figured, I’d give you a little rundown on the new lighting system I’ve lazily dubbed lightv3 (exactly like that. lightv3). Because It came a long way.

As you can see up there, initially it … was weird to say the least.
It would also cause the project the same shadow shapes on all sprites in the scene.

The general idea was:
Well, if I know the position where the light came from, I can test for each light pixel, if there is something between that pixel and the light source. An obstacle, so to say.
It’s an easy enough idea for sure.

5d0a53743d6ac.gif

Turns out it wasn’t that easy to implement regardless. Not for me anyway. I’m not exactly the expert in terms of shader programming.

But I got to a solution at some point that would resemble something like a light casting shadows. Only… it had this nightmarish look to it. You know. monsters chomping away at the light with bloody fangs straight from a horror movie.

5d0a53780178d.gif

Additionally to that there were these artifacts on the light, opposite of the thing that actually casted shadows. Turned out I sort of over-sampled and the shader thought there would be shadow there, removing pixels from that bit.
Quite the unnerving thing, that was. As you can see, even if I had left the shadows as that awkward … whatever it was, it’s all not very natural looking.
The edges had to be blurred somewhat.

5d0a537a6d69a.gif

I did that by gradually removing alpha from the light pixels depending on their distance to the light obstacle (walls and stuff).

Last but not least I changed how the light pixels are blended on the screen buffer (in a soft additive fashion) and voilá.

5d0a537eec560.gif

That’s lightv3 now.
I also added options to lights to not cast shadows and another one for just shining on anything regardless ob light obstacles.

And that concludes this.
If you’re interested in the gory details of how the shader actually works, let me know in the comments or some such!



0 comments

Loading...

Next up

In this rather late-to-the-party article Chris talks about what happened when we didn't post anything in November as promised. It's exciting. And maybe a little crazy.

Good people of the Vrennman Case following!

We have a LOT of change in store for the game in the coming year. And a new playable demo build will be available soon!

Did you know that today is #InternationalJazzDay? 🎷😎

No? 😯 Well, we couldn't pass up this date!

And what better to celebrate this day than #Pecaminosa #OST? 🎷

Let us know what you think about it and have a great weekend!

🍒Did you like the game? A demo is available for free on Steam.

✌️ Thanks for playing IndieGameiacs!

⚙️ Free Demo: http://bit.ly/UniDuni

📺 Full Video: https://youtu.be/5qEbVXg7GaQ

#steam #uniduni #clops #screenshotsaturday

Enemies can also suddenly spawn through Realm Rifts. These Rift Spawns are going to be stronger than the ones wandering around. TBD on the enemies... #screenshotsaturday #godstear #madewithunity

Heya! I wanted to show some gameplay progress i made so far. I hope you like it ^^

Werehog transformation process. #sonicunleashed

Horror WIP A track that will be featured in a future horror game soundtrack! Stay tuned!

Likes appreciated ✌️

#gamedev #composer #horrorgame #indiegame #IndieGameDev #soundtrack

Szayel Aporro Granz - Bleach

Cash Banooca