PAVI Logo PAVI Logo
HOMELINK ZONE
  MilkShape Modeling

  MilkShape Basics
Material Editor
Texturing
Animation
Modeling Basics
Game Mod's
Art Tutorials
Miscellaneous


Game Design
 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 







MilkShape Modeling
6) Getting Familiar


Welcome to this model tutorial. In the following tutorials I will be using the MilkShape modeling program(version 1.3.2). If you don't have this you can get it at http://www.swissquake.ch/chumbalum-soft.

In this first tutorial we will be learning about MilkShape(MS) itself. Fire it up if you haven't already. Your view should look something like this.

There could be small differences. If you can't see the white textfields with the numbers in them go to the Windows menu where you check Show Viewport Captions. It should now display the textfields. Make sure that the views are the same as in the shot(front, left and top).
We start by selecting the box option in the menu on the left and draw a box in one of the 2d screens. Click and hold the leftmousebutton in the 3d view to rotate the box. Now choose Select(F1) and then click anywhere in the 2view to deselect the box.
You can zoom and pan the view in both 2d and 3d by using SHIFT and CTRL. Hold Shift and drag the mouse to zoom in and out. Hold Ctrl to pan the view in all directions. You might have noticed that zooming won't work. That's because you're in the Select mode which uses shift for multiple selections instead of zooming. Press the Move(F2) and then try the zooming again. It should work now. Zooming only does not work in Select.

Now for some basic brush manipulation. Press Select. And in the Select options click the button which says Vertex. Make sure Ignore Backfaces is unchecked. Now click and drag a box around the top points of your box in the front view. It now should look like this.

Now select Move again. Click and drag a bit in the 2dviews. You can see that when you drag and release the vertices the other views change too. There is a undo option available. But it's number of undo is limited. So don't rely on this. Revert the model to it's original status again. Select the Select button and deselect the vertices. Then check the Ignore Backfaces. Now we will again click and drag around the top vertices in the top view.

Although it appears to be the same you can see in the other views that it's not the same. When you move the vertices you can see that only one edge is moved instead of the entire top. Ignore backfaces ignores all the vertices that are behind the ones in front. Which vertices are in front depends of course in which view you are selecting. Get the box back to normal and deselect it again.

Now we press faces in the Select options. Click and drag again. As you can see it now selects the faces which make up a side of the box. Moving this around has the same effect as selecting all the vertices on the corners of the side and then moving around.
Go to Move. As you can see there are move options which contains three textfields. If you enter a number in one of these textfields and then press the move button next to it, the selected part of your model will move over the distance and direction you specified. Let try this. Replace the 0.0 in the X field with 10. And then press move. Now your view should be like this.

When you are altering numbers in these textfields don't press Delete. You will delete your selection instead. If you did this just press CTRL+Z to undo it.

As you may have noticed the X,Y and Z are buttons too. Press the move button again. The side will move another 10 spaces. Now press the X button so that's it deselected and then move again. Nothing happens. When you try to move the side in the 2views you will notice that you can move along the Y and Z axis but not he X. That's what these buttons do. When you deselect these you can't move the selection over these axes.

Now the Rotate(F3) button. This is basicly the same as the Move button. Only instead of moving you now can rotate your selection. Experiment a bit with this if you like.

Last we have the Scale(F4) button. If you hidiously deformed you box in your last actions make a new one. Select on side of it by either selecting the two faces or the four cornervertices(remember to make sure that Ignore Backfaces is checked or you will also select the side behind the one you want). If you click and drag in the 2dview now you can see that you are resizing your selection. Make the side smaller so that you will get a somewhat smaller side then the other sides. This could look like this.

The numbers in the X,Y and Z textfields mean something different here then in the Move and Rotate. Instead of a number which depicts the distance you move something this is more of a percentual number.
If you fill in 2.0 in all field the selection will become 2 times as big. If you fill in 0.5 in all fields it will become two times as small. Experiment with this.

The next two buttons are Vertex(F5) and Face(F6). These aren't responsible for the manipulation of models but the construction of them. Delete all the objects you had and press Vertex.
Now set 5 vertices in the front view. Also select Show Message Window in the Windows menu. Now we will select Face. Press on one of the vertices. The message window will now say something as,

Create Face: vertex 3 selected (1. vertex in face)

Then select another vertice, the view will show a red line and the message window says

Create Face: vertex 2 selected (2. vertex in face)

Now select a third vertice thus completing the triangle. Congratulations, you just made your first polygon =) .Message window says,

Create Face: vertex 4 selected (3. vertex in face)

No you have something that could look like this,

If you turn the 3d view a bit you can see that one side of the triangle is grey and affected by shadow while the other side is black. The black side is the backface of the triangle. This face is not drawn in a game. MilkShape just shows this for easier editing. Press with the right mouse button and uncheck Draw Backfaces. As you can see in the 3dview the black side has become transparent. When creating faces in this way you must take care to form the triangles counter-clockwise. This makes sure that the good side is in front. When you create them clockwise the backface is in front. So always counter-clockwise. Now connect the remaining points. Make sure that the triangles do not overlap each other. Check with Draw Backfaces if all faces are facing the same way. If they are not just read on.

When you have done this select a single face(by pressing Select(F1) and choosing face in the options) And then go to the Face menu and select Reverse vertex order. With draw backfaces off you will see something like this.

As you can see the face is now facing the wrong way. Select Reverse vertex order again to get it right again.

The following buttons like Sphere and Cilinder are just basic shapes. The only thing you need to know about them for now is the following.
Select Cylinder. As you can see in the Cylinder Options a cylinder has stacks and slices. Slices is the number of sides a cylinder has. The more slices the rounder the cylinder is. Stacks is a way to get vertices in set places in the cilinder. Fill in 6 in both fields and draw a cylinder. This might look like this.

As you can see the cylinder has 6 sides and six stacks. More stacks means more ways to deform and shape your cylinder. But it also means more polygons. The same goes for the slices. More slices looks better but also means more polygons.

These were the basics of MilkShape editing. Next, we will be making a simple weapon.

 

Making a Weapon Model: Part Two

In this tutorial we are going to make a simple lowpolygon weapon. A short sword in this case. This is partly still a learning tutorial. I will be covering some things that weren't in the first tutorial. If you have never worked with a 3d modeling program and did not read the first tutorial I strongly suggest you start with that.
Before we start with the model we are first going to draw the swords outlines on graphic paper. I made a front and a side view here.

A side view is a bit pointless for a simple model like this sword but for more complex models it's a great help. You might even need a top view of the model. Furthermore you might want to use a ruler for longer straight lines (which I didn't in this case).

The way I'm going to construct this model will be with a combination of cylinders and self-made faces.

First I will zoom the grid of the front view until I get a grid with about the same size as my graphic paper. We will start by making the handle of the sword by making a cylinder and changing it a bit. When we look at the handle of the sword we can see that we need some stacks to make it.

I enlarged the handle in the following picture to display the number of stacks.

As you can see I only need five stacks. Of course you could add more stacks to give it a more round look as it is quite angular now. But we are making a low polygon model here. And besides, a good skin around it an you won't notice that it's not round when you play with your model ingame(covered in tutorial 4).

So we will need a cylinder with 5 stacks. Most handles consist out of only 5 slices(like the Q3 weapons) but those aren't intended to look round. Five sliced cylinders look very crude when you really look at them. However we can use any number here. Lower = less polygons, higher = better looks. Just depends on what you want.
I will use seven slices here to leave the polys low while getting that round look.

So now I will create a cylinder with 5 stacks and 7 slices. Try to align it with the grid. So make it 2 squares wide. Just as in the drawing.
As you can see the top and bottom of the cylinder are not covered. You can look right inside it. Or even though it if you have Draw backfaces disabled. So we need to do something about that first. Change the top view to bottom and select Face(F6). Close the bottom. Make sure that all your faces face the right way. Now you would have something that look likes this.


We don't need to cover up the top of the cylinder cause the hilt will be attached there. Now we will start forming the cylinder into the handle. I will be using Scale for most of this. The cylinder I made fits is 2 squares wide as in the drawing. But it should be only one square wide when viewed from the left or right. So I will select the entire cylinder in the left view and scale it till it fits in one square. The width in the front view should still be two when you are done with this. Now I will edit the entire cylinder with the use of the scale and move command until it fits the drawing I made. You can use the grid as an easy reference. Tip: When you want to move or scale over just one axis disable the other axes by using the X, Y and Z buttons. This will save time and frustration.
When you are done it could look like this.

I didn't use the axis fields to scale here. While this provides better control over the scaling of the model it's also more time-consuming(which I don't have much =). And besides, real weapons are never exactly symmetrical.

Before we continue on the hilt we are going to learn about Groups first. Click on the second tab to go to the group options. You can see a text area which displays a name like Cylinder01 or a higher number if you started over a couple of times. Go back to Model tab and draw a box somewhere in the screen. Then return to Groups again. As you can see a second name saying Box01(or higher) has appeared. Below this are five buttons and a textfield. The first button is Select. Make sure Box01 is selected in the list and then press the select button a couple of times. This toggles the selection of the box you just made on and of. The box is a group. And so is the cylinder we made at the start. MilkShape automatically groups new shapes you make. Ofcourse we can also make our own groups. This can be done with the help of the regroup button. First select both the box and the cylinder. You can do this by going back to the Model tab and select them both. Or easier, you simply select Box01 press the small select button so that it's selected, select Cylinder01 in the list and press the select button. With both selected press regroup.

The result of this action is quite clear. Both the Cylinder01 and the Box01 group have disappeared and are replaced with a single group called Regroup01. Toggling select proves that the box and the cylinder now belong to the same group. But of course we don't need the box for the model. So select the box in one of the views and delete it. You must switch back to the Model tab to do this. You can't use the delete on the Groups tab for this cause this delete removes whatever group is selected in the list. Note that this delete removes a group no matter if it's selected or not. Regroup01 is a bad name for our swordhandle. So we fill in 'handle' in the textfield and then press the rename button. With the hide button you can toggle a group out of your views. This might come in handy when you want to edit a different group and an other group is in the way. Keep in mind though that a hidden group isn't really gone. So when you want to create new faces in a hidden group this will not work. We will ignore the Smoothing options.

Why do you need to group? It is quite important for the skin you are going to apply later. But we will get to that in a different tutorial. It also allows for easier editing of the model. It's kind of hard to give a clear example of this but you will notice the difference when you try some things for yourself.

Now we will start on our hilt. As you can see in the drawing it is a square piece of the sword. No round parts on it. So now I'm going to use a different approach. I will fist set out the outline of the model with vertices(F5). The grid provides good reference of where the vertices should be placed. Do not place them directly above the handle. Keep at least a square of room between.
You can use CTRL+G to align the vertices to the grid. For the vertices that are not on the grid you can use the move command. To put a vertex in the exact center of the square you can select the move command and type 0.5 in the X and the Y field. Press move and voila. Vertex in the middle. Use this for accurate placement of the vertices.

The result could look like this.

Now we will connect the vertices with triangles using Face(F6). This will look like this.

Now we have a outline of the hilt. Select the entire hilt with select faces. Then press CTRL+D. This will duplicate the selection. Duplication will not work when you only have vertices selected. Move the duplicate a bit to the back in the top view. Now go to the Groups tab and make sure that both pieces of the hilt are in one group called hilt. You can hide the handle if you like if it obscures some of your views. We don't need it yet.

As you can see the duplicate is facing the same way as the original. But it should face the other way. Select the duplicate and use the Mirror Front <> Back option in the Vertex menu. It should now be facing the right way.

The only thing left to do is to connect the two pieces together. Leave the parts where the blade and the handle are going to be open.

The handle can now be connected to the hilt. This is why I left some space between the hilt and the handle. It's easier to make faces then. This is how I connected the both.


As you can see it's not straight as in my drawdesign. I decided that this looked this better, more round. This will happen often. When you are busy with your model you change something that is not in the drawing you originally made. This does not matter. The drawing is just a base. If you think that your model looks better a different way just do it. There are things that you don't know how they look until you modeled them. So experiment by moving and scaling parts. You might have a better model(or a worse one =P).

Last up is the blade

You can either use a cylinder for this or draw a outline with vertices. Remember that a blade is not flat but is a bit oval. So the best thing to do here is to use a cylinder.
For the point of the cylinder just scale the top of the cylinder so small that all the vertices are at the same place. When two or more vertices occupy the same place MilkShape automatically connects them together.

Give it a try! Make a cylinder, shape it the right way and then connect it to the rest of the sword. You might need some extra vertices to make the connection look nice. Don't forget that the two points of the hilt need to be placed against the sword.

Last tips: If you need a vertex somewhere but there is already a face there, just delete the face and reface the entire part with the new vertex included. And don't forget to use CTRL+G and the move and scale axisfields for accurate placing.

This was my result.

It doesn't look very classy, but it's a low polygon weapon remember? 216 in this case. If you can do with less with better results.

Making a Weapon Model: Part Three

How to skin a model in MilkShape. That's what this tutorial is about.
Before we start we need a skin ofcourse. This can be a .jpg or a .tga file. However if you want to use shaders on your skin you will need a .tga file. But I'm straying here cause this ain't a tutorial about skinning itself. If you like you can use the following piece of crap(by me) that I call a skin for this tutorial.

shortsword.jpg

If you can have a real skinner to do your skins for you. DO SO NOW!
In case you wondering why I didn't. Well, I did. Jinx offered to do the skin. But he ain't done yet. And I would like to proceed with the tutorials. So that's why.

But enough with this talking. Let's proceed with MilkShape and it's skins.

A skin in MilkShape is called a Material. And as you might have noticed, the third tab on the toolbar says Materials. Load in your swordmodel(or a different one) and select the Materials tab.
We see an empty list, a Material section with a dark square and some buttons. And below that even more buttons required for making, editing and deleting materials. We start out by pressing the New button. The list now says Material01 and a globe has appeared in the dark cube. Now we need to tell the material where to get it's skin. Press the top button and select the picture you want to use. The None button behind this just removes the path to the picture replacing it with nothing. This does not delete the material itself.
If all went well you should be seeing your skin on the little globe like this:

The material is now done. Only thing left is to assign it to the model. You can assign each group you have a different material. So the skin I made could also have consisted out of three .jpg files. One with the blade, one with the hilt and one with the handle. And then made three materials and assigned them to the appropiate groups. Which is stupid ofcourse. Just one file is much easier.

Select just the blade of the model in the Groups tab. Then press Assign in the Model tab(at the bottom). If nothing changes in your 3d view press the right mousebutton and select textured instead of Smooth Shaded. You can see that your skin is evenly distributed over the entire blade. But that is not what we want. So that's where the Texture Coordinate Editor(in the windows menu or CTRL+T) comes in.

When we open the TCE we can see our skin. Now we select blade in the pulldown and then we see a bunch of white lines and red dots appear. This is your model(the bladepart). You probably can't make anything out of this so let's change that.

Select Front in the second pulldown and then press the region button. Draw a rectangle over the part where the skin of the blade is located. Then press remap.

Now you could see the following.

If you made the swordmodel yourself and are using my skin it might not align as good as in the picture. Fortunally it's very easy to get it right. Just use the select, move, etc. buttons on the side to drag the vertices to the points where you want them. This works very easy.
Now also do the same for the hilt and the handle. You will need to select them first before they will work in the pulldown. They could be laid out somewhat like this.

I used the frontviews of the different groups. If you look in the 3d view you can see that the model looks pretty nice. Apart from some ugly stripes. Like these.

This is a close-up of the handle. The stripes that you see there are actually the edges of the skin on the neighbouring faces. If you look in the front view you can see that this side can't be seen there. It's under an exact 90 degree angle with the frontview. Select just these faces. Just like I did here.

Now go back to the TCE and select handle from the pulldown.
As you can see the faces are lines in the TCE. This is because in the front view(as I selected in the pulldown) these faces show up as lines. And that's why these faces look fucked. It's stretching the thin line of skin over the entire face. What do we do about that? We change Front to Left, draw a region somewhere and then press remap. It's the faces seen from the left! Now we can have the faces display something better. Align the faces in such a way that the skin on the model looks pretty good.

Note: DON'T spend hours aligning the faces exactly. It's a weapon model. When you play with it in game nobody will notice little flaws in the skin unless they are looking for it. Or when the flaws are really obvious. If you do want to have a neat model alter the skin by adding some patches in the .jpg which you can use to cover up the faces with the stripes.

With my handle I will just draw a region somewhere in the handle part of the skin. Just make it look like the rest of the handle. The fact that you can see where one face start and the other ends is irrelevant.
Do the same for the hilt and blade. Check if there are no stripes on faces. If so choose an angle from where you can clearly see the faces and then map them. After you did that you're model is considered complete. It's now ready to get it in a game.

The next tutorial will deal with how to export the model to .md3 format and then to get it in Quake 3 Arena.

My final result.

Making a Weapon Model: Part Four

This tutorial will deal with a shortcut way to get your model into Q3. So that you can view it ingame. Also I will give some hints on getting your hands on good skins.

I start with the skins. Like I said in the previous tutorial, unless you are pretty good(= very good) with graphical programs you better have someone else do it. In this case I have some evidence to support my point.

By me: By jinx (unfinished):


If you can't see the difference in quality you need to quit jacking off so much cause it's affecting your eyesight. If you can see the difference in quality but still don't get my point then you are just plain stupid. :P

If you manage to convince a skinner to do a skin for you he will probably need a UVW map. This is a skin which displays the edges of the models like white stripes. Just like you see when you are working with the Texture coordinate editor.

The swords UVW map looks like this.

This is the UVW map that Jinx used to base his skin on. I used a slightly different one as you can see. But that's not important. What is important is this. How do I get a UVW map for my model? Fortunally there is a neat program for that. It's called Npherno's GL viewer. I have honestly no idea where I found this program so you will have to look for it yourself. Try the bigger Q3 sites to get it. This programs main function is to display .md3 files (the Q3 model format). And you can apply skins to them! What joy.

There is also an option to create a UVW map. Load in your model and select Export=>skinbase in the File menu. This will generate a .bmp which contains your UVWmap. Send this over to the skinner and the skinning can commence.

Now the part about getting your model into Q3. I will describe the method I use to make this as easy as possible.

First create a map on your desktop called 'weapontest' or something like that. Make sure that it starts with a letter higher then p. I will explain why later. Now in the weapontest directory create a directory called 'models'. In the models directory a directory called 'weapons2'. And finally in that directory a directory called ssword or something like that. For those of you who snooped around in the pak0.pk3, you will probably know what I'm doing here. For those of you who don't, read on.

About .pk3: A .pk3 file is the same as a .zip file. You can open the pak0.pk3 in Winzip. You can see that there is a clear directory structure in there. Like the structure models/weapons2/railgun. In this directory you can find the .md3 model of the railgun and it's skin. We created on the desktop something with a similar directory structure. When we are finally are ready to make a .pk3 of our model, what we actually do is replacing the structure currently existing in quake. Q3 reads all the .pk3 in alfabethical order. So when he is done with the pak0.pk3 and then finds another .pk3 which has some directory structure the same then Q3 will use that one instead.

You can't use .pk3 with names lower than p because of this. So what we are going to do with our model is to replace it with one of he weapons that already exists. First open the pak0.pk3 in Winzip. Then go to the models/weapons2/railgun directory. Extract this directory into your weapons2 directory in your weapontest directory.

Open your model in Milkshape. Then choose Import=>Quake III Arena MD3.. Go to the dir you extracted the railgun in and open the railgun.md3. Now check if your model is the right scale. I you lost your model it's to small. If you still can't see the railgun it's to big. Also you must make sure that your model has the right position. A Q3 playermodel holds his righthand against the handle of the railgun. So if you place your sword in such a way that it has the same position as the railgun handle it will end up in the right hand. To put the sword in the left hand you will have to place it a bit more forward. Perhaps even rotate it a bit. When you are done go to the Groups tab and delete the railgun.

In the Tools menu you can choose Quake III Arena=> Generate Control File. Do this. Name the file shortsword.qc or something similar.
This is a Control file. It contains some information Milkshape needs to create an .md3. We have to make this information correct first. Open the .qc file you just made in Notepad. We can now see some code.

// Quake III Arena MD3 control file, generated by MilkShape 3D
//
$model "models/players/model/model.md3"
// 0 0 = all frames, -1 -1 = reference model, 1 30 = frame 1-30 $frames 0 0
$flags 0
$numskins 0

// you can have one or no parent tag

// tags

// meshes (surfaces)
$mesh "handle"
$skin "models/players/model/skin.tga"
$flags 0

$mesh "hilt"
$skin "models/players/model/skin.tga"
$flags 0

$mesh "blade"
$skin "models/players/model/skin.tga"
$flags 0


You can ignore the entire first part cause this deals with the animation of playermodels. We don't need that. Copy your skin in the weapontes/modes/weapons2/ssword directory. Change the mesh paths so that they point to your skin. As you can see there is a skin path for each group.

The result is this.

// meshes (surfaces)
$mesh "handle"
$skin "models/weapons2/ssword/shortsword.jpg"
$flags 0

$mesh "hilt"
$skin "models/weapons2/ssword/shortsword.jpg"
$flags 0

$mesh "blade"
$skin "models/weapons2/ssword/shortsword.jpg"
$flags 0
Save the .qc file and then go back to MilkShape. In the File menu choose Export=> Quake III Arena MD3.

Give the model the same name as the .qc file. And save it in the same dir.
This will generate a .md3 of your model which will look for a skin in the directory specified. This directory is actually Quake III Arena/baseq3/models/weapons2/ssword. .pk3 files always assume that they are placed in the baseq3 directory. So that's why the path starts at models.

Now copy your .md3 to your railgun dir. Then rename the .md3 to railgun.md3 thus overwriting the real railgunmodel. When this is all done go to your desktop and rightclick your weapontest directory. Select Add to Zip(must have Winzip installed). Then change the extension from.zip to .pk3. Press Add and your .pk3 is finished. Copy this weapontest.pk3 to your baseq3. Fire up Q3. If all went well the Railgun is now replaced with a sword with skin. Ignore the fact that a short sword normally doesn't fire Uranium slugs.

You can replace most weapons in Q3 without much problems. Some weapons however have more than one .md3. A high polygon version and some lower polygon versions. Just replace all of them then. Furthermore the playermodel is holding the sword a bit odd. The playermodel is holding his other arm somewhere in the air. This only does not happen with the gauntlet. But replacing the gauntlet is a lot trickier. This weapon has a certain level of animation(the circleblade) and can not be replaced like we did with the railgun. More on that in another tutorial.

This was how it looked in my version.

PAVI