View topic - Simple Mod Tutorial - Part One - Model Prep


All times are UTC + 1 hour


Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 10 Dec 2007, 13:42 
MechCommander Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
Part One, Model Preparation.

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?

Image

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.

Image

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.

Image

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.

Image

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)

Image
Image

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"

Image
Image


Last edited by Pressure Line on 26 Apr 2009, 09:10, edited 4 times in total.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 10 Dec 2007, 13:48 
MechCommander Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
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.

Image

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.

Image

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.

8) 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.

Image

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.

Image

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?

Image
Image

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.

Image

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.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 10 Dec 2007, 13:50 
MechCommander Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
Additional Notes: If you have trouple loading the textures from the .wings file, the texture .tga, and alpha .bmp can be downloaded here
Top
 Offline Profile  
 
 Post subject:
PostPosted: 10 Dec 2007, 14:09 
Damned Developer
User avatar

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.
Top
 Offline Profile  
 
 Post subject:
PostPosted: 10 Dec 2007, 14:12 
MechCommander Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
Cheers rattle! I don't know anything about PS, im a Gimp user myself.
Top
 Offline Profile  
 
PostPosted: 28 Feb 2008, 15:27 

Joined: 08 Aug 2007, 20:26
hey pressure line, i loaded my model but i don't know how i set the hierarchy from here, do i need to add empty to the base of my model?
Image


Is the base of the model the immobile part? if so it's the line named immobile part in the screenshot. ANd do i have to copy paste all the parts under base?


Also what the heck is flare?
Top
 Offline Profile  
 
PostPosted: 29 Feb 2008, 01:08 
Damned Developer
User avatar

Joined: 01 Jun 2006, 12:15
Location: Banned user for reason “Do not post pictures of people fucking cars”
Would you mind posting in the right threads like the WIP thread or go make your own?
Top
 Offline Profile  
 
PostPosted: 31 May 2008, 18:45 
Modeler
User avatar

Joined: 13 May 2008, 15:51
Location: Universe
yosemite wrote:
hey pressure line, i loaded my model but i don't know how i set the hierarchy from here, do i need to add empty to the base of my model?
Image


Is the base of the model the immobile part? if so it's the line named immobile part in the screenshot. ANd do i have to copy paste all the parts under base?


Also what the heck is flare?


flare is the point your unit will fire, base is the inmobile part, i know he wrote this a few months ago, but im just saying this so everyone that doesnt know it will understand it now
Top
 Offline Profile  
 
PostPosted: 26 Sep 2008, 23:20 
Community Representative
User avatar

Joined: 08 Sep 2008, 21:59
Location: small cars
i'm assuming that the next step then is to get some BOS scripts going on... any tutorials that can be linked to this thread?
Top
 Offline Profile  
 
PostPosted: 27 Sep 2008, 07:06 
Modeler
User avatar

Joined: 13 May 2008, 15:51
Location: Universe
Actual tut.
http://www.planetannihilation.com/tadc/tut_unit_01_1.asp

You can find some stuff here too:

http://spring.clan-sy.com/wiki/Mod_and_Unit_development#Mod_development
Top
 Offline Profile  
 
PostPosted: 06 Oct 2008, 05:28 
User avatar

Joined: 03 Oct 2008, 05:38
My browser can't find the upspring link you posted. :o :shock: :( Could you please fix it? :?:
Top
 Offline Profile  
 
PostPosted: 06 Oct 2008, 06:27 
Modeler
User avatar

Joined: 13 May 2008, 15:51
Location: Universe
http://user.supradigital.org/jcnossen/UpspringInstaller-1.54.exe

There you go.
Top
 Offline Profile  
 
PostPosted: 20 Jan 2009, 05:43 
Zero-K Developer
User avatar

Joined: 14 Mar 2007, 03:44
Location: Fillydelphia
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.
Top
 Offline Profile  
 
PostPosted: 08 Mar 2009, 11:57 
User avatar

Joined: 28 Jul 2008, 05:51
Location: Australia
Thanks for the tutorial.

It's missing a step though. You have to save your final UV map texture(s) to the unittextures/ folder in your mod or Spring will crash.
Top
 Offline Profile  
 
PostPosted: 13 Mar 2009, 11:45 
MechCommander Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
That is/was to be included later, in a 'game/mod file structure' tutorial. Which would be part 4 (if it would really be needed?), after scripting (part 2) and the unit.tdf/.lua etc (part 3)
Top
 Offline Profile  
 
PostPosted: 23 Mar 2009, 09:10 

Joined: 25 Jun 2007, 05:33
hey pressure line, probably don't remember me.

any way, what are the chances of the scripting tutorial coming out any time soon?
Top
 Offline Profile  
 
PostPosted: 23 Mar 2009, 09:19 
MechCommander Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
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 :)
Top
 Offline Profile  
 
PostPosted: 28 Oct 2009, 21:47 
Modeler
User avatar

Joined: 14 Oct 2009, 17:04
Location: In a box.
Hi there - thanks for making this tutorial: it was really helpful!

I'm wondering if there's a part 2: I have my model team-coloured, with origins and hierarchies and, well, it's ready for... something. Not entirely sure what I do now...
Top
 Offline Profile  
 
PostPosted: 07 Feb 2010, 11:04 
User avatar

Joined: 31 Oct 2009, 12:35
Location: Northern Germany
Quote:
Simple Mod Tutorial


thought this are games and not mods for the spring engine, aren't they?
Top
 Offline Profile  
 
PostPosted: 05 Dec 2010, 10:52 

Joined: 19 Nov 2010, 09:44
This is the best tutorial so far. When is the part 2 coming?
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.