w3dm2ase v1.0 by booto (contact on http://www.derelictstudios.net/ forums)

This program is for converting "Command and Conquer 3: Tiberium Wars" w3dm
resources to 3D Studio Max ase files. The code should compile cleanly under
mingw.

options:
 -i inputfile       sets w3dm inputfile (default:stdin)
 -o outputfile      sets ase outputfile (default:stdout)
 -t texturefile     sets the texturefile
 -v                 verbose
 -h                 print this help and exit


w3dm files and texture files can be obtained using the binopener program
on the derelict studios command and conquer 3 editing forum
(in this thread: http://www.derelictstudios.net/forums/index.php?showtopic=15042&st=20)

convert textures to tga from dds (irfanview can do this)


Tutorial:

1) Open up static_demo_common in BinOpener and go to the 'W3DMesh'
   category. Choose one - we'll do NPCARRYALL.NEWSKIN01. Extract
   it to somewhere.

2) In the information pane on the right, see a list of imported
   resources. Four textures appear, we're interested in
   Texture:NUCarryAll_D. Extract that out to the same directory.

3) Convert NUCarryAll_D.dds to NUCarryAll_D.tga (irfanview can do this,
   google for irfanview, remember to get plugins pack.)

4) In a commandline prompt navigate to the directory you've dumped the
   things from steps (1) and (2) and type:

w3dm2ase -i NPCARRYALL.NEWSKIN01.w3dm -o out.ase -t NUCarryAll_D.tga

5) If all goes to plan, a new file out.ase should exist in that directory.
   Try to open that file in your ase viewer.

6) If you redistribute the ase file, make sure you also redistribute the
   tga file, otherwise the model will have no textures.


Usage examples:

w3dm2ase -i inputfile.w3dm -o outputfile.ase

This will take a w3dm file and convert it into an ase file. The resulting
ase file will not be textured.

w3dm2ase -i inputfile.w3dm -o outputfile.ase -t somefile.tga

Same as previous, but the resulting ase file will be textured with
'somefile.tga'. The texture parameter is stored as a string in the ase
file, so relative paths could break if some files are moved around.

w3dm2ase -i inputfile.w3dm -o outputfile.ase -t somefile.tga -v

Same as previous, but dumps a heap of information to STDERR as it
processes the w3dm file.