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
#182
Is this normal behavior or is there a way around this?
12/04/2005 (12:35 pm)
Awesome exporter, it has been a great help to me. I have a question though. It seems like the exporter is unwelding my model at the texture mapping seams, making an ugly line down the side. Example PictureIs this normal behavior or is there a way around this?
#184
I am asking because I was having trouble with my player always facing the wrong direction (towards the camera), and walking backwards. Adding it by itself does not do anything.
Attaching it to the Root node (at player's feet) doesn't do anything. Attaching it to my meshes root node makes my model turn to face the left, and his forward walk becomes a sidestep and he is sunk halfway under the terrain. Well that affects SOMETHING so I try to rotate the box to the right 90 degrees and re-export, but nothing changes...
I just want my poor little player to face front like a good little doobie. I know it involves this bounds box... any tips??
[Edit] fixed by removing bip01 from the export.
01/24/2006 (5:29 am)
I have a question about the bounds mesh that the exporter creates. Does it need to get attached to a specific bone?I am asking because I was having trouble with my player always facing the wrong direction (towards the camera), and walking backwards. Adding it by itself does not do anything.
Attaching it to the Root node (at player's feet) doesn't do anything. Attaching it to my meshes root node makes my model turn to face the left, and his forward walk becomes a sidestep and he is sunk halfway under the terrain. Well that affects SOMETHING so I try to rotate the box to the right 90 degrees and re-export, but nothing changes...
I just want my poor little player to face front like a good little doobie. I know it involves this bounds box... any tips??
[Edit] fixed by removing bip01 from the export.
#185
01/25/2006 (4:34 am)
Glad you got it working, Dave!
#186
tone
01/25/2006 (2:16 pm)
I am curious why it appears to insist on downscaling everything 10-fold on export? Can this be made configurable (the option is grayed out on my export panel) and can it remember the value I set? Failing that, can the near-feature simply be removed? I find myself having to expand everything 10-fold before handing it to this step of the art pipeline, and that is slightly ugly (though tolerable).tone
#187
My exporter allows you to set the global scale factor (ie it is not grayed out!), and it will remember the scale you have set for each model.
01/25/2006 (3:20 pm)
@Anthony - this resource pertains to the updated ms2dtsplus exporter. It sounds like you are describing the default exporter that comes with TGE.My exporter allows you to set the global scale factor (ie it is not grayed out!), and it will remember the scale you have set for each model.
#188
I believe that is the reason why people scale their mesh up by ten when working with animations which require bones. The exporter would then need to downscale the mesh again.
01/25/2006 (9:11 pm)
@Anthony, when you add bones to objects of standard TGE player size in MilkShape, you will find the the knobs on the bones are way larger than you can comfortably work with.I believe that is the reason why people scale their mesh up by ten when working with animations which require bones. The exporter would then need to downscale the mesh again.
#189
01/25/2006 (10:16 pm)
Quote:It sounds like you just need to reduce the joint size in the milkshape options.
#190
01/26/2006 (4:36 am)
Dave's right, I thought several of my meshes were 'hosed' in Milkshape with vertexes flying everywhere until I found the File->Preferences option to change joint size, and not only did my meshes look fine but I didn't have to recreate anymore of them from scratch. *blush*.
#191
From the looks of this example, you are breaking up your meshes for mapping. Are you then regrouping and rewelding these meshes?
You should also be aware that the exporter makes use of the stripper. Every strip has a beginning and an end. This may produce a visible seam.
The Show Tool Pro might help you identify where your problems are.
01/26/2006 (4:54 am)
I was quoting Chris from an above post.Quote:It seems like the exporter is unwelding my model at the texture mapping seams, making an ugly line down the side.
From the looks of this example, you are breaking up your meshes for mapping. Are you then regrouping and rewelding these meshes?
You should also be aware that the exporter makes use of the stripper. Every strip has a beginning and an end. This may produce a visible seam.
The Show Tool Pro might help you identify where your problems are.
#192
Man this exporter rocks against the default included with MilkShape 1.7.7a
01/26/2006 (8:21 am)
FYI, in the release notes at the top of this page it says "foot12_5 will produce a mesh called 'foot12_' with detail level 5" in the LOD area. But in the help file it says that the underscore will result in a negative LOD value.Man this exporter rocks against the default included with MilkShape 1.7.7a
#193
01/26/2006 (11:16 am)
Yes, I am regrouping and rewelding, but compliling the mesh causes the areas to unweld again.
#194
01/26/2006 (1:57 pm)
Good point, Brian. I've modified the release notes on this page.
#195
A great resource to add to your help files would be a very brief description of how to add a mount point in Milkshape (like for a chair) as I am having trouble trying to figure this one out. Sure there are a lot of tutorials for vehicles, but they seem so complex for just want to put a single mount point in.
Also great would be how to create LOD using Milkshape so the exporter can export it.
I realize that it is not part of the exporter, but it would be really great as those functions seem to be Torque based and we look for the exporter to be our 'middleware'.
Thanks again for a great exporter. I read the entire help files and it was very informative and helped a newbie like me a lot!
01/26/2006 (4:33 pm)
Hi Chris,A great resource to add to your help files would be a very brief description of how to add a mount point in Milkshape (like for a chair) as I am having trouble trying to figure this one out. Sure there are a lot of tutorials for vehicles, but they seem so complex for just want to put a single mount point in.
Also great would be how to create LOD using Milkshape so the exporter can export it.
I realize that it is not part of the exporter, but it would be really great as those functions seem to be Torque based and we look for the exporter to be our 'middleware'.
Thanks again for a great exporter. I read the entire help files and it was very informative and helped a newbie like me a lot!
#196
I've had a problem for a while where my mounted turret's mounted weapon would move correctly left<->right, and up and down.. But the turret itself would not.. it would stay still.
I had a turret working perfectly in an older game I was writing, I imported that turret and it worked perfectly... as before, even with my hacked up version of the engine.
Anyway, to cut a long story short, I tried using the old exporter on my troubled turret tonight and low and behold, it works... Also, running my old turret through the plus exporter causes a problem, were some of the meshes in the model stay in their original position where other parts obey the turret's skeleton.
I don't know why this might be happening, afterall, the parts of the model which are misbehaving are bound to the same joints, yet they fail to move.
I hope this gives you enough information to go on 'cos I really like this exporter and would MUCH rather use this than the stock Torque exporter.. it's so much nicer.
02/09/2006 (2:00 pm)
I've found a problem with the Plus Exporter. It appears to break my turrets. It makes some parts not respond to programatic manipulation of the skeleton.I've had a problem for a while where my mounted turret's mounted weapon would move correctly left<->right, and up and down.. But the turret itself would not.. it would stay still.
I had a turret working perfectly in an older game I was writing, I imported that turret and it worked perfectly... as before, even with my hacked up version of the engine.
Anyway, to cut a long story short, I tried using the old exporter on my troubled turret tonight and low and behold, it works... Also, running my old turret through the plus exporter causes a problem, were some of the meshes in the model stay in their original position where other parts obey the turret's skeleton.
I don't know why this might be happening, afterall, the parts of the model which are misbehaving are bound to the same joints, yet they fail to move.
I hope this gives you enough information to go on 'cos I really like this exporter and would MUCH rather use this than the stock Torque exporter.. it's so much nicer.
#197
02/22/2006 (10:38 am)
Yagh! It's happening again. Player facing 180 on the y-axis wrong direction. This time, removing bip01 from the export didn't affect anything. I let the exporter create the bounds box. Tried doing a RotateAll, rotating the Root node that the exporter created, etc. I know its a conceptual problem, not a problem with the exporter, but any hints?
#198
02/22/2006 (2:23 pm)
@Dave: The exporter should output the shape facing whatever direction it is inside milkshape. Is it possible to send me this shape that is giving you trouble?
#199
Email sent. An update is that I loaded him up in ShowTool Pro and he is facing the correct direction, but is still backwards in the game. Really seems like something with the bounding box now, just don't know how to fix.
[Edit] On a whim, because this really should have worked by now... I disabled a mod I had put in and the model works fine. The mode was to inherit the eye node translations and rotations for more realistic movement, and my eye or cam node is probably rotated wrong. Sorry I beat this horse up so badly ;)
02/23/2006 (3:37 am)
Chris-Email sent. An update is that I loaded him up in ShowTool Pro and he is facing the correct direction, but is still backwards in the game. Really seems like something with the bounding box now, just don't know how to fix.
[Edit] On a whim, because this really should have worked by now... I disabled a mod I had put in and the model works fine. The mode was to inherit the eye node translations and rotations for more realistic movement, and my eye or cam node is probably rotated wrong. Sorry I beat this horse up so badly ;)
#200
I am having some trouble exporting dts from milkshape and replacing the fps.starter kit player shape with my model and animations. I create my model with milshape and put in the animations. Then I use the plus exporter to export the dts with the animations defined on the exporter interface, but other than that I do not change any of the options. Then I exported the dts to the correct folder(shown below). I then change this
shapeFile = "~/data/shapes/player/player.dts";
to this
shapeFile = "~/data/shapes/player/ninja.dts";
When I try to run the starter.fps it freezes everytime and I have no idea why. Any suggestions?
thanks in advance.
04/28/2006 (1:45 pm)
Hi Chris,I am having some trouble exporting dts from milkshape and replacing the fps.starter kit player shape with my model and animations. I create my model with milshape and put in the animations. Then I use the plus exporter to export the dts with the animations defined on the exporter interface, but other than that I do not change any of the options. Then I exported the dts to the correct folder(shown below). I then change this
shapeFile = "~/data/shapes/player/player.dts";
to this
shapeFile = "~/data/shapes/player/ninja.dts";
When I try to run the starter.fps it freezes everytime and I have no idea why. Any suggestions?
thanks in advance.

Torque Owner Duncan Gray