|
|
Static Models
Getting a static model (like a trash can or a shrubery) in to the game
is really easy. Doom 3 reads lwo (lightwave) and ase (3dsmax) files
natively so you simply save out the model in one of those two formats
and you can use it in the game.
The material that is used in game is the diffuse texture specified in the model. The relative material name is determined by searching for "base" in the texture path. For example, if the texture specified in the .ase is "C:\Doom\base\textures\base_trim\red1.tga" Then it would use the material named "textures\base_trim\red1" If you are running a custom mod, then it will look for the mod name if it can't find "base" so "C:\Doom\jailbreak\textures\base_trim\red1.tga" would also work in the jailbreak mod. The path cannot have spaces in it. Doom 3 should be installed in "C:\Doom\" or some other place without spaces. If Doom 3 is in the default location of "C:\Program Files\Doom 3\" it will not work because of the space in "Program Files" and the space in "Doom 3" Generally speaking, as long as you keep all your assets in the final directory that it will be in, then you should just be able to use it in game without having to touch anything. Problems tend to arise if you edit your assets in one directory, then move them in to the base directory or your mod directory after you export.
If you are working on a new chair, you should work
on it in Spaces in file names are bad. For more information on exporting from 3dstudio max, click here Animated Models
Animated models are quite a bit more complex. The only animation system supported in
Doom 3 is skeletal (no vertex animation like in Quake), and the only file format supported
is .mb (Maya binary). The files have to be processed using a built in tool to convert
the Maya files to .md5mesh and .md5anim files.
Note for 3dstudio max: Although Doom3 does not support animated models from max "out of the box", the people over at Doom3World wrote some nice importers and exporters, which you can find here. This built in tool is 'exportModels'. By default, it will export any models that have been modified since the last time the command was run, but you can pass it a .def file and it will only export the models defined in that def file. You can speed up the exportModels command by using the 'g_exportMask' cvar and specifying some magic string after the export declaration (as we will see later). Setting "g_exportMask fred" will only export fred's animations, skipping all the others. You must have Maya installed on the machine that you are exporting on otherwise it won't do anything. The syntax for an export section looks complex at first, but is actually quite simple when you break it down into the different parts. Unlike some other declarations, the commands in an export block are executed as they are encountered. This means the order DOES matter. There are two systems at work when you export a file. The first is the actual exporter, this is the piece that does all the work. The second is what I'm going to call the 'parser'. This piece reads the export sections and passes the commands to the exporter for actual exportation. The parser only has 5 commands, and they are really very simple:
Here is a list of all the options along with a brief description of what they do:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 2004 id software |