Basic s3o unit making guide: Difference between revisions
| Line 65: | Line 65: | ||
The value of the alpha will blend with the texture, so you can make cool teamcolor/texture | The value of the alpha will blend with the texture, so you can make cool teamcolor/texture transitions ;) . | ||
Revision as of 04:48, 12 April 2006
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 individually 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 avoid issues with the script.
The UV map
Only one UV map image is allowed, so you must make all part use the same UV map.
A guide on Skinning (UV mapping) can be found here.
In my experience, 3DS models wont import with the correct UV map, so its better to use separate .OBJ files to build your model instead of texturing the 3DS file.
For doing that, 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".
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 GIMP, what is texture will show completely black, and what is teamcolor will show transparent, showing the texture under the alpha. Which is a bit awkward 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 transitions ;) .
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 mapped 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, although 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, collision 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.