First of all, thanks to Mike Bristol for making the compiler, it makes everything so much easier. This tutorial is dedicated to Frankie, tpe and all the other LightWave users.The first part covers the basics of loading and exporting an old MD3 into a LWO file.
The second part tells how the model should be set up for exporting.
The third part is how to compile a single framed LWO file into an MD3.
The fourth part is for making animations, tags and multiple mesh's.The compiler version I use in this tut is 0.05.02, get it here
[In Modeler] Make sure the loadquakemd plug-in is is loaded and run it. Load up your md3, and save it as a LWO file.
HOW:
Click Modeler>Plug-ins>Add Plug-ins... then browse to C:\unzipped\lwotomd3\ (or where ever you unzipped the compiler) and select loadquakemd.p
Run it by selecting File>Load Object..., selecting All Files from the pull-down menu at the bottom of the pop-up box, and then browsing to an MD3 and opening it. Choose a frame and hit OK. Now you should have the model in view. Select File>Save or hit s to save as a LWO.
Part 2: Getting the model ready
[In Modeler] Below are the general steps I use to prepare my models:
First, you should have the model split up into three files (layers might work too). One for the head, one for the upper, and one for the lower.
Second, in each file, divide the model up into seperate 'meshes' using the Unweld (CTRL+U) command. These are split up according to which need to be uncontinous (i.e. the UVmap of a bottom of a can would need to be seperate from the UVmap of the sides; so the adjoining points would be unwelded on the model).
Third, decide what meshes will be part of what 'pieces' in the MD3
EXAMPLE: I pulled up Doom's helmet in Npherno's MD3 Complier. It consists of three 'pieces': h_helmet, h_visor and tag_head. Each piece gets it's image linked in it's Q3A config file.
Fourth, based upon your decision, seperately select each piece-to-be and create a UVmap for it. If you want two pieces in the MD3 (excluding the tags) you would create two UVmaps, etc...
EXAMPLE: Here's a rocket box: pic And here are it's 3 UVmaps: 1, 2, 3. All of which share the same image.
Fifth (optional), make the polys of each UVmap a seperate Surface. That way you're sure in which piece each poly is going.
Sixth, I create tags (single-sided-right-triangle-polygons) polys and put them in their respective places. Every tag has it's own Surface. The head tag's Surface would be named tag_head, the weapon tag's Surface would be named tag_weapon and so on and so forth.
Whew! That's it, now you move on to Part 3 or Part 4, depending on what you are making.
Part 3: Single MD3's
[In Notepad] Create a CFG file for your model and paste this code into it. Replace everything with your own LWO file properties and save as yourmodelsname.cfg in the same directory as LWOtoMD3.exe.
HOW:
CFG files are text documents, all you have to do is create one and put a CFG extension on the end instead of TXT.CODE DESCRIPTION:
MD3
name is the name of the file that the compiler saves the file as.
filedir is where you have the LWO files that the compiler uses.
MESH
name is the name of the 'piece' in the to-be-created MD3 file. To change the name of the piece in the MD3 file, use Npherno's MD3 Compiler or just recompile it with LWOtoMD3.
images is the information about the path that Q3A needs to put the skin on the model.
txuv is the UVmap name.FILELIST
single is the name of your LWO file.
[In the Run command] Execute LWOtoMD3 and build your MD3HOW:Ignore any message it spits out about "surfaces and uv maps are bad" - Mike said he screwed up a check in the code.
Select from the taskbar menu Start > Run... > Browse and then find and double-click on LWOtoMD3.exe. After LWOtoMD3.exe type in a [space] and yourmodelsname.cfg and press [enter]The MD3 should appear in the LWOtoMD3 directory. Check with Windows Explorer and see. Next open it up in an MD3 viewer. I find Qview to be quite good in it being fast and simple. But Npherno's MD3 Viewer is better imho.
[In Layout] Use the SaveMorph plug-in to write each frame of your animated model (upper and lower separetly) in a seperate LWO file. I would recommend using a seperate folder for these from the files you are working with as they tend to pile up.
HOW:[In Notepad] Create three CFG files for your model and paste this in one and this in the other (for the head, since it has no anims, you would use the same CFG type as the one in Part 2 with a TAG array). Replace everything with your own LWO file properties and save as yourmodelsname_bodypart.cfg in the same directory as LWOtoMD3.exe.
SaveMorph is located in the Object Properties panel, press p to open it with your object selected. Go to the Deformations tab and add SafeMorph. Open the plug-in, enable it, point it to where you want it to go, type 4 in for the number of digits, and select World Coordinates. Press OK, make sure it's on and then select Make Preview from the pull-down list in the bottom right corner.Note: SafeMorph aparently is not included with LW6.5. To add it browse to the folder Old Plugins after clicking Add Plugins, it may not work though. Another thing I've heard you can use is Project:Messiah or Layout>Save>As Transformed Object
HOW:
CFG files are text documents, all you have to do is create one and put a CFG extension on the end instead of TXT.CODE DESCRIPTION:
MD3
name is the name of the file that the compiler saves the file as.
filedir is where you have the LWO files that the compiler uses.
MESH
Note: for multiple meshes create a MESH array for each.
name is the name of the 'piece' in the to-be-created MD3 file. To change the name of the piece in the MD3 file, use Npherno's MD3 Compiler or just recompile it with LWOtoMD3.
images this is not needed for a player model since it uses a Q3A cfg.
txuv is the UVmap name. Obviously, it contains the UV coordinates. It also shows which polys go with the associated mesh name in the MD3 file.TAG
name is the name of the tag in the LWO file. To put a tag in LW copy in q3_tag.lwo from the LWOtoMD3 dir into Modeler and change the Surface name.FILELIST
base is the name of your LWO file that the compiler uses to write the UVmap and to check all the other files to make sure they have the same amount of polys, etc.
range is used to define the base name (U_death1_0000.lwo in the case of Nec_upper.cfg),
the starting file (0 would be U_death1_0000, 5 would be U_death1_0005),
and the number of frames to compile (remember if 0 is a frame and you have up to frame 29, you would put 30 frames)
[In the Run command] Execute LWOtoMD3 twice and build your MD3'sHOW:Ignore any message it spits out about "surfaces and uv maps are bad" - Mike said he screwed up a check in the code.
Select from the taskbar menu Start > Run... > Browse and then find and double-click on LWOtoMD3.exe. After LWOtoMD3.exe type in a [space] and yourmodelsname_bodypart.cfg and press [enter]The MD3's should appear in the LWOtoMD3 directory. Check with Windows Explorer and see. Next open them up in an MD3 viewer. I find Qview to be quite good in it being fast and simple. But Npherno's MD3 Viewer is better imho.
For alot more information, read the three readmes that come with the compiler. I also included a 2 more CFGs just for reference: health_vial.cfg & bullet_bag.cfg
Created on 12-20-2000
Updated on 5-27-2001
by BlazeQ