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

Members Online

»
0 Active | 178 Guests
Online:

LATEST FORUM THREADS

»
Mohaa maps on Cod2?
CoD2 MP Mapping
is this place alive?
CoDBO3 Mapping
Call of Duty: WWII
CoD WW2 General

Tutorials

»
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
Importing a model into Call of Duty
Versions: You must be logged in to view history.
 Importing a model into Call of Duty
From the Revolt team and Infinity Ward

 Importing a model into Call of Duty
From the Revolt team and Infinity Ward

1. First you need to open your model in Milk shape or 3d max 5 that has the exporter plug-in to export the .xmodel file type for the asset manager to be able to read it.

Note on scale: The CoD export tools use whatever scale you set in Max. It doesn't matter what Max units you use, as long as you use them properly. We use inches sometimes and cm sometimes. Our characters are about 6 feet (72 inches or 183 cm) takk, and all our props are built to scale.

a.) You need to have a material assigned to all meshes in order for the export to work correctly.
The texture (jpeg, tga or dds) needs to be in the same folder as the model will be exported to, inside your model_export folder. It also can't have the same name as any texture in the game/main/skins directory, which is where all skin textures are copied when converter is run.
I don't think you need to have shadername@ at the beginning if you don't want to - you'll just get a default shader type if you leave it off.

NOTE: The model export will export the first frame of your time segment in Max. The animation export will export whatever range you tell it to.


2. Export the model in .xmodel format to callofduty/tools/model_export
Also save all of your material (textures that your model is dependant) in the model_export also. The materials have to have the same name as they were called in max or Milkshape. Note: Milk shape does not allow you to use .dds files, just convert to bmp while assigning them in MS. Resave them as .dds and save them along with your exported model in the callofduty/tools/model_export folder. MS3D 1.7 or higher supports dds, so you can just use the .dds file instead of making a conversion.

- Example file for new texture: metal@ak47.dds


3. Next you run the asset manager put in the name you want then scroll down to xmodel and hit new entry. You can add your model to the existing xmoldel.gdt file where the example files also exist. This will help you reference the examples IW provided with the tools.

NOTE: For LOD models: These are level of detail meshes. They are lower poly models that are activated at the given distance you specify and increase performance. They will need a separate export from max or ms with another descriptive name. A good way to make LOD’s is to use multires modifier on your high detail model to delete and merge polygons ultimately reduces the quality of the model.
NOTE: Asset manager is a little tricky at first. It opens .gdt files. Each gdt file can hold information about a lot of different types of assets (eg models, animations, weapons) but we generally keep one type of asset in each gdt. So say you open your model gdt file. In the top-left list, pick xmodel. This makes Asset Manager show you all the xmodels in that gdt file. Now you can go ahead and create a new entry, or modify an existing one.

4. Then in the type, you put viewmodel and browse and find the .xmodel file you saved in models export

NOTE: You don't need to add lods or mess with the numbers for lods. The model will work just fine without them. Also, leave the model type as "rigid" unless you want it to animate.


5. Then save the .gdt file in your model_export folder.

6. Next run the converter.exe from your callofdutytoolsbin folder. This will distribute the correct files for the in game readable format.

NOTE: The compiled model file, plus all the textures associated with it, are put in the xmodel and skins directories. You should never modify any files in those directories (or the xanim directory). Also, since there is no folder structure in those directories, you cannot have any two models, animations or skins in the game with the same name. Converter will give you an error if that is that case. One exception is when models share a texture. In that case, the texture needs to be in both models' folders inside model_export, and it needs to be identical in both. If it is different, once again converter will give you an error.

Also, converter uses date checking, so if you did something weird with dates like copying an old copy of the file over a new copy, it can get confused. If you think that converter is getting confused and not converting a file that you've changed, you can do two things. You can delete that file from xmodel, xanim or skins (this is an exception to my rule of never modifying these folders), you can delete the entire xmodel, xanim or skins folder, or you can run converter with the command-line switch "-clean all", which forces it to reconvert everything.

7. Now goto callofduty/tools/game/main/xmodel

NOTE: Whatever name you give the entry in asset manager is what the entry in the xmodel folder will be.


8. Now open pakscape.exe (Always back up files your are going to change. I suggest backing up all your paks in callofduty/main unless you want to reinstall.)

9. Now open yourpack.pk3
-Goto the xmodel and import the viewmodel_whatever from the callofduty/tools/game/main/xmodel folder into the folder called xmodel in the pak.

NOTE from IW Animator: I haven't dealt much with the pak files, but I don't think you have to change the pak files that ship with the game. You should be able to create a new pak file - call it Fred, or the name of your mod, or your name, anything but pakx.pak3 - and put your stuff in there. The contents of the new pak file should overrule the contents of the original pak file, and your mod should work.

Note from IW Mapper/Scripter: Actually, modifying the existing pak files that ship with the game is a bad idea. This will make your version of the game impure and cause you to be unable to play on most multiplayer servers. For mods to work without breaking the existing game, you should create a mod folder inside the Call of Duty folder. For example, if you created the “mymod” folder and put your mod pak files in there, in multiplayer you would notice when you select the mods option “mymod” shows up. Whenever you load your mod, the game will now use your pak files in addition to the pak files in “main”. Given this structure you can now override any file in any pak file in “main” by including a modified version of it in one of your mod pak files.

10. Next Import the file called 2 from the callofduty/tools/games/main/xmodelparts into the folder called xmodelparts in the pak. (IW, please tell how to change the declaration for these files so they do not use just a numeric value)

NOTE: When you create an xmodel entry in asset_manager and run converter, a .xmodel file will be created in the xmodel folder and additional files will be created in the xmodelparts and xmodelsurfs folders. The parts and surfs files contain model data referenced by the .xmodel file. The files in all 3 folders are necessary for any given model and should be included when you make pak files for your mod.

NOTE from Spaid: To get a descriptive name for you xmodel surfs and xmodel parts files you will need to have the exported model and skins in a directory of it’s name under the xmodel_export folder. We found this out when we were getting files with just a numeric value such as 1 in those folders. By putting the files in a folder called ak47 under the root xmodel_export folder it made a prefix called ak47 so the result was ak471.

11. Save the pak.

12. Test in the game.


Note from Spaid: If you are looking to get other model type’s in such as props for maps and radiant, just follow this procedure and declare the mod path for the new xmodels to be read from in Radiant. As long as you have the model packed correctly you will be able to get them in with no hassles. Mod on!

spaid

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

»