Friday, October 10, 2014

Dynamic Lighting for 2D games

A tool that automatically generates normal maps from sprites

While working on InDee Toons, I have discovered a way to create dynamic lighting information for 2D images.
After some pretty promising tests with Image Magick, the first prototype of Sprite DLight was born.
What initially started as a research on how to
provide normal maps for my game characters, turned into an independent project
that seems to be of interest to a lot of people.
2D games and pixel art combined with dynamic lighting appears to be an explosive mixture, because you can achieve wonderful atmospheric effects while maintaining the individual 2D art style.

I am developing the tool for Windows and Linux platforms and hope to show
it on kickstarter soon.The core feature of Sprite DLight is the generation of a normal map from
one single sprite file as the input image.
While existing normal map generation tools need
at least two additionally drawn lightmaps to produce a normal
map (which can be painful when you want to use it with animated characters), Sprite DLight can be fed with already existing sprites and sprite sheets,
reducing the effort needed to create the 3D information, to a few clicks.

An example of an input sprite from the game
"Boot Hill Heroes" by Experimental Gamer, which is released on Steam today, and the resulting normal map, depth map, ambient occlusion map and specularity
map generated by Sprite DLight:

Annotation: "Boot Hill Heroes" does not feature dynamic lighting (this should not prevent you from checking it out), but the artist kindly allowed me to use the sprites.

I am now looking for more nice art of different
styles, depicting game characters, objects, trees and more, to demonstrate the
effect of dynamic lighting and the quality of the automatically generated maps.
If you are interested in making a 2D game
featuring normal mapped sprites, or if you would like to see your art with
dynamic lighting - probably featured in my kickstarter video/page (of course
with a reference to you and your copyright), please leave me a comment, use the contact form or email
me.