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

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!

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.

Just as Pecaminosa's musicians #improvise this rendition of #LittleSunflower 🌻, so do we improvise with this post you're reading. 😂

What's coming out of your own improvs? 🤔

#Pecaminosa | #IndieDev | #OST | #Jazz

So

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

🍒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

Updated the chest in the maze, adding sound, particles and better animation. But what's in the chest?

One of the most critical update for Sunblaze demo. Now you are able to pet a cat! Finally!

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

The Authority decided to investigate the Basement and leads to recovering classified documents Fun fact: The building has 928 doors and not 1000 doors. #horror

Subscribe to technoblade