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.
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.
About the author
#2
06/20/2004 (5:03 am)
Excellent!!!
#3
Great documentation, Chris, can't wait to test this out...and see those extra bits added in! Thanks.
06/20/2004 (6:30 am)
:P.Great documentation, Chris, can't wait to test this out...and see those extra bits added in! Thanks.
#4
Matt
06/20/2004 (9:29 am)
Okay so I just now had a chance to check out your exporter, really awesome work! I think that you have really opened up a lot of options for the MS users, again great work!Matt
#5
06/20/2004 (12:14 pm)
hey man, it will be an excellent exporter i think.
#6
The milkshape exporter is one of those things that has just been left unmaintained for a long while. Its nice to see improvements and additional features added to it.
06/20/2004 (1:06 pm)
Congratulations Chris!The milkshape exporter is one of those things that has just been left unmaintained for a long while. Its nice to see improvements and additional features added to it.
#7
One suggestion I have is have a pull down for the default Torque support animations like run, walk, die1, root, etc as well as let someone enter a new name. Would help those new to Torque get the animations correct and help me remember them :-)
Thanks!
06/20/2004 (2:18 pm)
Pretty neat!One suggestion I have is have a pull down for the default Torque support animations like run, walk, die1, root, etc as well as let someone enter a new name. Would help those new to Torque get the animations correct and help me remember them :-)
Thanks!
#8
- Fixed scale setting not being applied by main dialog
- Fixed dump file not working with custom config file
- Added support for independent position/rotation keyframes
- Updated documentation
06/21/2004 (10:20 pm)
Thanks for all the kind words. I have updated the zip with some miscellaneous fixes.- Fixed scale setting not being applied by main dialog
- Fixed dump file not working with custom config file
- Added support for independent position/rotation keyframes
- Updated documentation
#9
PS- by independent Rotation,Translation Keyframes support, are you refering to Nodes/Joints that are not in the psuedo-hierarchy? ie not Parented to an existing chain?
8:54-just ran back thru same shape to get a config working, and now I receive a nasty Assertion failed!
Program: C:\PROGRAM FILES\blah, blah
File: G:\STUFF\Software\Torque\lib\dtsDSK\DTSMesh.cpp
Line: 320
Expression: enormals.size()==Verts.size()
...I can't debug, so that's all I know. Odd, it seemed to fail first try, produce something on try#2, and then all the rest have been Assertion Errors...??
it produces a DMP file and it stops at a certain point, in the Third Pass, it begins to write the Hierarchy and stops writing after Bip01 Pelvis...it begins the next line Bip01, then ceases writing the dts shape?
06/22/2004 (6:54 am)
...aaahhhhh, should have looked here first, I redid some tests to reproduce the Config bug, and it's already been fixed!, Thanks a LOT, Chris...hey, any indication of DSQ support? in the future? pant, pant...I'm going to try getting a IFL animated texture to work, old documents list it as UNTESTED...I'm free today!..lol. Always ready to help out.;)PS- by independent Rotation,Translation Keyframes support, are you refering to Nodes/Joints that are not in the psuedo-hierarchy? ie not Parented to an existing chain?
8:54-just ran back thru same shape to get a config working, and now I receive a nasty Assertion failed!
Program: C:\PROGRAM FILES\blah, blah
File: G:\STUFF\Software\Torque\lib\dtsDSK\DTSMesh.cpp
Line: 320
Expression: enormals.size()==Verts.size()
...I can't debug, so that's all I know. Odd, it seemed to fail first try, produce something on try#2, and then all the rest have been Assertion Errors...??
it produces a DMP file and it stops at a certain point, in the Third Pass, it begins to write the Hierarchy and stops writing after Bip01 Pelvis...it begins the next line Bip01, then ceases writing the dts shape?
#10
Does your shape export ok without the config file (clear the "Use .cfg File" checkbox)? What does your config file look like?
06/22/2004 (4:20 pm)
Hi Rex,Does your shape export ok without the config file (clear the "Use .cfg File" checkbox)? What does your config file look like?
Quote:by independent Rotation,Translation Keyframes support, are you refering to Nodes/Joints that are not in the psuedo-hierarchy? ie not Parented to an existing chain?Nope. For each animation frame, milkshape allows you to set a translation, a rotation or both. So you could have a frame that had only a translation, or only a rotation key. The original exporter (as well as mine) expected keyframes to have both a translation AND a rotation, which caused problems like this. I have fixed this problem by treating position/rotation keys separately.
#12
Thanks again for a great piece of work.
Rex
06/23/2004 (5:43 am)
@Chris, nope, on my system, using the config setup box doesn't produce a dts shape...in one instance the Assertion Error about vertices and my next attempt was a single mesh(first was segmented), and that didn't work due to somehow Bone::Bip01 Pelvis wasn't attached to anything!!!???, it was, hmmm...but when I run the exporter without utilizing a config, works fine. I'll be rechecking things today and be on MSN till afternoon...I also do IRC, but not much anymore. BTW, is the IFL support there, I tried a few things and never got a texture to work in-showTool, no biggie, I see framework laid out, and I'm always experimenting,:), down in the pits, heh, heh.Thanks again for a great piece of work.
Rex
#13
It's hard for me to diagnose the problem without knowing what's in your config file. Could you post it, or email it to me?
For anyone else having problems, the fastest way to a solution is to provide (if possible) the dump file, the ms3d file, the config file and a description of how to reproduce the problem.
Cheers,
Chris
06/23/2004 (5:06 pm)
Hi Rex,It's hard for me to diagnose the problem without knowing what's in your config file. Could you post it, or email it to me?
For anyone else having problems, the fastest way to a solution is to provide (if possible) the dump file, the ms3d file, the config file and a description of how to reproduce the problem.
Cheers,
Chris
#14
addendum: Sunday,June27...expect an email from me with a zip of the config, dump, and ms3d file used...Thanks.
06/25/2004 (6:03 pm)
Will do Chris, working at Java1 right now and will be free Sunday...I'll redo some tests and send off the offending files...I apologize for being fairly vague as to specific workflow which results in both the Assertion Error and some trouble with the Joint/Bone--Node translation/writing(that's my first quess), and it's only when using a config.addendum: Sunday,June27...expect an email from me with a zip of the config, dump, and ms3d file used...Thanks.
#15
- Added support for IFL materials
- Added IFL example to doc/examples folder
- Fixed unlinked mesh error when using custom config file
- Updated documentation
06/29/2004 (9:53 pm)
Some more updates:- Added support for IFL materials
- Added IFL example to doc/examples folder
- Fixed unlinked mesh error when using custom config file
- Updated documentation
#16
...and I'm more than happy to put it thru some paces; I'll try to be just as meticulous about documenting my workflow, it's just my nature...:)
Rex
PS-...IFL's are total SUCCESS in Milkshape!!! I ran it thru this morning[after remembering to actually PUT the exporter in Ms3d root!...I was up late], and as I text; I am watching a DTS shape animate it's texture!!! This is amazing, Chris, Great work!
06/30/2004 (8:02 pm)
Super Duper, Chris! Just opened my mail and I see the official word here. You have opened up a wider audience to the Milkshape exportation process, HooRaa. I'll start crashing things about in the Lab and see what surfaces thru the bubbling mess...:) I'll also give my segmented character a go again and see how that holds up; I feel I may have too many Bones/Joints...ooor, I don't know, my second thought just didn't make any sense as I wrote it....we'll see what happens first.;)...and I'm more than happy to put it thru some paces; I'll try to be just as meticulous about documenting my workflow, it's just my nature...:)
Rex
PS-...IFL's are total SUCCESS in Milkshape!!! I ran it thru this morning[after remembering to actually PUT the exporter in Ms3d root!...I was up late], and as I text; I am watching a DTS shape animate it's texture!!! This is amazing, Chris, Great work!
#17
NB, Chris: my trigger States that were the negative value for the off position[-2,-1, respectively], after the export process, edited themselves to the values of [31,30]?? and no triggers get exported for the sequence.
07/02/2004 (10:29 am)
Trigger Support: I could not get this function working after running several tests this morning...got excited at first; but forgot to comment out the sequence validation/loading process in player.cs, for a minute I had both sound/decals...no puffs, though, but it was because the default sequences loaded on top of my embedded ones...and it did wicked Transform Morphication...afterwards, it called the correct sequence for root and run, my two quick defaults to check.NB, Chris: my trigger States that were the negative value for the off position[-2,-1, respectively], after the export process, edited themselves to the values of [31,30]?? and no triggers get exported for the sequence.
#18
07/03/2004 (10:09 pm)
I haven't tried any animated models yet, just static. I just wanted to say great job on this! :) This exporter will help tremendously :)
#19
Again, I'm really impressed and happy with this exporter upgrade. Have you considered releasing the source? Or, perhaps you're waiting to finish up some of the additional features you have listed in the docs? Whatever the case, this is really great. I mean really great!
[HOW]EdM|EGTGE
07/18/2004 (10:54 am)
Chris, Again, I'm really impressed and happy with this exporter upgrade. Have you considered releasing the source? Or, perhaps you're waiting to finish up some of the additional features you have listed in the docs? Whatever the case, this is really great. I mean really great!
[HOW]EdM|EGTGE
#20
The source will definitely be released. I was hoping to get all the unfinished features done first, but if people want it now, I'm sure it could be arranged. I guess that ideally it belongs in the GG repository, but I don't know what the procedure for that is.
As of right now, the todo list is:
- Triggers (done, just need to get the time to upload a new build)
- Detail/Reflectance mapped materials (90% done)
- Ground transforms
- Persistant mesh visibility keyframes
- UV texture animation
- DSQ support (not sure if this is even feasible with milkshape)
- Complete documentation and examples
07/18/2004 (12:50 pm)
Edward,The source will definitely be released. I was hoping to get all the unfinished features done first, but if people want it now, I'm sure it could be arranged. I guess that ideally it belongs in the GG repository, but I don't know what the procedure for that is.
As of right now, the todo list is:
- Triggers (done, just need to get the time to upload a new build)
- Detail/Reflectance mapped materials (90% done)
- Ground transforms
- Persistant mesh visibility keyframes
- UV texture animation
- DSQ support (not sure if this is even feasible with milkshape)
- Complete documentation and examples

Torque Owner mm
Matt
Huh, didn't seem to accept the post... Odd, so I'm posting again. :)