Geek spend yesterday afternoon writing a quick prototype python script that takes as input a TMX tilemap from Tiled and turns it into a 3d OBJ file that Blender can import. He decided that the TMX tilemap should be setup so that each layer is at a particular z value and he’s making voxels out of each “tile” with a fixed thickness, just as an initial test. The script also makes a materials file out of the TMX file tile image file and applies that to the voxels. Seems like a pretty cool idea to me. Here’s his very first test picture (click to enlarge):
I’m hoping he’ll write a tutorial on how to do it, but the basic idea is that he’s reading in the TMX tilemap file and parsing it one layer at a time, outputting the coordinates and materials references in OBJ file format as well as generating the appropriate materials file. Relatively straight-forward, but not something I would have thought to do.
Update 1/14/2011 –
Geek played with this some more today and added support for hexagonal tile TMX tilemaps. Here’s a first test image:
Update January 30, 2011 –
Geek’s been playing with this more over the last couple of weeks and he’s got support for using TMX tiles to indicate placement of 3d models instead of just expanding tiles into the third dimension. A config file specifies what model file to use for each tile id. First tests of that were trees, and today he’s added initial support for castles (battlements are tricky!).
All 3d models are just quick test models and textures likewise are whatever he could find for free on the net. The underlying technology he’s created that takes the TMX file, config data, texture files and 3d models and converts them into an OBJ file with materials, textures and 3d expansion of the 2d TMX file should work with more “real” parts.
Here are a couple of images from Blender after importing the OBJ files his python code has generated from the TMX files: