Creating a reasonable way of exporting Structure Synth objects to other renderers, like Sunflow and POV-Ray turned out to be more difficult than I expected. Not because they have complicated scene description languages – they don’t – but because there are a lot of settings and parameters, and I do not want to wrap and support every single one of them.
The approach I came up with is quite simple – it is now possible to define a number of rendering templates which are XML-files containing a number of text fragments, one for each of the primitives (box, sphere, …) and a ‘start’ and ‘end’ fragment.
For instance, a fragment (for a Sunflow exporter) for the ‘sphere’ primitive could look like this:
object { shader "s05" type sphere c {cx} {cy} {cz} r {rad} }
where the center and radius parameters would be substituted for each instance of the primitive.