Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 12 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Tutorials

»
SOF2 Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Model Conversions
Versions: You must be logged in to view history.
Converting a model to SOF2 Format using Milkshape 3D.
Converting a model to SOF2 Format using Milkshape 3D, by Shoot

Thanks to Shoot for the work put into this tutorial.

This tutorial will cover converting various gametypes models to be able to use them in SOF2. Just not here - there will be other model types that you may not be able to get into SOF2 - either due to the original format or the size/poly count of the model. This method will definetly work with Q3,Q2,Q1,JKII,RTCW, and some halflife formats. It will not however work with SOF1. Just a note about older model formats - You may be disappointed with the graphic quality of them or the complexity of the models - just remember that the SOF2 engine is newer.

Ok you have an idea for a new map and you need a model that doenst exist in the stock models for SOF2 from Raven. Your stuck.....No your not. There are plenty of sites out there that have other models from other games that can be converted to be able to use them in sof2.
Here are just a few sources where you can get these models from.
The best place to find models......
You also need Milkshape 3D - you can get a 30 day demo and try it out, I suggest that if your serious about doing this and serious about mapping - buy it. It's o­nly 25$ and well worth because of what it can do for you. Yes there are much larger more functional 3D Modeling programs out there (3D Max Studios) but at a price tag of 2500$ you do the math.

Milkshape 3D
A major important note here before I continue......When done with this process - give credit where credit is due - be sure to give credit to the original model creator - be sure to include any readme that the original creator wished to include and o­nce again give credit. As a creative artist as you are - after all that is what mapping/modeling is...you want credit for your work...so does the original creator.

For the purpose of this tutorial we will use a model from the game that way you all will have its original model file and textures already.

Ok you got your model and its textures (I hope) what now....

1. Create a folder o­n your desktop for your new model - this is just to keep it away from everything else - this is optional but heavily suggested. Place the original model file you got and its textures as well. Place any readme documents so you can keep track of them so you can easily give credit for the model in you map release.

2. Open Milkshape and select import from the File menu. Select your model. In this case it is yugo.md3


It should look like this when its finished importing.


3. Save this model in the milkshape format.
Save it under a different name if you wish - better to use a different name if it is a new version of an already existing model (Raven SOF2 Model) do they don't conflict.

4. Materials Setup
Now its time to setup the materials for the model. Each model has at least 1 material. This material is the models texture or skin. Skins are UV Mapped when the model is created - What is UV Mapping - well probably something you don't want to tackle right away but here is a definition.
-------------------------
UV mapping is a method of applying complex textures to 3D models. The UV mapping method assigns corresponding UV coordinates to each XY vertex coordinate in the model geometry. In other words each part of the texture has a specific location o­n the 3D model to which it will be attached.
-------------------------

I recommend that you look at each texture that is used to skin your model. Look at what parts may be included in which image - this will give you a clue as to what material gets applied to what model group. Also I recommed that unless there are transparent images in the model such as glass or some other object that you convert the skin/texture files to jpg's to save o­n size and loading time in the game. A lot of models are TGA from other games and you really dont need that.

Now lets define materials......Select the Materials tab from the ToolBox - this is o­n the right by default but can be user defined as to where it is. It looks like this.


Choose the new button o­n the lower left part of the Materials toolbox


Be sure the materials01 is highlighted in the upper toolbox/materials tab and select the upper left button shown in the image below. This is where you will tell what skin/texture to use for this material. After clicking o­n the button a file explorer window will appear and you should select the folder you have the model you wish to convert in and select the first skin/texture for the material. In this case it will be yugo.jpg


If you have done this correctly the toolbox/materials tab will look like this image now.
Notice the circle - this is a small representation of which texture you have - not sure why its a sphere but it is.


Repeat the same process for each skin/texture so there is a material for each o­ne. For this example there should be o­nly the 1 material.
material01 - yugo.jpg

5. Assigning Materials to Mesh Groups in the Model.
>From the toolbox select the groups tab. Each group represents a specific part of the model or serves to break the model up a bit as far as polys and verts.


Highlight the mesh group you wish to texture - in this case we will select the "yugo" group. Click o­n the group and press the select button in the lower part of the toolbox window.

The window should now look like this - the wireframe windows to the left of the toolbox should now have part of the model selected - in this case it should be the body of the car. The body of the car should be in red lines - this means its selected and the tires should be white. If you see the entire model as white - right click o­n the 3D window and be sure the textured option is checked - it may be o­n smooth shaded by default.


Once this is selected you need to assign a material to it. With the body of the car selected choose the materials tab again. Highlight the material you wish to use - For the yugo body use material01. With the material selected choose assign in the toolbox window.


Upon assigning the material to the group you will notice in the 3D window to the far left that the model's body is now textured.


Go back to the group window and with the yugo group selected in the toolbox window - press select again to deselect the yugo model body.
Now to texture the tires.

You can do each group 1 at a time - this is important to do if each group has a different texture. In this case there is o­nly 1 model skin. So you can select all the model's groups together and assign them at the same time. For this particular model that could have been done - assign them all at o­nce but for the purpose of demonstration I had you do each seperately.

Now your window should look like this with the car completely textured and all your mesh groups should have a material associted with them.


Now what..... Save your model and move o­n....

6. Generating the QC Control file.
Select Tools
Select Quake III Arena
Select Generate Control File


This will bring up the save as window - be sure it is in the same folder as your model and it textures and save it under the same name as your new model. For this it is yugotest.qc


Just a note - in order to view this file you will need to associate the yugotest.qc file with a program such as notepad or editpad depending upon the scripting program you use. I do not recommend using Word Processesing software for this as there is hidden formating characters used in them. I personally use Editpad Lite because it is made to do this and has a lot more functionality coding wise than notepad. You can get it from this link.
Editpad Lite

This file should then open with the following code in it - we will have to edit this to be able to export the model as a md3.

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

// you can have o­ne or no parent tag

// tags

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

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

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

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

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

Ok first you will need to change the following line of code.
$model "models/players/model/model.md3"
Change it to reflect the path you will put your model in in the game - not this is not the folder you are working in o­n your desktop. I typically use a path of models/custom/modelname or models/mapname/modelname its all a personal preference. For this your finished code line should be:
$model "models/custom/yugotest.md3"

Now we need to tell it that there is no animtion for this model and you need to change the following line of code.
$frames 1 30 to read $frames 1 1
This is telling it that there is o­nly 1 frame out of 1 being used.

Now we need to define what textures to use with what meshes - why the generation program doesnt do this automatically because you already have done this in Milkshape is beyond me - its just the way it is.
Ok the 1st mesh - the body of the car....
$mesh "yugo"
$skin "models/players/model/skin.tga"
$flags 0

You will need to change the skin path to reflect where it will be in the pk3. Its the same path as the model in the $model line.
The line will look like this. Do not change the $flags - I am not really sure what it does so just leave it as it is.

$mesh "yugo"
$skin "models/custom/yugo.jpg"
$flags 0

Repeat this for each mesh and enter the path for the appropriate skin. For this model they are all the same.

Here is the finished code for the yugotest.qc file. Save it and close your editor and move o­n to compiling your md3.

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

// you can have o­ne or no parent tag

// tags

// meshes (surfaces)
$mesh "yugo"
$skin "models/custom/yugo.jpg"
$flags 0

$mesh "tire1"
$skin "models/custom/yugo.jpg"
$flags 0

$mesh "tire3"
$skin "models/custom/yugo.jpg"
$flags 0

$mesh "tire2"
$skin "models/custom/yugo.jpg"
$flags 0

$mesh "tire4"
$skin "models/custom/yugo.jpg"
$flags 0

7. Compiling or Exporting your converted model as a md3.
Now with the control file generated you are ready to export or compile you model.
Select File
Select Export
Select Quake III Arena MD3...


It will pop up the save as window and just enter the converted models name - the same o­ne you used o­n the $models line.
The folder is the same o­ne you have been working in - we will have to create the folders for the game later.


You now have a model.

8. Model Shader creation.
There it is - that word that so many ppl disdain....SHADER. Its not that bad - Each model must have a shader file to work correctly - even if the game engine doesnt execute all the shader information it has to be there. Ok lets make a shader. How?
Well first off the easiest way is to look at a models shader - for this it is easy ...the original yugo shader. Its in the common_models.shader file. Here is the part for the yugo.

models/objects/common/yugo
{
q3map_material HollowMetal
q3map_nolightmap
q3map_onlyvertexlighting
{
map models/objects/common/yugo
rgbGen lightingDiffuse
}
{
map models/objects/common/yugo_light
blendFunc GL_ONE GL_ONE
rgbGen lightingDiffuse
}
}

Well you create a new text file and copy this to it and change some paths and you have your shader. Simple but lets talk a bit about what is going o­n in there.

First you will need to change the models path - to reflect the new name and path
Old...models/objects/common/yugo
New...models/custom/yugotest

Leave the q3map_ code lines alone - as for the q3map_material line - it is'nt really relevant because models are'nt solid in SOF2mp anyway.
Now for the texture part

{
map models/objects/common/yugo
rgbGen lightingDiffuse
}

Change this to reflect the path of the yugo.jpg skin for the model.

{
map models/custom/yugo
rgbGen lightingDiffuse
}

Now your saying what is the other o­ne and why didnt I have to apply it in the materials of the model - well its the headlights of the model and tailights and it is all done with the shader - it is going to apply that graphic yugo_light to the skin texture and give the model lights. But you still need to change the path.

{
map models/objects/common/yugo_light
blendFunc GL_ONE GL_ONE
rgbGen lightingDiffuse
}

The completed shader will look like this....

models/custom/yugotest
{
q3map_material HollowMetal
q3map_nolightmap
q3map_onlyvertexlighting
{
map models/custom/yugo
rgbGen lightingDiffuse
}
{
map models/custom/yugo_light
blendFunc GL_ONE GL_ONE
rgbGen lightingDiffuse
}
}

Save it and lets get to using this model.

9. Using your converted creation.
You will need to add the model and skins to your sdk folder in the same folder as you set it up to be in in the qc file and the shader file.
So go to base/models folder.
Create a custom folder unless it is already there and add the following files to it.

yugotest.md3
yugo.jpg
yugo_light.jpg

Add the yugotest.shader to the shaders folder and have at it.

Just be sure to include the files in your pk3 when you release your map because the model is now custom and no o­ne else will have it.
And be sure to give credit....you have just a taste of what it takes to create a model....give credit where credit is due.

There is a ton of possiblities out there so go out and find some new things for maps - anything is possible. Look at other games, search the net for a specific object - they are out there in some shape or form. The o­nly limitation I have run across and you will too is too complex. If milkshape can't open it up - just imagine how visibly slow it will be in your map. It's a limitation of the SOF2/Q3 engine and you should look at something else. This is my opionion but you will find it to be true. Can't wait for Doom 3 Engine or a Quake 4 engine to be able to take advantage of some of the really killer models that are out there. Well have fun.

Shoot...out

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»