I’ve started to do some prototyping work on Manticore, the isometric 2D graphics engine I’ll be using for my Rage and Sorrow game. The prototype is built on top of my Pixie Game Engine, and I’ve been working on some rendering scripts for Poser (the art tool I use) which renders my objects in several different ways, so that I can use them to do some nice real-time lighting.
Here’s the result (and below it are the different images I render from Poser):
What I’m actually doing here, is rendering four images in Poser – one for the basic textures, or albedo, one for the facing direction (or normal) of each pixel, and two for shadows (one for the ambient shadows and one for the shadow of a fixed directional light source). These images are then stored in a much more compact format – albedo is palettized to 8 bits per pixel, the normals are stored with 8 bits for x, 7 bits for y and 1 bit for z (for a total of 16 bits) and the shadows are stored as 8 bits per pixel (though I’m considering dropping it to 4 bits per pixel, which might work ok). Each of these are then RLE-compressed, making for quite efficient storage.
When I’m rendering, I do a straight forward deferred renderer (but I do it in software – no GPU acceleration in this prototype, but it will be eventually) where I render the four RLE datasets to four buffers, and then perform (linear space) lighting in a separate pass (for now, I do two full-screen directional lights and hemisphere ambient lighting, but I’ll add support for point lights next), followed by a final pass of "filmic tonemapping" (yeah, I got that from this years GDC presentation on Uncharted 2
)
And I’m quite happy with the result so far – If you want to see what it looks like when it is running, here’s a download link:
Download lighting demo
(I won’t be able to have dynamic shadows with this technology, and I guess it does look a bit funny when the light sources move and the shadows don’t, but I think I can live with that…)