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
#22
- Added player example to doc/examples folder
- Added base skeleton to doc/examples folder
The base skeleton allows you to export characters from milkshape that are compatible with the default player DSQ animations. I have also included a very basic player example to get you started.
07/23/2004 (3:31 pm)
Some more updates:- Added player example to doc/examples folder
- Added base skeleton to doc/examples folder
The base skeleton allows you to export characters from milkshape that are compatible with the default player DSQ animations. I have also included a very basic player example to get you started.
#23
07/26/2004 (6:38 am)
Awesome, Chris! I'll have to say that you now have a dedicated download folder in my TGE toolboxTree...:) oh, and btw; get this work submitted to overwrite the current shipped version!!! With the new resource included, it should be given high consideration. Take a bow, and I raise my pinter in your direction...:p Off now to see about how to get that skeleton as a default Ms3d shortcut...:)
#24
But I've ran into a problem exporting animations. The FPS box has no effect. With the old exporter I was exporting all my animations at 15 except for root which I had fps=5. Now, with the plus exporter, everything plays at what appears to be fps=30. It doesn't matter what I put in for an fps value (anything for 1-150) it plays at the same fps=30. I'm I missing something?
I've tried deleting all my seq materials and adding them fresh from the exporter with no luck.
any help would be appreciated, as I need the LOD, triggers, etc that this new exporter offers! (I'm running milkshape 1.7.0c)
MEL
07/29/2004 (4:29 am)
Great job on the exporter! Its gonna be great for those of us using milkshape.But I've ran into a problem exporting animations. The FPS box has no effect. With the old exporter I was exporting all my animations at 15 except for root which I had fps=5. Now, with the plus exporter, everything plays at what appears to be fps=30. It doesn't matter what I put in for an fps value (anything for 1-150) it plays at the same fps=30. I'm I missing something?
I've tried deleting all my seq materials and adding them fresh from the exporter with no luck.
any help would be appreciated, as I need the LOD, triggers, etc that this new exporter offers! (I'm running milkshape 1.7.0c)
MEL
#25
08/01/2004 (5:09 pm)
@Melvin: Looks like you've found a bug there. I hadn't tried changing the fps before, so I didn't know about that one. I'll get it fixed for the next version.
#26
Thanks for checking into it! I appreciate your time and dedication to fix the bug! I'll be anxiously awaiting the new version....
MEL
08/01/2004 (5:17 pm)
Chris,Thanks for checking into it! I appreciate your time and dedication to fix the bug! I'll be anxiously awaiting the new version....
MEL
#27
anyone know why?
08/06/2004 (8:27 pm)
so yeah I tried this and I get this... Fatal: (c:\torque\engine\ts\tsshapeinstance.cc @ 1682) TSShapeInstance::renderShadow in the console.. it works ok in 1st person but dies when I go 3rd person...anyone know why?
#28
08/10/2004 (10:11 pm)
What LOD are you using, Tom? I've seen this error when you try rendering a shadow for a LOD that doesn't exist.
#29
Is there an expected time frame when ground transforms will be supported, or perhaps its already being exported? I see the check boxes for it in the exporter. Ground transforms would fix most all of my fps problems, as I was using the fps settings to adjust the animation speed to match the ground speed during walk & run, etc.
any help with this would be great!
MEL
08/11/2004 (3:51 am)
Chris, et al.Is there an expected time frame when ground transforms will be supported, or perhaps its already being exported? I see the check boxes for it in the exporter. Ground transforms would fix most all of my fps problems, as I was using the fps settings to adjust the animation speed to match the ground speed during walk & run, etc.
any help with this would be great!
MEL
#31
Question though, and anyone who could assist me feel free to jump in. I completely understand LOD and how the exporter uses it etc but I am having a hell of a time getting collision on my exports. Basically none of the items I exported from Milkshape have collision and my players walk right through them. From what I have read there are a couple ways to do this. Do I simple copy all verticies and paste them so I have 2 images and name the second copy Col-1 (I read something about that.)
Thanks in advance Chris. Great stuff.
08/22/2004 (5:37 pm)
Chris, thank you for an awesome resource. Your work makes it possible for people to do things they otherwise couldnt.Question though, and anyone who could assist me feel free to jump in. I completely understand LOD and how the exporter uses it etc but I am having a hell of a time getting collision on my exports. Basically none of the items I exported from Milkshape have collision and my players walk right through them. From what I have read there are a couple ways to do this. Do I simple copy all verticies and paste them so I have 2 images and name the second copy Col-1 (I read something about that.)
Thanks in advance Chris. Great stuff.
#32
@Creative Edge Computing: To get collision working ingame, you need to define a collision mesh. This mesh should use as few faces as possible, and MUST be convex. It is not a good idea to just make a second copy of your model to use for collision. A simple cube would do fine for a starting point. Once you have your collision mesh, just name it CollisionN (where N is the lod, usually -1) and the exporter takes care of the rest. Meshes with negative LOD values are exported but not rendered, so you can view a visible copy of the collision mesh by giving it a positive LOD.
08/22/2004 (5:49 pm)
@Tom: Try using LOD of zero (that is what the old milkshape exporter used). The problem occurs when the mesh rendering code tries to generate a shadow from a non-existant level of detail.@Creative Edge Computing: To get collision working ingame, you need to define a collision mesh. This mesh should use as few faces as possible, and MUST be convex. It is not a good idea to just make a second copy of your model to use for collision. A simple cube would do fine for a starting point. Once you have your collision mesh, just name it CollisionN (where N is the lod, usually -1) and the exporter takes care of the rest. Meshes with negative LOD values are exported but not rendered, so you can view a visible copy of the collision mesh by giving it a positive LOD.
#33
08/22/2004 (6:46 pm)
=)...
#34
Thanks a mill
08/23/2004 (7:31 pm)
Dave and Chris I humbly salute you. =) Thank you for explaining in terms I can understand. Most excellent to have people in the community that can help that quickly.Thanks a mill
#35
08/23/2004 (8:14 pm)
=)
#36
08/24/2004 (8:10 am)
Hi , I checked out the exporter, and i opened some of the sample ms3d files, It seems there is some kind of corruption going on with materials. I confirmed this by opening one of my saved ms3d drawings, and tried to use the exporter. I got the same reult. The materials were again corrupted and ms3d also crashed. When i went back into the ms3d file the corruptioin was apparent. The corrupted sample ms3d file was the iflsample.ms3d and the material that was corrupted reads as "*iflanim="!B!!!?&!
#37
If you have a problem with the exporter crashing milkshape, or any other strange behaviour, post a detailed account of how to reproduce the problem, and I'll look into it.
08/24/2004 (12:25 pm)
@William: The naming convention for special materials has changed as there is now much more information to pack into the 32 character limit that milkshape provides. A more extensive description of the changes appears in the documentation.If you have a problem with the exporter crashing milkshape, or any other strange behaviour, post a detailed account of how to reproduce the problem, and I'll look into it.
#38
your ifl example gives this for the seq *iflanim="!B!!!?&!
08/24/2004 (2:46 pm)
ok it crashes when i try to export a ifl..your ifl example gives this for the seq *iflanim="!B!!!?&!
#39
The documentation details the changes to the material naming format. The old convention is still supported, but names are changed to the new format.
08/24/2004 (3:17 pm)
@Tom: As I mentioned to William above, the naming convention for special materials has changed. You should not edit them by hand, but use the exporter dialog. The characters added to the end of the texture names are material flags such as additive, subtractive etc.The documentation details the changes to the material naming format. The old convention is still supported, but names are changed to the new format.

Associate Chris Robertson
- Fixed animation triggers not being exported
- Added support for detail mapped materials
- Added detail map example to doc/examples folder
- Updated documentation