CLINTON'S
Lightwave 3D Plugins
home      
Doom3 Import/Export(May 19 2007) 
zfat in lightwave
zfat meshes with animated skeleton applied to fatmesh
  The doom3MD5 is a collection of 5 Lightwave 3D plugins that will import and export Doom3 md5mesh and md5anim files.  It will save and load mesh, skeleton and animation data.  The picture above isn't sideways, the md5 files load with the object laying on it's front because doom3 is a Z up world and Lightwave is a Y up world.  These plugins should also work with the Quake 4 game engine.
  Click the link or icon to get the plugin.(maybe right click and save as...)
  c source code is available at the bottom of the page.  My md5mesh import attempt is also available in lscript form.
  use these plugins at your own risk
   
Notes: max limits: 192 joints(bones), 24 meshes, 8092 each of weights, vertices, triangles and uv's per mesh
  each layer will become a doom3 mesh mesh names will be taken from the layer names, except were there is only a single layer  then name will come from model
  Doom3 and Lightwave orientations are different. A character is created facing in -Y direction, with the top of the character in +Z and the X values mirrored.  Left and Right sides are opposite.  It may be possible to create and animate a custom character in Lightwave orientation and then fix it later in the doom editor.
  The plugin file contains 5 plugins: MD5_MeshSave, MD5_BoneLoad, MD5_AnimLoad, MD5_MeshLoad and MD5_AnimSave.
  Animation will load starting at the current frame and if the frame rate in lightwave doesn't match the md5anim frame rate there is an option to set lightwave to match it.
  The animation preview range determines the animation frames that will be exported.
  remove any skelegons before export
  weightmap names must match the bone names and all deformations must be weight only based.
  Mesh export is slow and can take up to 1 minute with very little feedback.  All meshes must be triangulated.
   
Loading the Doom3 files
start in modeler
use the file menu to load in an md5mesh file
after the mesh is loaded the surfaces need to be assigned
w - to open statistics, select polygon mode
select the polygons of a surface
q - to assign the surface - choose the same surface name
deselect the polygons
select the polygons of the next surface and repeat until all the surfaces have been assigned
save as a lightwave object
load the object into layout
be sure autokey is on
select the mesh and run "MD5_BoneLoad" to load the bones
select all the bones and rest them, r
  to load animation select one of the bones or a mesh with bones and run "MD5_AnimLoad"
Notes:  
The md5mesh loader will create a layer with skelegons, but they won't be oriented in the correct direction.
Each mesh in the md5mesh file will have it's own surface and UV map.
Surface names are the mesh name plus "S".
UV names are the mesh name plus "UV".
The md5mesh must be loaded into modeller so that surfaces can be assigned.
The MD5_BoneLoad will load the doom3 skeleton into the selected object.
If no object is selected or the selected object is not a mesh then a NULL will be added to build on top of.
Autokey must be on(the plugin may do this automatically).
If the skeleton is built on a NULL it will look big with small bones.
The MD5_AnimLoad will load doom3 animations.
Select the mesh or one of it's bones before import.
If a bone is not selected then a build NULL will be created to build the skeleton.
If a bone with the same name as the animation bone is not found it will be created.
Autokey must be on.
April 15 2007 can load more than one animation.  Will start at current time.
I don't believe you can have more than one skeleton in the scene during the animation load.
April 29 2007 object or bone selected then new bones only created if needed, if light, camera or nothing selected then build Null is added and a new skeleton built on it
  The MD5_MeshSave will save an md5mesh file.   There is nothing to select since the scene is searched to get all meshes.  Only first skeleton in the scene will export.  The first skeleton found will be used for all meshes.  The vertex weights will automatically be normalized in the export file.
  The MD5_AnimSave will save an md5anim file.  Select the mesh or one of it's bones before export.  The animation preview range determines the time period that will be exported.  
Doom3 models can be found in "c:\program files\doom 3\base\pak002.pk4"

Rename the file from "pak002.pk4" to "pak002.pk4.zip"

Now the file can be opened as a normal zip file - extract the mesh and texture files
the fat man is located in the zip file under
models/md5/monsters/zfat/zfat.md5mesh

the tga texture files are found in
models/monsters/zombie/fatty/

fatty_d is diffuse color
fatty_s is specular
fatty_local is the normal map
fatty_h heightmap? bumpmap?
Quake 4 models can be found in "c:\program files\id Software\Quake 4\q4base\pak003.pk4
and in "c:\program files\id Software\Quake 4\q4base\pak007.pk4
Doom3 Information Links
http://www.doom3world.org/phpbb2/index.php
http://www.iddevnet.com/
The link below is to my personal notes on the doom3 modding process.  I'm new to doom3 so the information may not be accurate.  The notes will be updated as I learn more.
My Doom3 notes(to be taken with a large grain of salt)
source code text click here for c source for the doom3 importer
source code text click here for my unfinished lscript version