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!

Short intro of us 💕✌️

We're an eletro duo based in Seoul 🇰🇷 Heavily influenced by the 90s.

Our new album #Xennials is all about the nostalgia of that era 💽 CD listenin 📟 beeper beepin 💾 floppy disks floppin days 😎

Stream now! 🎧

https://open.spotify.com/album/3YwWhnHWVy5cA8XOpbaGRA?si=8E9awqU…

So

i may or may not make an full art of some person or i may just leave this like that-

Finished a project I've been working on over the last few days!

Modeled and textured in Blender.

#3dart #lowpoly #npbr #fantasy #hut

"Our work is never over" they said.

Family band complete!

Rockin the Guitar, an Axe like Guitar I made for my Uni project

Spaaaace~

These are background sprites I've created for a game I'm working on at school ^w^ Click on the post to see how the sprites connect. You won't regret it! (personally, I think it's pretty heheh)

Drawn in Piskel using my mouse. Whaddya think?