Basic s3o unit making guide
What you need:
- The Model
- The UV map
- The Textures
- The Script
- UpSpring
The Model
You can make it in any of the 3d modeling programs mentioned here.
Upspring will import .OBJ, and .3DS, (.3DO is supported aswell but we are supposing to work from scratch here and not converting old units).
Importing 3ds files will have some sort of hierarchy, but with all pieces at the same level, so you will have to re-arrange them in the correct order using cut-paste commands.
If im not mistaken, .OBJ files dont have hierarchy, so there is no distinction between parts of the unit.
So for using this format you must save each part of the unit in separate files and import them individauly from upspring. You must have at least one existing object to import to, so create an "empty" if needed, then import the pieces following the hierarchy, or you can manually arrange them later.
For moving object origins, move part using the move tool, and then use "Apply transformation" button in object tab.
Put the saved .S3O file in the "Objects3D" folder in your mod structure files.
IMPORTANT
All part names in s3o must be in lower case in UpSpring.
This will avoind issues with the script.
The UV map
In my experience, 3ds models wont import with the correct UV map.
For texturing, once you have all the parts of the model imported and in the right place, use "Export Model for UV mapping" in Upspring.
Then uvmap that .OBJ file in whatever UV mapping tool of your liking, and then re-import it using the "load UV map from file".
As far as i have tested, .3DS files wont accomodate imported maps correctly, so you must use separate .OBJ files to build your model instead.
The Textures
Quote
"There are two textures for each model, texture1 is the standar skin texture but the alpha is used for teamcolor. Texture2 uses the green channel for reflectivity and the red channel for self illumination, blue is unused so far."
(In the graphics editor, what is texture will show completelly black, and what is teamcolor will show transparent, showing the texture under the alpha. Which is a bit ackward if you ask me.. as you wont be able to see what is supposed to be texture, but what wont. buh!)
The value of the alpha will blend with the texture, so you can make cool teamcolor/texture transittions ;) .
The only format known working at the moment for textures, is TARGA, .TGA files.
So save your textures in that format.
UpSpring 1.3 has a built it texture builder that dont seems to be working.
Put the finished files in "unittextures" folder inside your mod structure.
some other words on the textures:
"alpha is a greyscale... black = no team color, white = all team colour... because Photoshop is dumb stick to 1% balck or 99% black... anything in between is "blended"... like transparency in the team colour maped over the main texture..."
The Script
A common script, see other wiki resources for information on what is new/changed in spring.
The uni FBI file
In this file goes the usual information, plus one change:
the usual
Objectname=UNITNAME;
must be Objectname=UNITNAME.s3o;
Common Troubles
- The unit wont show up in game, altougth the ".give unitname" will work and you can see the selected base.
This is caused bc the unit is underground. In the Model tab you must give your unit a center, collition sphere radius and heigth in Upspring, you can use "estimate" and will be fine.
- The unit texture is all black in game!
Read the texture section here. 3DOs cant be UV textured. Use .TGA format. Dont forget alpha.
- The UV seems wrong in game..
Flip the UV. In UpSpring go to, Texture Mapping>Show UV Maps, then, edit>Flip UVs.
- I get a "missing part" error, and the unit wont aim turrets or animate as indicated in the script.
See last lines in The Model part.