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.
#81
01/17/2005 (8:27 am)
Wow, you're right, acting very strangely....and it hangs the collision information off the secondary mesh and nothing on the first...dang I was just having some luck with dsq's too....I like this exporter, very simple to setup a shape.
#82
01/17/2005 (10:55 am)
@Ed

If you send me the shape you are having trouble with, I will see what the problem is.
#83
01/18/2005 (7:45 pm)
Chris,

You can download the file here.

It's my 'dummy' object. I use this as the default shape for all base datablocks so that I know I have goofed if this shape shows up. It has one collision-1 and one LOSCol-9 mesh. If I look at it in Show Tool Pro, I can find the collision mesh, but not the LOS mesh. Also, if I take out the collision-1 mesh, ray casts fail against this shape.

If you find something wrong, you can send me the MS3D file at: e DOT maurina AT verizon DOT net, or just post the mistake here if you like.

Thanks!

[HOW]EdM|EGTGE
#84
01/26/2005 (10:16 pm)
Updates:

- Fixed LOSCol mesh name bug (thanks Ed Maurina)
- Updated documentation
#85
01/27/2005 (2:16 pm)
@Chris - Thanks again. This exporter is really great for those who don't want to pay big bucks, but still need features like IFL and Blended Anims (among the other features it supports now, like LOSCol-x).

[HOW]EdM|EGTGE
#86
02/06/2005 (9:43 pm)
Has anybody got triggers working? I have the Girl Pack and exported it with this new exporter just fine, but she didn't leave footprints. I put the triggers in on various frames (both keyframes and non-keyframes) and they don't export.

Even worse, I can edit the 'run' animation, put in two triggers, one at frame 60 with a value of 1, one at frame 70 with a value of 2, then I hit "OK". If I edit the 'run' animation again, the values are each incremented by one! I tried using values of 0 and 1 (with the intent that they will increment). Still doesn't work.

Once I do export the Girl Pack, the Frames in the Trigger list are -7392 and 6785 (instead of 60 and 70). Am I doing something wrong?
#87
02/21/2005 (7:42 am)
@Chris: Ms3d 1.7.4, now has Comment Notes that apply to Groups[plus a re-queing of the 'stack'], Materials, and Joints....I wonder if this would help open the exporter any, in regards to DSQ files[and any other 'missing' feature]? I find I'm not able to include a NeverAnimate list, in the .CFG, to remove the node/joint from the sequence, and need to do a bit of hacking to get only the nodes I want included within the shape/file. It can be done....pages.sbcglobal.net/rexpiscator/_wsn/page2.html
#88
02/21/2005 (4:37 pm)
Hi Rex,

I did see that update to the milkshape sdk - and it does open up some opportunities for the exporter.

Notably, the mesh visibility frames could be made persistant (previously I had nowhere in the model to store them), and in fact, all other properties could be moved to the comment, instead of packing them into the mesh/material name.

I haven't tried using the NeverAnimate or NeverExport lists before. What seems to be the trouble?
#89
02/23/2005 (6:41 am)
Perhaps it was exhaustion, bleariness; but when I included a NeverAnimate list in the .CFG...it[exporter] seemed to ignore it, thus exporting the transforms on a whole section of my rig; lower body for example. My screenshots show my 'hacked' method's results, isolated Nodes per .DSQ[that was an exciting session!]. I was hoping to be able to config it instead, ;). I'm delving back into this character soon, I'll certainly take a closer look. I really like this exporter....:). I have gotten .DSQ file generation working, so I'm way happy about that. The dsq's and the reference dts merged without a hitch. I'll just have to see how far I can take it with the playerClass. I was comparing results between Ms and gS, exporting back/forth, that's where I really noticed the difference in my listings. Being a skinned mesh, culling by NeverExport won't fly without a bit of jizzle and voodoo.

I can understand why collapsing the transforms might not be possible due to Ms's nature to reset the joint transforms on edit(wonder if the Comments per Joint might help?!?!). I did manage to cull them via NeverExport and some voodoo...and the Node rotations seemed intact, as I said; it was a very good day.

...and the verdict is: total exhaustion by a nose. Iv'e gone back and very carefully did some exporting and NeverAnimate seems to do it's job! WOW. Just goes to show what lack of sleep does to ya...Thanks Chris. Bad construction of the .CFG.
#90
02/26/2005 (12:09 pm)
Ha-Ha! I've actually been able to build DSQ's in Milkshape that load into a DTS shape I exported from gameSpace!!!!!......and the NeverAnimate is working quite nicely....
#91
02/26/2005 (5:45 pm)
Wow, I have been following this thread for several months, and I admire the persistence. I have been working on several other items but know that I had hoped someone would get dsq files and Milkshape functioning. Congrats. Soon I will be trying to catch up because blending animations would be so cool from Milkshape.
#92
03/18/2005 (1:13 pm)
I have had some luck with blend animations and DTS. So, I'm not sure what the point to DSQ is. And ground transforms are working perfectly now.
#93
03/18/2005 (5:30 pm)
DSQ's are nice if you want to have several different shapes share the same animation sequences.
#94
04/16/2005 (11:45 pm)
Updates:

- Changed to new milkshape SDK (1.7.4)
- Changed naming convention to store properties in comment string
- Made visibility keyframes persistant
- Removed sequences are now removed from the model
- Added 'Output dump file' option to export dialog
- Added 'Create Bounds Mesh' button to export dialog
- Various small code fixes
- Added online help
- Updated documentation

Notes on the new naming convention:
The previous naming convention (where properties were packed into a strange looking !$!#%^ type name) is no longer supported. I realise that this creates a bit of a problem where you will need to manually translate to the new convention, but I think you'll find the upgrade worth it.

Note that you must be using at least milkshape 1.7.4 to use this version of the exporter.
#95
04/17/2005 (8:12 am)
Great! thanks!
#96
04/20/2005 (10:59 pm)
DUDE I LOVE YOU WITH ALL MY HEART
#97
04/20/2005 (11:15 pm)
=)...
#98
04/21/2005 (7:29 am)
so whats the word on this exporter? i havent downloaded it yet because it still seemed a bit buggy. has everything been fixed? are ifl and dsq working fine now?
#99
04/21/2005 (2:09 pm)
=)...
#100
04/24/2005 (8:07 am)
Thanks, Chris!