OK - here is something I've been playing with.
Structure Synth can't squash spheres or use cylinders.
So I wrote an export template which will give me the transformation matrices for my objects -convert them via a web page using three.js and export and object and material file.
Problem is that Structure Synth only exports the full transformation matrix for boxes.
So here is the script I used for the images:
balls
{y 12}cyl
{x 12}cyl2
{x -12}cyl3
{y -12}boxes
rule balls md 12 {
{z 0.4 s 6 12 0.3 h -80 sat 0.8}box::ball
{ s 0.8 0.9 1.4 rz 90 h 20}balls
}
rule cyl md 12 {
1 * {z 0.3 s 12 6 0.3 h 80 sat 0.8} 1 *{rx 90}box::cyl
{ s 0.7 0.9 1.4 rz 90 h 20}cyl
}
rule cyl2 md 12 {
1 * {z 0.3 s 12 6 0.3 h 80 sat 0.8} 1 *{ry 90}box::cyl
{ s 0.7 0.9 1.4 rz 90 h 20}cyl2
}
rule cyl3 md 12 {
1 * {z 0.3 s 12 6 0.3 h 80 sat 0.8} 1 *{rz 90}box::cyl
{ s 0.7 0.9 1.4 rz 90 h 20}cyl3
}
rule boxes md 12 {
{z 0.2 s 6 12 0.1 h -80 sat 0.8}box
{ s 0.7 0.9 1.4 rz 90 h 20}boxes
}
and the export template is:
<template defaultExtension="Matrix (*.txt)" name="MatrixBSC">
<description>
Exports matrix to create squashed spheres and cylinders using conversion
</description>
<primitive name="begin"><![CDATA[]]></primitive>
<primitive name="end"><![CDATA[]]></primitive>
<primitive name="box"><![CDATA[box
{matrix}
{r} {g} {b} {oneminusalpha}
]]></primitive>
<primitive name="box::ball"><![CDATA[sphere
{matrix}
{r} {g} {b} {oneminusalpha}
]]></primitive>
<primitive name="box::cyl"><![CDATA[cylinder
{matrix}
{r} {g} {b} {oneminusalpha}
]]></primitive>
</template>
This will result in a text file which has the object (sphere, box, cylinder) and the full transformation matrix + color info.
This file can be uploaded to a web page and produces the second image (colours are not rendered nicely but it is more about the geometries here).
Pressing "export" will create an .obj and .mtl file which can then be imported into a 3D program of your choice and rendered.
Yes - it is not that straight forward and the preview in Structure Synth is not that helpful but hey - it's a start.
Is there any interest in the converter web page?
All the conversion is done locally on your computer using javascript - there is no data transfer to a server involved - just matrix operations using three.js and an object exporter.
Exporting 1500 round objects takes about 10 seconds during which the web page is unresponsive.
Let me know what you think and/or if that is of interest to anybody.