Lately I've been working on some other aspects of the editor and sorting out the beginnings of a workflow between it and Blender. What I had originally thought of doing was to use DirectX .X files for mesh and animation data. It already exported the data in a format readily usable by Unity (per face vertices, animation curves, texture/material data) and .X exporters are readily available. Also because .X is a plaintext format I could tweak things as I went along if I needed to.
I decided against this route (after already writing a parser for the data some months ago as a proof of concept) because the material output didn't match well with what I had already developed for Terrain materials (in Fractured State a material is a material regardless of how it's used) and the exporters floating around (including the one that comes with Blender) outputted files with some bloat.
To that end- I dove into Python scripting for Blender. What I came back with is a module that exports mesh data into a plaintext format that Fractured State can then import at runtime. Complete with a menu entry!
From here it was pretty trivial to write a parser for this data and what we get is a pretty pink cube! (Remember our pretty pink squares from the first days of the terrain mesh algorithm? Of course you do. They were super awesome.)
Once this was working as intended I decided to insert prop loading into the serialization pipeline. This involved serializing some XML data (name, model, texture, etc.) and setting up the start of the inheritance model for objects in the game world. After that I tacked on another tool module in the editor interface and voila! We can now import props for our maps!
There is still a ton of stuff to do in regards to this. Because there are going to be a ton of place-able objects (a ton + n if you folks are keen on making some FS mods) there needs to be a way to categorize everything into a collapsible hierarchy. This - in tandem with making the UI for placing objects not look so lame - will be the next task I tackle.
Don't forget you can read my blog at FracturedState.net where you can also leave comments and feedback in the Forum or follow me on Twitter @ThisIsKelso.
Thanks for reading!