This is a converter that converts .obj files to xmodel files. For use with Call of Duty 4 and Call of Duty World at War mapping.
Tool created by Brandon "Silicone_Milk" Haston. Mirrored here for archival purposes. Its source code is located here.
----------------------------The Obj to Xmodel_Export Converter-----------------------------
----------------------------------------README---------------------------------------------
TOXEC (The Obj to Xmodel_Export Converter) is a utility written by Brandon "Silicone_Milk" Haston to convert models from the .obj file format to Call of Duty 4's .xmodel_export format.
The tool supports exporting of mesh data, normals, and UV coordinates. A later version may include support for bones and animation.
By using this tool you have agreed that you are using this tool as-is and at your own risk. The author is in no way responsible for any odd behavior that your computer may exhibit (just covering my own ass here).
-------------------------------------------------------------------------------------------
ON TO HOW TO USE TOXEC!
TOXEC is a command-line utility. This means there's no buttons to click. Yes, you'll have to type a line.
To use TOXEC you must first have a properly prepped model.
This means that you must have a model with unwrapped UVs and normals facing to the INSIDE (this is a bug where TOXEC flips the normals. It will appear right in-game).
Once you have a .obj file ready to go, copy TOXEC to the folder containing the .obj file.
Double click TOXEC and you will be prompted for the name of the file.
Enter the FULL name (including extension). Failure to do so will confuse TOXEC and it will hang until you close it.
For instance, to convert chinese_lantern.obj I would enter "chinese_lantern.obj" (without quotes) and TOXEC will take care of the rest.
You should now have a file called filename.xmodel_export (where filename is the name of the .obj file). Good! You're done. Now you can use Infinity Ward's Asset Manager to load the model into the game.
*It should be noted that after the conversion process, to get the textures to wrap properly on to the model you will need to FLIP THE TEXTURE TO BE USED VERTICALLY before loading it in to Asset Manager.
-------------------------------------------------------------------------------------------
-----------------------------------KNOWN BUGS----------------------------------------------
- Lack of animation/skeleton support
- When you make the UV map for the model, you will have to vertically flip the texture to make it wrap properly ingame.
- When entering the name of the .obj file to be converted, if the filename doesn't end with .obj the program will freeze itself.