How to create a model using the Quake Model Editor

Tutorials for game development.
Post Reply
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

How to create a model using the Quake Model Editor

Post by Zefz »

This tutorial will take you through the basics of creating, skinning and animating a model for Egoboo. Credits go to booger who has written this tutorial.

Let’s start off by familiarizing ourselves with the freeware Quake Model Editor. There are a couple of things you should know first:
- Egoboo uses the Quake 2 .MD2 model format for object models.
- There is a 128 Vertex limit on models (including grips)

Character Models
Character models must have a left and right grip.
Grips are where weapons get attached to the character.
Each grip is represented by 4 vertices.
THE GRIP VERTICES SHOULD BE PUT INTO THE MODEL LAST.
Just cut and paste from some other model and you'll be fine.
Basically the grip vertices represent a matrix.
4 vertices = x rotation, y rotation, z rotation, and translation(position).
It is kind of hard to visualize when you are looking at the vertices in the model, but you can kind of see it.
The vertex at the hand is the translation, the vertex in the positive x direction is the x rotation, etc...

Weapons Models
Weapon models must use a SPAWNLAST vertex.
It is an extra vertex that floats at the tip of the weapon.
Attack particles get spawned at this point.
THE SPAWNLAST VERTEX SHOULD BE PUT INTO THE MODEL LAST.

The most important thing about creating a new model is to name your frames correctly.
The name consists of a 2 letter action type, followed by a the 2 digit frame number, followed by any special codes.
It looks something like KA03SP.

Action Types

Code: Select all

   * DA - Dance ( Typical standing )
    * DB - Dance ( Bored )
    * DC - Dance ( Bored )
    * DD - Dance ( Bored )
    * UA - Unarmed Attack ( Left )
    * UB - Unarmed Attack ( Left )
    * UC - Unarmed Attack ( Right )
    * UD - Unarmed Attack ( Right )
    * TA - Thrust Attack ( Left )
    * TB - Thrust Attack ( Left )
    * TC - Thrust Attack ( Right )
    * TD - Thrust Attack ( Right )
    * CA - Chop Attack ( Left )
    * CB - Chop Attack ( Left )
    * CC - Chop Attack ( Right )
    * CD - Chop Attack ( Right )
    * SA - Slice Attack ( Left )
    * SB - Slice Attack ( Left )
    * SC - Slice Attack ( Right )
    * SD - Slice Attack ( Right )
    * BA - Bash Attack ( Left )
    * BB - Bash Attack ( Left )
    * BC - Bash Attack ( Right )
    * BD - Bash Attack ( Right )
    * LA - Longbow Attack ( Left )
    * LB - Longbow Attack ( Left )
    * LC - Longbow Attack ( Right )
    * LD - Longbow Attack ( Right )
    * XA - Crossbow Attack ( Left )
    * XB - Crossbow Attack ( Left )
    * XC - Crossbow Attack ( Right )
    * XD - Crossbow Attack ( Right )
    * FA - Flinged Attack ( Left )
    * FB - Flinged Attack ( Left )
    * FC - Flinged Attack ( Right )
    * FD - Flinged Attack ( Right )
    * PA - Parry or Block ( Left )
    * PB - Parry or Block ( Left )
    * PC - Parry or Block ( Right )
    * PD - Parry or Block ( Right )
    * EA - Evade
    * EB - Evade
    * RA - Roll
    * ZA - Zap Magic ( Left )
    * ZB - Zap Magic ( Left )
    * ZC - Zap Magic ( Right )
    * ZD - Zap Magic ( Right )
    * WA - Sneak
    * WB - Walk
    * WC - Run
    * WD - Push
    * JA - Jump
    * JB - Falling ( End of Jump ) ( Dropped Item left )
    * JC - Falling [ Dropped item right ]
    * HA - Hit
    * HB - Hit
    * HC - Hit
    * HD - Hit
    * KA - Killed
    * KB - Killed
    * KC - Killed
    * KD - Killed
    * MA - Misc ( Drop Left Item )
    * MB - Misc ( Drop Right Item )
    * MC - Misc ( Cheer/Slam Left )
    * MD - Misc ( Show Off/Slam Right/Rise from ground )
    * ME - Misc ( Grab Item Left )
    * MF - Misc ( Grab Item Right )
    * MG - Misc ( Open Chest )
    * MH - Misc ( Sit )
    * MI - Misc ( Ride )
    * MJ - Misc ( Object Activated )
    * MK - Misc ( Snoozing )
    * ML - Misc ( Unlock )
    * MM - Misc ( Held Left )
    * MN - Misc ( Held Right )


Special Codes

Code: Select all

    * AL - Spawn an attack particle on the left weapon
    * DL - Drop the item in the left grip
    * GL - Grab an item with the left grip
    * CL - Grab a character with the left grip
    * AR - Spawn an attack particle on the right weapon
    * DR - Drop the item in the right grip
    * GR - Grab an item with the right grip
    * CR - Grab a character with the right grip
    * I - Make the character invincible
    * S - Stop the character from from accelerating
    * F - Play a footfall sound
    * P - Poof the character


The Quake Model Editor can be found in the modeler directory under Egoboo. Fire it up. A new model will be started by default. The screen will look something like this:

Image

There are four divisions of the screen. The upper right hand is the 3D view. The upper left is the top down view. The lower left is the front view. Finally, the lower right is the side view.

Along the bottom of the screen on the left you will see two mode buttons. They are ‘Vertex’ and ‘Face’. Vertex mode allows you to select and manipulate the points that your model is composed of. Face mode does the same with the flat surfaces on your model. Remember these modes, I will be talking about them later in the tutorial.

Beside the mode buttons are the windows that tell your cursor position. Above the mode buttons on the left hand side of the screen is the frame arrows. These will be used during the animation process to move between frames. Above that are the ‘fit all’ and ‘fit selected’ buttons. They let you fit your model in the view windows, just in case you move it off screen or something.

On the upper left you will see four tabs. When you click on these tabs you access different modes that you will use when modeling. From left to right they are; Create, Modify, Bones and View. Let’s talk a little about them.

Create:
Image

This is the tab you use to create the model.

The ‘Create Vertex’ button allows you to make a point in space, or a vertex. These vertices are what you build your model around.

The ‘Build Face’ button will allow you to draw lines between vertices to create triangles, the most basic of polygons. The triangles are also called faces. The entire model will be made up of nothing but triangles attached together.

The buttons that are grayed out are not implemented in this build of the Quake 2 Model Editor. They do nothing. Don't worry about them.

Modify:
Image

Here you select, move and generally modify the model. Move, Rotate and Scale do pretty much exactly what you would think. They manipulate the parts of the model that you have selected.

The X, Y and Z buttons allow you to lock down the various axes. This will prevent accidental manipulation in a direction you don’t want.

Weld selected will combine selected points. Be careful with this, I have screwed up many a model this way. Remember, there is no undo feature in the modeler.

Mirror will take the selected vertices or faces and mirror them. It’s usually smart to lock down the axes that you don’t want it mirrored along.

Del. Selected will delete what is selected.

Effect frame range will allow you to manipulate more than one frame at a time.


Bones:
Image
Bones were planned for the program but didn’t get implemented. Bones are an easy way to animate models by attaching parts of the model to a ‘skeleton’ and then just moving the skeleton.

There are many programs you can use that will allow you to animate with bones. They cost money though; we’re here because the Quake Modeler is free. Perhaps if you find you like modeling, you can pick up a professional grade modeler at some point in the future.

The only thing we will be using on this tab is the Align button. The align button will align new parts of the model to existing parts as they animate.

I will go into more detail on this later. It's kind of complicated.


View:
Image
This section makes it easier to figure out what’s going on with your model. First are the usual ‘select’, ‘move’, ‘rotate’ and ‘scale’ buttons. The buttons below are the ones we’re concerned with here.

Hide selected will hide the vertices or faces that are selected from view. You won’t be able to manipulate them while they are hidden. This is very useful for getting finished parts of the model out of the way.

Hide unselected does the same thing with everything that isn’t selected.

Unhide all will make everything you have hidden visible again.

The play camera button will play through your animations, so you can see what they look like. It will play through the animation frames that you have selected in the window below at the frame rate selected.

The ‘I’ button beside play cam allows you to interpolate the animations so they look smoother. It makes things look nicer, but it’s not how they’ll look in the game. I don’t recommend relying on it.

Look through the menus on top and check out the help file. I will cover the things in the menu as we use them. A lot of them should be familiar enough to you already from basic windows application that I don’t need to go over everything.

Also, there are keyboard shortcuts for a lot of things. Dig around and see what you can figure out for yourself. I’ll be going over what is needed as we create the actual model. Still, it doesn’t hurt to have a basic knowledge of what you could do. You may figure out a better way to do something that what I tell you. Don’t be afraid to experiment. Just make sure you save often.

Now, before we get started making models there are some things you should know. Egoboo models can’t have more than 128 vertices; so keep your models simple. Don’t try to detail every little nook and cranny of your model. A lot of detail can be added with the skin.

If you want your creature to be able to hold anything, you will have to add grips. Grips are special vertices that are added to the model last. It tells Egoboo where to place the weapons (or whatever is being held) and what the objects orientation is. If your creature isn’t going to hold anything, don’t worry about it.

If you are creating a weapon, the very last vertex will be the ‘spawnlast’ vertex. This is the point on the model that blood and other particle effects shoot from.

Plan your model ahead of time. Draw sketches of what it will look like. Know what animations you will need to create. I recommend reading through the models.txt file in your text directory of Egoboo. It contains a lot of useful information about the types of animations and other little bits of info.

Also, remember that you may need to make the AI scripts and sound effects for your creation somewhere down the road. I won’t be covering those in these tutorials, but they will need attention at some point.

Okay, so now you know the editor inside and out… well, at least you’re off to a good start. In the next tutorial, we’ll create a model.
Last edited by Zefz on Sat Mar 28, 2009 1:55 pm, edited 1 time in total.
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

Part 2
Let’s make ourselves a monster for Egoboo. Today we create the basic model. We will also eventually apply a skin to our model so it looks like the creature we are shooting for. I have decided to immortalize in Egoboo that most noble of animals, the Coconut Monkey.

Before we make our creation, we must gather reference material. I have in front of me a copy of PC Gamer magazine featuring pictures of our simian friend. You can also have sketches that you have drawn, photographs, a plastic figurine or anything at all. Make sure you have something to remind you of what you are aiming for though. It really does help.

Also, at some point in time you will have to make the skin image for your model. I went ahead and did this right off the bat for our coconut monkey. The skin will need to be in both bmp and pcx format. Egoboo uses bmp and the modeler uses pcx. The image will be a 256 color image which is 64 x 64 pixels in size. This may seem a little small and may change later in Egoboo’s development. Remember though, the creatures won’t be very large on the screen, so you don’t need a tremendous amount of resolution. If you want, you can prepare the image in a larger size and convert down for now.

Anyway, our coconut monkey skin image looks something like this:
Image

Notice that I have drawn only half of his face. Since our hard shelled yet milky centered friend is symmetrical, we can use the same texture for the left and right halves of his body.


But I’m getting ahead of myself. We haven’t even built the model yet.

Coconut Monkey doesn’t have many moving parts. In fact, he has none at all. But I’m going to go ahead and make his head move so that I can demonstrate animation in the next tutorial. To make things easier on animation, I will build the model in two parts. His head will be one part and his body, the other. You could call this a segmented approach to animation.



Enough planning, let’s get started:
    1. Fire up the modeler and go to the Create tab.
    2. Click on create vertex.
    3. Now left click in the top view window (upper left) to aim your cursor. Get it in about the center of the view window.
    4. Press ‘Enter’, you have just made your first point. This will be the very top of our monkey’s head.



You probably won’t be able to see your point very well. To make the points show up better, press ‘T’. The t stands for ‘ticks’. The ticks get in the way when you’re trying to just look at the model to see if it feels right, but they are very useful at this stage of development.


Coconut Monkey is fairly round; so let’s build his frame out of some circles laid flat. Sort of like a cylinder standing on end. Un-highlight the point that is already made by pressing the ‘/’ key. The slash key will undo any highlighting or selecting. Now, let’s make some more points. In the side view window, move the crosshairs down just a bit so we aren’t on the same plane as our previous vertex.


Now, in the top view draw 8 points in a rough circle around our center dot. It should look something like this:

Image


Let’s manipulate this circle a little bit, just in case it doesn’t look quite right to you. Click on the Modify tab. First, let’s move the circle up just a bit. The circle should still be selected, if not click select and then draw a box around the circle from the side. Make sure you don’t select the dot on the top of his head.

Now, click the move button. When you left click and drag on the window, the selected vertices move. If you want them to only move up and down, lock the X and Z axis. Then the points will only move along the Y axis.

If you want the circle to be bigger or smaller, select scale. Make sure you unlock both the X and Y axis if you had locked them in the last step. Click in the center of the circle in the top view and drag the mouse up and down. Observe how the circle grows and shrinks. Find a nice size and then let’s get on with the next step.

Let’s fill out his body some. While the circle is highlighted, click ‘copy selected’ from the edit menu (or just press ctrl-c). Now paste (ctrl-v) and select ‘append the vertices to the model’. The other choice replaces currently existing vertices, we don’t want to do that just now.


Move your new circle down a bit and scale it so that you start to form the shape of a coconut monkey (kind of a coconut shape with a slight dip in the center). Paste again and continue to position the circles. Do about 8 layers (plus the already existing point at the top of the head). Your monkey should look like this:

Image

While I’m thinking of it, press ‘G’ to get rid of that pesky reference grid in the upper right hand view screen. There are a lot of keyboard shortcuts that you can use to make your life easier. I’ll try to mention them as I think of them.

Now we have the basic shape that we will be using, but we still have to add polygons to flesh it out. First, make sure you are comfortable with camera controls.


Let’s get used to rotating the camera in the 3d view. Go into the 3d view area and hold down ‘Shift’ on your keyboard. While holding down shift, left click and drag in the window. You should see the model rotate. If you right click, you can zoom in and out. Oh, and if you hold down both mouse buttons you can change the parallax or depth of your view (I’m not sure how to explain it exactly, just try it and see). You can also move the model up and down and back and forth in the other three view windows. Position the model so that you can see the top of it’s head at a slight angle, like so:
Image


I have highlighted the three vertices that are closest to us in the above picture.


Now we are going to play connect the dots. Select the Create tab. Now, click on the ‘Build Face’ button. The important thing to remember when building a face is that it will only be visible when viewed from one direction. You must draw the face in a clockwise direction for them to be viewed from your perspective, counterclockwise from the opposite perspective.



Of the three dots I have highlighted, in the 3d view window click on the top one, then the lower right then the lower left. A triangle will be created. You can rotate the model and observe that it is not visible from the opposite direction if you like. Continue to build faces all the way around the top of our monkey’s head. Note that although I highlighted the vertices used in the first example, it is not necessary to highlight them to build the facet.



Continue to build triangle faces all the way around the coconut monkey. Move and rotate the model as needed to build the faces correctly.
Image


If you make a mistake, select face mode on the bottom. Then highlight the mistaken face and delete. Then just continue on your merry way. It is easy to make mistakes; sometimes the wrong pixel gets clicked on accidentally.


I made the head and body of the monkey separate, so they don’t have any connecting vertices. This will make it easier to animate later.


You may want to view your model in a mode other than wireframe. Try this: ctrl-2 = flat face mode, ctrl-3 = smooth shaded mode, ctrl-4 = texture mode (we don’t have a texture yet, so this one won’t do anything) and ctrl-1 will get you back to wireframe mode.


Here is a picture of our smooth shaded monkey with the ticks turned off (press ‘T’ to turn off the ticks):
Image

I intended to include the skinning section here, but it’s late as I’m writing this. I am going to get some sleep. It looks like part 3 of these tutorials will be about skinning.

Oh, and feel free to create a model other than coconut monkey. Just apply the same basic techniques. Remember to separate the different sections of the body so they can move independently of each other. Actually, you don’t HAVE to do the parts separately. The skin will deform and allow you to animate your model however you want. The segmented method I’m using makes things easier. Also, assuming you’re modeling for Egoboo, that seems to be the basic style the game uses.

Also, you can create furniture and other immovable objects too. You don’t even have to read the animation tutorial for that.
User avatar
Maxaxle
Darkshine Knight (Extremist fanatic)
Darkshine Knight (Extremist fanatic)
Posts: 4035
Joined: Fri Jul 25, 2008 8:16 pm
Location: San Diego, CA
Contact:

Post by Maxaxle »

Can you publish the Coconut Monkey? :)
"Failing to plan is planning to fail."
Bug me if you want to play a game.
User avatar
Zefz
Squirrel Knight (Administrator)
Squirrel Knight (Administrator)
Posts: 3820
Joined: Wed Jul 23, 2008 1:27 am
Location: Norway
Contact:

Post by Zefz »

I do not have it.
Cimeries
Lumberjack (Developer)
Lumberjack (Developer)
Posts: 7720
Joined: Wed Jul 23, 2008 6:56 am

Post by Cimeries »

I think I know where it is.
Be warned that it's made as a player model for Quake 2, so it's not compatible with Egoboo unless changes are made.
I'll post it when I can find it.
:wink:
Person
Acid Blob (New member)
Acid Blob (New member)
Posts: 11
Joined: Sat Nov 29, 2008 1:04 am

Post by Person »

Is it possible to use blender? It exports to .md2 in the export menu so will it work or will using it and exporting mess up the order of the vertices for the grips?
The truth has been vacuumed, thank you for your patience.
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Post by penguinflyer5234 »

Person wrote:Is it possible to use blender? It exports to .md2 in the export menu so will it work or will using it and exporting mess up the order of the vertices for the grips?


No one hasn't tried, to my knowledge. You can always test it though.
...
User avatar
PurpleSquerkle
Massive Gelfeet (Developer)
Massive Gelfeet (Developer)
Posts: 3176
Joined: Wed Jul 23, 2008 4:54 am
Location: Oakland, CA
Contact:

Post by PurpleSquerkle »

I always wanted to try, but I could never be troubled to learn to use it well (funny interface).
If I was more interested in modeling I might take the time, but....

Anyway, you should try.
User avatar
Agent of Dread
Protector (Senior Member)
Protector (Senior Member)
Posts: 8991
Joined: Wed Jul 23, 2008 8:46 pm
Location: Australia
Contact:

Post by Agent of Dread »

Yeah, Blender was a thought for me too, but it's very confusing.
- Linktree: linktr.ee/trilbs -
Person
Acid Blob (New member)
Acid Blob (New member)
Posts: 11
Joined: Sat Nov 29, 2008 1:04 am

Post by Person »

*is glad* Don't expect anything out of this though, I just want to make hacks for myself that may or may not be of any sort of quality.

*edit* looks like i can import the adventurer model with included textures without a hitch. The only problem I can foresee is learning grips....and maybe exporting it.
The truth has been vacuumed, thank you for your patience.
User avatar
PurpleSquerkle
Massive Gelfeet (Developer)
Massive Gelfeet (Developer)
Posts: 3176
Joined: Wed Jul 23, 2008 4:54 am
Location: Oakland, CA
Contact:

Post by PurpleSquerkle »

Oh, yeah. I've imported stuff before without problems, but it's exporting that's usually an issue, so....
User avatar
kettlechip
Chest Mimic (Community member)
Chest Mimic (Community member)
Posts: 208
Joined: Sun Nov 23, 2008 7:20 am

Post by kettlechip »

Where do I download the quake model editor?
BACK
User avatar
penguinflyer5234
Sheep (Developer)
Sheep (Developer)
Posts: 3025
Joined: Wed Jul 23, 2008 1:39 am
Location: Best Southwest

Post by penguinflyer5234 »

Download here. (From the Development page on the offical website)
...
User avatar
kettlechip
Chest Mimic (Community member)
Chest Mimic (Community member)
Posts: 208
Joined: Sun Nov 23, 2008 7:20 am

Post by kettlechip »

Could someone post a screenie/some help on making the vertices for the face, it is very confusing and the screens are all the same so they don't help a bit.
BACK
Dark
Tranch (Novice)
Tranch (Novice)
Posts: 148
Joined: Mon Mar 30, 2009 4:05 pm

Re: How to create a model using the Quake Model Editor

Post by Dark »

Managed to get Blender to export to md2.
I use version 2.60 with some exporting script I found: script.
For now I only prepared the model and UVs in Blender. Still used Quake Model Editor for animating and grips.
Who knows though. Maybe it would work to make the model fully in Blender. Havent tried.

I think the most confusing thing about Blender is that its very limited what you can do with GUI.
Blender forces user to use hotkeys (which you have to google).
Image
Post Reply