3d studio max Smd importer/exporter


Kiff
10-02-2003, 07:10 AM
Found a few helpful little plugins.

3d studio max smd importer. This works for Gmax as well.
http://web1.hamburg147.server4free.de/counter-strike/skinning-verteiler.php

3d studio max smd exporter
http://www.max3d.com/plugins/r4/smdlexp_r4.zip

10-04-2003, 04:05 AM
nice find :D

Grain
10-05-2003, 12:44 AM
Does the exporter work in Gmax? I because I cant seam to find a SMD exporter for Gmax.

Kiff
10-05-2003, 01:15 AM
Unfortunately, the exporter doesn't work with Gmax.

Grain
10-05-2003, 11:16 PM
Originally posted by Kiff
Unfortunately, the exporter doesn't work with Gmax. Does anyone know of an SMD exporter for Gmax?

10-13-2003, 12:56 PM
hello,
im escape from www.gamedome.org

http://web1.hamburg147.server4free.de/counter-strike/skinning-verteiler.php

im sorry my english is very bad,...

i have upload the smd importer and exporter for 3dsm/gmax

it runs whit GMAX AND 3DSM 3.xx-5.xx

I KNOW THIS :)

Grain
10-14-2003, 01:36 AM
I couldn’t get that one to work either. It appears to be the same one I already had.

10-14-2003, 04:01 AM
Important Note


This is an unofficial utility and is not supported in any way by Valve Software. Please do not contact them with any questions about this script.

About This Script
This is a gmax/3DS Max 4.2 or later MAXScript utility for importing Half-Life SMD files, featuring full support for meshes, skeletons and animations.

All Half-Life models start life as a bunch of SMD files which are compiled into game compatible MDL files using the studiomdl tool, included in the Valve Half-Life editing SDK. SMD files can be extracted from a previously compiled MDL file (such as those included with the game) using an MDL decompiler. Two recommended ones are mentioned later on in the usage section.

Installation
To install, just drop SMDImporter.mzp into your gmax/max scripts\startup folder (eg. c:\gmax\scripts\startup), run gmax/max (if it's not running already), go to the "MAXScript" menu, select "Run Script...", choose the SMD Importer script found in your gmax/max scripts\startup folder, and click OK. Select the utility command panel (the one with the hammer icon), click on the "MAXScript" button and the MAXScript utility rollout will appear. In it you'll see a little drop down list box entitled "Utilities". Open it up, and you should find "Half-Life SMD Import" listed there. Click on "Half-Life MDS Import" and the interface should appear somewhere below or above the MAXScript rollout. Note that you might have to scroll the utility panel down to find the interface. You're ready to go!

As you placed the script in your gmax/max scripts\startup folder, it will automatically be installed each time you run gmax/max. If you don't like this, just put it into your scripts folder instead and run it manually as described above each time you need it.

To uninstall, just delete SMDImporter.mzp from wherever you put it.

Using the Importer
The first step in using the importer is to extract a set of SMD files from the MDL model you would like to import. You can do this either using Milkshape 3D or Kratisto's SMD decompiler.

For example, to decompile the SAS player model from Counter-Strike using Kratisto's SMD decompiler, go into the command/DOS prompt, move to the directory where the SMD decompiler is located and enter something like this:


mdldec C:\Half-Life\cstrike\models\player\sas\sas.mdl C:\SMDModels\sas

This will decompile sas.mdl into the C:\SMDModels\sas directory, filling it with lots of .smd files containing animation and mesh data. There is usually one reference pose SMD file (in this case, sas.smd) and many animation SMD's, for example walk.smd for the walking animation, right.smd for the "dying falling to the right" animation and so on.

Using the importer is nice and simple. Hit the "Import SMD..." button, pick an SMD file and hit OK. If you chose a reference SMD (one that contains a mesh) both the skeleton and mesh will be imported. If you chose an animation SMD (no mesh) the skeleton will be loaded with all its animation keyframes.

If you already have a skeleton in the scene, the importer will apply any subsequently imported animations with matching skeletons to it. For best results, import the reference SMD first to obtain the mesh and then import animation SMDs. You only need import the mesh once: following animations will be automatically applied to the mesh's skeleton.

Frequently Asked Questions (FAQ)
Why not import MDL files directly?

The MDL decompilation process is too involved to implement in MAXScript. Using an external tool would be a start, but this would prevent the script from working in gmax as well as introducing some other tricky problems. If you do modify the script to load MDL files directly, drop me a line!

Why do imported models look faceted even when smooth shading is enabled?
The faceted effect is due to a combination of limitations in max and the SMD format. Each triangle in an SMD mesh has a unique vertex, so max assumes every face is disjoint and assigns face normals to each vertex. Getting round this is hard: it's not possible to weld vertices together to smoothen the normals as this would upset the skin modifier used to deform the models during animation; and explicitly specifying vertex normals from those in the SMD file doesn't work as expected in max.

A simple way to get smoother looking meshes is to remove the skin modifier leaving an editable mesh, select all the vertices and weld them. Apply a new skin modifier and reattach the skeleton by manually assigning new envelopes and vertex weights.

What is an .MZP file?
MZP files are simply a bunch of MAXScripts (and any data they need) stored in a ZIP file. If you're interested, just rename the MZP file extension to ZIP and take a look at the contents: all the source code is there.

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.