This page is written and copyrighted by by Steve Tietze and is reproduced with permission. It was orignally published by Aftershock.
There are a few files needed to take your alias (.tri) model into quake. I will explain each step for the process of bring your model to life.
First of all you have to have a 3d model. Things to keep in mind tho is that the model can only have triangle polygons, Surface faces must be pointing the right way or u will not get a surface on your object. I would say stay within the range of 250-300 polygons for your character or you will probably see a massive slow down in the engine. Its best to start models from scratch.
I have found that making characters with lots of polygons and then trying to rely on a polygon reduction method does not work at all. Keep in mind that your model scale should be in meters for best results. Here is what I do.. after I have the model saved I bring it into a program called Interchange y Senders which will convert about any object format to alias .tri format which is what you need in order to get them into quake currently. Once you have converted your object into alias .tri format you are ready to make the skin for the object.
Here is where u use the first of the Quake utilities called texmake. Texmake takes your object and created a outline skin which you then bring into a paint package and create the texture for your object. Very simple and straight forward. If your skin isn't showing up make sure your scale of your object is in meters. That's one major problem that I ran into and took me a while to figure out. Texmake has very simple command parameters.
E.g. to make our human.tri object skin simply do:
texmake human.trithis will make a .lbm file called human.lbm for you to edit in a paint package. For best results use either pc version of deluxe paint or deluxe animation. A thing to keep note of when you run texmake is the scale size of the object that is recognizes. You will use this number later.
Next step is to create a .qc (quake c) file for your model. Quake C has several uses. For this exercise we are just going to go over the simple version of it to bring in a character into quake. For all purposes we are going to replace the armor icon in the game. The reason I use the armor icon is it set up to rotate on its access which will give you a great spinning view of your object.
QUAKE C EXAMPLE FOR ARMOR:
$modelname armor $cd /evil/models/armor $flags 8 //client side rotate $origin 0 0 8 $scale 4 $base base $skin skin $frame armorThis is a very simple quake c source file for your model. Let me explain a few of the lines of this file.
$modelname <name>The name you want your object to be called once you bring it though the modelgen code.
$cd <dir>Directory where your model is located.
$flags <rotation>Rotation of the object.
$orgin 0 0 8Location of the object from the bounding box in the quake editor.
$scale < # >This comes from the texmake number that is generated you can use different values if you want.
$base <object>Base object name kinda like a starting position of the object before animating it.
$skin <skin name>The output file that you touched up from texmake for your object. $frame <frames> here is where you load in several frames of the object for animation. example would be . $frame walk1 walk2 walk3 walk4 etc.. That is the basic for an object in order to have it animate you will need to add some c code after the $frames that tell your object how to act. I will get into that more on another file this is just to get your object into quake for the moment. You can take all these principles that I have explained to get your objects into quake.
Once you have completed your quake c file its time to run it though model gen. Save the quake c file as armor.qc. Next step is to make 2 copies of your object. Name your object base.tri and armor.tri The reason for this is that when your run the model gen it will look for base from the $base base file and armor from the first frame of the armor in $frame armor.
Once you have completed make sure that all these files are in one directory:
base.tri armor.tri skin.lbm armor.qcThen simply run modelgen armor.qc which will then create a armor.mdl file which quake reads when running the game.
If you have done everything right you should now see a armor.mdl file in the same directory.
Now the fun part. Lets replace the your object with the armor icon in the game.
There are a few things u need to know before you do this. In the quake dir create a dir structure like id1. Here is a break down of what you will need to make maps gfx and models. Create these directors:
copy your armor.mdl file into test/progs dir. Then run quake with these command parameters.
quake -game testThis will bring you into quake and it should replace all the armor icons with your object icon.
THINGS TO KEEP IN MIND:
If texmake or modelgen doesn't seem to work or hang then there is a problem with your object. There are several reasons for this: