Thanks miguli! Feels good to be back at it.
I've been experimenting with something I've wanted to implement since about November, which is dynamic lighting. Looking at the screenshots so far, there's a sense that the two-dimensional sprites don't quite look as if they really belong in the environment, and instead kind of look as if they've been pasted in. Sure, part of that is unavoidable given the mad perspective I'm going with for this game, but I've been pretty sure that it can be improved upon given decent lighting.
One recent development on the Spine forums has been a freely available (and actively developed) shader for Spine characters, that receives light, with support for vertex lighting, pixel lighting, and normal maps. It's not perfect quite yet, but I thought it worth trying out, so that I can plan in environmental effects that really liven up the aestheic. You'll notice in the painting I posted a couple of days ago, there's a lot of lighting going on there. I'd love for the game to begin to look like that.
Here's the current state of experimentation, the first image is how it has been thus-far during development, no lighting at all, with the exception of casting a shadow.
The exaggerated set-up for this scene is two pretty powerful point lights (red and blue), also in daylight. The second image shows what happens when the new lit shader is applied, the whole sprite is washed with a hue resulting from the mix of the blue and red lights. I think this already looks better than no-lighting, there's much less 'pop', the character fits in with the grass objects which are actual 3D models, and there's some dynamic shadows from the point lights too.
Normal maps are a great way to fake height and depth on a plane, effectively, another image is applied on-top of the texture image, containing information of the normal (surface angle) of the various points on the flat surface.
I got in touch with the developer of the not-yet-released normal map creation tool
Sprite DLight, which sets itself apart from other sprite normal mapping tools by creating normal maps automatically, rather than forcing me to paint it all myself. He's been quite helpful, exporting a couple of maps for me to test with from the current beta of the software.
Of the two, the one without smoothing seems to appear the more subtle of the two, more naturally lighting the edges of the face. The obvious difference between a normal mapped surface, and the sprite with lit data applied evenly, is that the sprite gets lit with different colours in different areas. So the left side of the head is lit with a red hue, and the face with a blue hue, giving the character a better sense of place in the world.
The rather unfortunate side-effect of the normal mapping technique, is the problem of seams, as can be seen around the elbows, knees, and most clearly where the legs enter the body. This occurs because the automatic behaviour of DLight doesn't take into account the segmented nature of the Spine atlas.
The character atlas image is a horrific Tetris game of body parts from all the different characters that share the Human skeleton, spread all over the place, and DLight treats each of those separately. It's a known problem when it comes to Spine characters and automatic normal mapping techniques. I'd be very interested to hear if anyone has any suggestions as to nice ways to reduce these artifacts.