Tuesday, July 14, 2015

c# - How to achieve lighting like this in Unity for 2D games?


How could I accomplish a lighting effect something similar to this game?: enter image description here


I'm not talking about the shadows but about the glowing/lighting effect on the crystals and the torches.


Anyone got any clues?


More images from the games steam page




Answer



I've never used Unity, so I don't know what it has to offer for this specific problem, but I would create this effect with one of these methods:



  • Implement a bloom shader. This is where the brightest pixels are taken, blurred, then drawn over the scene. Here is the Wikipedia page on that.

  • Simply create a "glow" texture. This could be, for example, a blurred circle. Color it appropriately and draw it on top of the glowing objects using an additive blend mode.


Here is what I mean by "glow texture"


glow texture example


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...