Requirements: Unit creation tank model, available here Wings 3D, Available here Upspring, available here DXTBmp, available here
Alright, we have made a tank model, uvmapped it and textured it. What do we do now?
1) The first step is to separate the parts out, we need to do this so we can animate things like the turret turning and the barrel elevating. Select the entire model in object mode, enter the RMB menu and hit separate.
2) Now we are going to recombine the pieces that dont need to move independantly. Still in object mode select the track objects and the main hull of the tank. Using the RMB menu, combine these objects.
3) We need to rename the objects to make things easier for us later on. In the Geometry Graph window, RMB on the name of the piece you want to rename and select the Rename Option. **VERY IMPORTANT** you must name your pieces with all lower case letters, or this will cause trouble with the script.
4) Our model is ready to be exported out of Wings and into UpSpring. From the File menu go into the Export submenu and hit the ? next to the 3D Studio option. Ensure your options are set as below, and hit OK. Save your model in a convienient location. (I use a folder on my desktop)
5) Keep wings open for now, but minimise it if you are running out of screen space. Its time to fire up Upspring. From the File menu, select the Load option, find and load your model (dont forget to switch it to be looking for 3ds files) When the dialog box appears asking you "There is more than one mesh in this model, what do you want to do?" select the second option "load all objects as childs of an empty root object"
Last edited by Pressure Line on 26 Apr 2009, 09:10, edited 4 times in total.
6) Now its time to set up our object hierarchy. First we need to swap the empty object UpSpring made for us with the base of our tank. To do this we select the object called 'base' and the one called '**whatever**.3ds' and hit the swap button.
Now we just need to rename the piece we swapped to something useful like 'flare.' Now cut the flare object and paste it into the barrel. Do the same with the barrel and the turret. Now we have our hierarchy set up, but if we try to animate it now it will look very strange.
7) Object origins. These are the points the pieces of our model rotate around, as well as helping to set their default positions. Remeber how i told you to keep Wings open? Well now we need to bring Wings back up and see where certain parts of the model are. First part we need to find is the end of the barrel, which should be at co-ordinates 0,18,18 (x,y,z). With the flare object selected, and the 'Only move origin' checkbox selected move the flare to the end of the barrel, and move it a small amount (0.25) in front of the barrel end. Repeat the same procedure for the barrel and turret. **HINT** start at the end of the hierarchy and move down the list, its much easier this way.
To help, i will provide you with the co-ordinates for each piece, but its a good thing to practice getting them from Wings unless you have a very good eye to get the origins in the right position. The barrel should have its origin at 0,18,5, the turret at 0,18,0, and the base at 0,5,0.
Now we need to set up the model radius and height. these define the unit's hitsphere and where the healthbar sits respectively. Go to the 'Model' tab. For now we are going to leave the centre alone, and move straight to the Radius value. But before we do we want to be able to see the size of the sphere in relation to the model, to do this click on the 'YZ' box in the side-on view of the tank and select the 'Draw radius and height' option, I also like to do the same for the 3D view. Now hit the 'Estimate button below the Radius text box.
As you can see its huge, far too big for our little tank. A value of 16 suits the size of the unit much more, but now its far too low! so we go back to the Model Centre boxes and fiddle with the values. Its ok left/right and front/back, we just need to move it up a bit, 5 units or so will do.
now we need to set the height so the unit and healthbars etc will display correctly. Checking back in Wings we see the top of the turret is 22 units high, i like to add a little padding to the height value, so lets set it to 22.5. We now have a big yellow line extending to just above the top of the turret.
Its time to save our model as an s3o. File, Save model as. save it as whatever you want, but with no spaces in the name, and you MUST add the .s3o extension onto the end.
9) Ok, we are done with Upspring for now. Minimise or close it, we can also close Wings. Its now time to prepare our texture for use in Spring. To do this we need to add an alpha channel to the texture, or it will just turn out 100% teamcolour. Open up your texture and save it as a greyscale bitmap. Colour everything that you do not want teamcoloured black, everything you want teamcoloured colour in shades of grey, the lighter the colour the more teamcolour it will have. I am just going to use 100% teamcolour, which is white on our new texture.
Now we open up DXTBmp. This is a nice easy program that lets you easily add an alpha channel, as well as convert to different filetypes and set mip levels (but lets not worry about that for now k?)
Load our main texture file. In the 'Alpha Channel' pane on the right, click the little picture of a folder with an arrow coming out. this lets us select the bitmap we just made as our alpha channel. Load it in, now our texture is ready to save, for the sake of simplicity save it with the same filename as our s3o, so in my case unittutorialtank. In the DXTBmp file menu choose Save AS, and select the "Targa with Alpha" option. Close DXTBmp and re-open Upspring.
10) In UpSpring's 'Mapping' tab, browse for your 'Texture 1' file and open it. Under the 'Texture Mapping' menu, select 'Show UV Mapping.' In the UV Mapping View go to the 'Edit' menu and select the 'Flip UVs' option. The tank will now look a little strange, but better it looks strange in UpSpring than in game right?
Under the Object menu, head into the 'Recalculate Vertex Normals 3DO Style' submenu. Select the All Objects option. This sets up the unit for SPring's shading. For now lets just use an angle of 0, so each of the faces will be shaded separately, we wouldnt usually do this on a spring model, but this model is so blocky it isnt going to make a difference.
Save the model, and congratulations, you have prepared a model to be used in a Spring game :D
**edit** oops, left out some info for step 7 x:
Last edited by Pressure Line on 11 Dec 2007, 08:13, edited 2 times in total.
Joined: 01 Jun 2006, 12:15 Location: Banned user for reason “Do not post pictures of people fucking cars”
If you are using Photoshop you might consider using NVIDIA's DDS plugin as it saves the DXTbmp step and the UVs don't have to be flipped. But be sure to reduce everything to the background layer, it either stores actual alpha channels or layer transparency and using the former is adviced.
If you don't like the lossy DXT compression it can be turned off by the way, I'm using RGBA DDS myself atm.
Note that in engine versions 0.82 and up, normals broken in Upspring due to resizing are automatically fixed by the engine (as long as the transformation was equal along all axes), so you don't need to worry about resizing stuff in Upspring no more.
Last edited by KingRaptor on 23 Dec 2010, 06:34, edited 1 time in total.
That depends on how motivated I am feeling at any given moment. I have recently been made redundant (although curiously it is essential that I do my job and do it well...) so my motivation is hovering around absolute zero, so it could be a while.
As to the remembering thing... I have a photographic memory, I dont forget much (I do forget details, but can recall general info that lets me find the details) so yeah, I remember the name, but not anything about you :)
Users browsing this forum: No registered users and 1 guest
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum