Game Development Community

dev|Pro Game Development Curriculum

Updated milkshape exporter

by Chris Robertson · 06/19/2004 (4:40 pm) · 257 comments

Last Updated: 12/11/08

Download the new milkshape exporter here.

You must be using at least Milkshape 1.8.3 to use this exporter.

Features:
- Triangle stripper
- Multiple collision meshes
- LOS collision meshes
- Full level of detail control
- Blended animations
- Mesh visibility animation
- Auto-details
- Auto-billboards
- Easy to use sequence/mesh/material property editor

Geometry
Any mesh whos name begins with 'Collision' will be interpreted as a collision mesh. These meshes should have a negative detail level. Any mesh whose name begins with 'LOScol' will be interpreted as a line of sight collision mesh.

LOD
The exporter supports any number of detail levels per mesh. Detail levels are stored as numbers at the end of the mesh name. If your meshes already have numbers at the end of their name, you will need to add a non numerical character at the end, or they will be interpreted as LOD. eg.

body0 will produce a mesh called 'body' with detail level 0
foot12d5 will produce a mesh called 'foot12d' with detail level 5

The original milkshape exporter output shapes with all visible meshes at detail level 0. If you are not making use of LOD, this is the best value to give to visible meshes. Meshes with a negative LOD will be exported but are not visible (eg collision meshes).

Sequences
Sequence special material naming convention has changed, as there is much more information to pack into the name now. Old sequence names are supported, but will be converted to the new convention when you apply changes to the model. All sequence information is now stored in the comment string of the special material.

A '*' at the start of the name indicates that this is a sequence special material

The best way to edit sequences is via the exporter dialog. Just add/select a sequence, then press the Edit button.

Configuration Files
The exporter supports configuration files using the same format as 3dsmax. The configuration file should use the same name as the exported dts shape. eg. use a configuration file called shape.cfg when exporting shape.dts. For most shapes you will not need to use a configuration file, the defaults provided by the exporter will be sufficient.

Documentation
Some alpha documentation is located within the zip file. It is based mostly on the existing 3dsmax/maya documentation and is still a work in progress. If you find any errors, or would like to add something, please feel free to contact me.

Known Issues
- Alpha sorting is supported (in that sorted meshes are passed through the sorting code), but I have not actually seen it working yet. When you view a sorted mesh in the show tool, some of the faces have been split (the poly count goes up), but the faces still appear sorted incorrectly.


I have tried hard to make this exporter fully functional, but it is quite possible that there are still problems with it. I advise you to SAVE your work before you export it, and because the exporter modifies the ms3d file to apply your changes, you should backup your files before using it. If you find something wrong, or even have a suggestion, please let me know.
#221
11/29/2006 (2:46 pm)
I'm just loading up the crossbows projectile model.
#222
11/29/2006 (3:25 pm)
Just opened that model now - and it does crash when you export it. Looking a bit closer, I see that the model has an invalid group: the first mesh group (Box01) has 0 verts and 0 triangles defined. Just delete this mesh from the model and it will export fine.

Also note that the LOD of the other two meshes (Box01 and Duplicate03) are 1 and 3 respectively, so you will most likely want to change them both to 0.
#223
11/29/2006 (6:42 pm)
Holding empty meshGroupings is another BAD habit of Milkshape... Mete, I think, has stated that the empty grouping issue should be fixed. It appears as though this is not the case.

Another weird issue with some meshes is the collapsing of verts down to the Root/Origin[I think it assigns 'orphaned' verts to the Root?? or produces them?!!], while the meshes appear fine. You will get crashing and complaints about verts linked to collapsing Nodes[like removing Bones in Max already holding weights]. Check for unassigned verts in the Joints Tab, they'll highlight. Usually, 3DS format culprit. Usually throws an assertion at ya...;).

working out of v1.7.8....
#224
03/07/2007 (1:34 pm)
Just swallowed my post... grrr...

Quick rephrase:
1. Is this still in development?
2. This doesn't work with TGEA? Can someone confirm this?
3. LOSCol-# (Starts at 9)... So the LOD is getting picked up as -9. Is this correct?
4. Should i be using LOS-# (Which also starts at 9)

Sorry for the quick questions, but not gonna retype my whole post again...
Thanx in advance!
#225
03/09/2007 (12:36 am)
1. Yes.
2. No reason why it shouldn't work with TGEA - unless the DTS format has changed; I am not aware that it has.
3. The LOD for LOSCol meshes can be positive, but that means the mesh would be visible. Not usually what you want.
4. Use negative LOD values for meshes that you want to be invisible.
#226
03/12/2007 (4:33 pm)
@Chris:

Did you release to the General Public, the exporter build that eliminates the groupSeams? I'm working with Ari and Jondo; and Mete has released upgraded Milkshape with vertex weight editing & visualization!

Mete now includes DTSPlus! as a permanent member of the Menu dropdown Export list! Just want to know if it's the same copy[I'm assuming he got it from the ResourcePage link...or directly from you?], or do I need to swap out for the Non groupSeamed build.

Thanks. I'll go change the TDN page for exporters to reflect DTSPlus! green bars rightfully deserving listing.
#227
03/12/2007 (4:41 pm)
@Rex:

Not sure if I made the announcement (probably forgot to), but I did update the publicly available download.

Mete contacted me directly about the latest version of DTSPlus!, so it should be the one with the group seam fix.
#228
03/13/2007 (2:48 am)
Dunno whats up with this thread eating my posts... sheesh...

Just to make sure... The latest update can be found at the top of this thread, even though it says "Last Updated: 17/12/05"?
#229
03/13/2007 (5:01 am)
Yep, always.
#230
06/06/2007 (5:54 am)
Hi there! :)
I have few question...

I have 2 collision meshes, 1 attached to an animate nodes and the other attached to any node... the animation play ok in milkshape but in the exported .dts both collision meshes are static...
So I tried having 2 collision meshes attached to 2 different animated nodes but now in the exported .dts they play the same animation...
I've done a lot of temptative but without success... It seem it doesn't want 2 collision meshes attached to 2 different nodes... is this a bug?
Further question... can i have 2 animated IFL material in the same .dts? Tried but the exporter crash...

Tnx,
JoZ
#231
06/06/2007 (8:28 am)
Collision meshes in the SDK don't animate by default. You'll have to either hack in a scripted method, or change Source code....
#232
06/06/2007 (2:03 pm)
Rex, sure about that?
I'm asking because at a point I got both collision meshes animated...
And doing a simple a dts consisting in a simple box shape and a simple collision box and attaching to the same animated node both moves...
What I cannot get is a collision mesh static that doesn't play the animation and another collision mesh that play the animation...

And... about having more then 1 IFL animated material, have you any knowledge?

Tnx a lot, JoZ :)
#233
06/16/2007 (1:56 am)
Hi all,
I have a question about exporting IFL materials with ms2dtsExporterPlus. I try to export more than one ifl material but it doesn't work. In the dump file I see that it recognize 2 ifl materials but then it stops working. I've also observed that I can't assign an IFL material to more than one group in the 3d model. I resolved the problem regrouping the meshes using the same IFL material in one group.
Thanks in advance for any help.
Denis
#234
09/25/2007 (5:44 am)
If this is a repeating question I apologize but I couldn't find an answer in a short time (~2 hours of search through forums). And time is not what I have.

Anyway, the problem:

I have a model where I want some meshes pop up according to LOD. Assume we have three meshes with LOD values:

1stmesh3
2ndmeshB50
3rdmeshC120

I want that meshA stays visible all the time without the need of creating additional meshA50 and meshA120 meshes. I want all three parts to be visible when object is drawn 120 pixels or higher. 3rdmesh is a little detail on the model which I want to draw it only when model is close enough.

Can this exporter do that without creatin additional meshA50 and meshA120 meshes? If I'm not wrong, 3dsMax exporter does that, however this exporter seems doesn't.

If this is not supported, anyone plans to add this feature?

I got many meshes in many models in this situation and it will waste a lot time if I have to copy the inbetween meshes.
#235
09/27/2007 (12:36 am)
Yes it does support it. Read at the details of the thread, or check out the documentation.
#236
10/10/2007 (2:06 pm)
Can someone please check why the flaming part of the Projectile in this model does not animate? I cant seem to get it working.

Some help here would be great.
#237
10/24/2007 (11:35 pm)
I'm not sure if this is an exporter problem or a Milkshape problem (most likely the later,) but I'm having an issue where whenever I use the fatboy tool, I lose my exporter settings. I've used a few other plugins, and I haven't had any issues with them, but when I use fatboy I have to go back in and re-set all of my animation, material, and LOD settings in the exporter. Once I get everything re-set, it works fine. But it is an annoying issue to deal with for sure.

Anyway for me to save those settings in a separate file so that I no longer have to worry about Milkshape plugins tearing the settings out of the .ms3d file?
#238
10/25/2007 (8:04 pm)
@SamB: All of the exporter settings are stored in the various comment strings in the mesh, material and bone objects. It sounds like the fatboy plugin is clearing the comments (so you lose your settings).

There's currently no way to save a models settings external to the ms3d file.
#239
02/17/2008 (11:10 am)
Hi all,
It has been several months since this thread was active, hopefully some in the know are still around. Before posting my questions I would like to thank Chris for this great tool!

Q1: Has the source code ever been released?

Q2: Is there some tricks to using triggers. I've created a simple player model that works well both in Show Tool Pro and TGE 152. I'm trying to get triggers to work with footsteps, with little success. I have two simple animations in MilkShape, root and run. I export the model with no animation using the Export DTS button. Then export the root and run DSQ's with Export Animation, Generate .cs file and Split DSQ Export checked.
I load these into ShowToolPro using the Load DTS and CS button. All is well except there are no triggers, just No under trigs for the root anm , as it should be and ERR under trigs for the run anm.
If I export the animation with the DTS instead of as separate DSQ's the results are the same.
Here is where it gets odd, discovered by accident; if I export the DTS with animation then export the DSQ's with a .cs file, load into Show Tool Pro. I get two root anms. and two run anms., of course, but one of the run amns has working triggers. The other run anm. still shows err.
My first thought on this was there is something wrong with my model or bone structure. So I loaded Chris' MrBox model, animated him with the same key frames, seq. names and triggers and get the exact same results.

My model info:
root anm. Start = frame 1, End = frame 10
run anm. Start = frame 11, End = frame 21,
first trigger = Trigger 0, Frame 17, State 1,
Second trigger = Trigger 1, Frame 20, State 2

Any help on this would be greatly appreciated. If anyone would like to take a look at this model just let me know.

Thanks

Dale
#240
02/18/2008 (8:05 pm)
Is it simply not possible to get triggers working with MilkShape models. I know Rex said he had done it in an old post in one of the forums but he did not elaborate on how.

Has this tool and MilkShape simply died as far as TGE goes?

Am I in the wrong place to ask questions about this tool?????