BOS Export is now functional
DOWNLOAD README
- Installation
Just extract the zip file into your blender scripts directory and you're good to go.
- S3O Importer
Just select "Import Spring S3O" from Blender's Import Menu
Select your .s3o file and it'll hopefully be loaded into the scene
You'll also get an Empty Sphere representing the Radius of the model
and a little Empty Arrow above the model representing its Height
- S3O Exporter
The best way to start is by importing an s3o using the importer and working from there, but if you're starting from scratch you'll need to do some setup.
- create a base object and rotate it 90 degrees on the X axis (select it and hit "r x 90 enter" while in object mode) This is because spring units are rotated 90 degress on the x axis compared to blender, now you can start modelling, all other pieces need to be children of this base object, they don't need to be rotated as they'll inherit it from their parents
- create a new empty, name it "SpringRadius" and choose Sphere display type. Move and Scale it until it best represents your model.
- create a new empty, name it "SpringHeight" and choose Single Arrow display type, place it just above the top of your model, this represents the Height of your model
- to export the texture names you need to create a new material called "SpringMat", give it two image textures and load the 1st image into the 1st texture and the 2nd image into the 2nd texture
Now once you're done just go File->Export->Spring S3O and select the file to save. I'd recommend saving to a new file incase something goes wrong.
- BOS Exporter
BOS Exporter will export KEYFRAME/IPO animation (not IK/bone stuff) for all Mesh and Empty objects from your scene
It will also export any marked frames as comments, this is useful for figuring out what part is what ^^
It can also export show/hide commands. to set this up you'll need to make layer keys for your pieces. if a piece is on Layer 1, it is visible, otherwise it will be hidden.
eg. the export from a simple animation of a Solar Collector opening and closing its panels.
Code: Select all
/* BOS Script Generated from Blender animation */
piece base, solbase, solar_4, solar_3, solar_2, solar_1, solarpan_1, solarpan_2, solarpan_3;
// OpenPanels
turn solar_4 to x-axis <-135.00> speed <177.63> // frame 1
turn solar_3 to x-axis <135.00> speed <177.63> // frame 1
turn solar_2 to z-axis <-135.00> speed <177.63> // frame 1
turn solar_1 to z-axis <135.00> speed <177.63> // frame 1
wait-for-turn solar_1 around z-axis // frame 20
wait-for-turn solar_2 around z-axis // frame 20
wait-for-turn solar_3 around x-axis // frame 20
wait-for-turn solar_4 around x-axis // frame 20
// ClosePanels (40)
turn solar_4 to x-axis <0.00> speed <168.75> // frame 40
turn solar_3 to x-axis <0.00> speed <168.75> // frame 40
turn solar_2 to z-axis <0.00> speed <168.75> // frame 40
turn solar_1 to z-axis <0.00> speed <168.75> // frame 40
wait-for-turn solar_1 around z-axis // frame 60
wait-for-turn solar_2 around z-axis // frame 60
wait-for-turn solar_3 around x-axis // frame 60
wait-for-turn solar_4 around x-axis // frame 60
Change Log
version 0.6
- Added BOS Exporter
- Now uses an extra Empty object for Height named 'SpringHeight', represented by an arrow so you can manually set the Height
version 0.5
- Exporter now functional
- Tested output in Spring
version 0.2
- Now handles hierarchy correctly, no weird offsets
- Loads uvmaps for .png files mirrored so they appear correctly
Known Issues
- Spring doesn't seem to handle quad output, you may need to convert your mesh to triangles first (CTRL+T in edit mode with everything selected)
- The importer doesn't handle tristrips yet (although i've never seen them used in any s3o files
- You'll need to Apply any rotation and scale you've made to objects before exporting, planned to be fixed in a later release
- Currently when importing we just rotate the base object 90 degrees on the X-Axis to get it to be lined up in blender since blender's Z axis points up where in S3Os the Y axis points up, we should probably just load the verts with the Y and Z axes swapped
any ideas, feature suggestions, or bug reports are most welcome, feel free to play with the code and send any useful patches