I suddenly found an easy and reliable way to implement new rendering features I was thinking about for a long time. A separate thread to attract attention of tileset authors because the new features require changes to tilesets.
Features1. Buildings and items are now rendered separately from the floor - you can notice that coffins, chairs, slabs and so on have different colours but their backgrounds stay the same, and are actual floor tiles - rough, smooth, engraved. No stockpiles on this screenshots, but you'd see stockpile tiles behind items as well.
2. Look at the beds. The bed frames have different colours depending on their material, but pillows and sheets stay the same, i.e. not all tile pixels are affected by the foreground colour.
3. Oblique view mode I showed here
http://www.bay12forums.com/smf/index.php?topic=138754.msg7390751#msg7390751 It's not available at the moment, I'll update the post later.
Tileset changes1. Existing tilesets will continue to work as usual.
2. To support these new features, tilesets need to have three "layers":
First is used to render background colours and normally should just be white for non-empty tile pixels. This is supplied as e.g. Spacefox-bg.png
Second is the main tile image which will be coloured using foreground tile colour, can now have fully transparent pixels where floor should be visible. This is supplied as usual Spacefox.png
Third is just the pixels that won't change colour. This is supplied as Spacefox-top.png
If -bg and -top files are not available, the corresponding features will be disabled and the tileset will work as before.
Notes1. Binaries are available from
build.mifki.com. When installing, copy white1px.png and transparent1px.png to data/art folder. An example tileset based on Spacefox is included.
2. This works the same way for overrides, just supply additional -bg and -top images for each tileset used by overrides. However due to 3 times more tiles now being used and restrictions on the largest texture size, tileset authors using a lot of overrides and/or very big tile sizes need to be careful not to waste any space in tileset images, i.e. having three images with just half of the tiles actually used is bad because all tiles will still be loaded.
3. If you can't see the floor though some of the buildings/items, it's because I forgot to include them, there are quite a few of such (that is, in the code, the example tileset has just a few tiles modified to demo the new features).