| 07-01-2006, 05:32 AM | #1 |
So you've finally created a model with Milkshape3d only to find yourself in need of .mdl help. Step 0 - Export from Milkshape3d Be sure that you used Guesst's Warcraft III MDL Exporter so that your animations and normals turn out the way they were meant to be exported. You can get the export file here: http://www.wc3campaigns.net/attachme...4&d=1150595263 Step 1 - Creating the header information This could be extremely difficult if it weren't for Oinkerwinkle's HeadingGenerator which does 90% of the work for you. If you don't have this tool, you can get it here: http://www.oinkerwinkle.com/tools/ Screenshot: You enter in the start and end keyframes of your animations straight from Milkshape3d using the standard 24 frames per second. The HeadingGenerator will automatically figure out the new keyframes for your animations. You can also add your textures and materials at this point (There will be some that you will need to modify such as team color). Copy this information onto your clipboard and paste it below the model portion and before the geosets. Screenshot: Code:
Materials 1 {
Material {
Layer {
FilterMode None,
static TextureID 0,
}
}
}Step 2 - Applying the materials Now you need to change the materialid on your geosets so that they correspond with the correct texture. The materials are numbered starting with 0 as you go down the list. Code:
Anim {
MinimumExtent { -39.256386, -53.777046, -37.396679 },
MaximumExtent { 38.109554, 1.497312, 1.841484 },
BoundsRadius 51.430481,
}
MaterialID 0, < -- change these to match materials
SelectionGroup 0,
}Note: When you use a corpse in your model, be sure to check that the keyframes in the alphas are correct so that the bones don't appear too soon or too late. Try basing it off of an existing model. You can also change the alphas to create changing textures, but that is not in this tutorial. Code:
Material {
Layer {
FilterMode Transparent,
static TextureID 1,
Alpha 4 {
Linear,
3000: 0.74345,
3750: 1,
4000: 1,
5250: 0.74345,
}
}
}Step 3 - GeosetAnims If you save and convert it an mdl with a corpse, projectiles, or an alternate form, the other geosets will be visible. So basically the regular model and the corpse, projectile, or alternate form will be visible throughout all of the animations (which can create the "random corpse" animation). To fix this we need to create geosetanims. This is one of the most skipped steps in model making; its also one of the easiest, if you know what you're doing. Code:
GeosetAnim { <-- geosetanim for model
Alpha 6 {
DontInterp, <-- this is so your model doesn't
41: 1, "slowly" fade in and out
1500: 1,
2500: 1,
3750: 0,
4000: 0,
5250: 0,
}
GeosetId 0,
}
GeosetAnim { <-- geosetanim for bones
Alpha 7 {
DontInterp,
41: 0,
1500: 0,
2500: 0,
3000: 1,
3750: 1,
4000: 1,
5250: 0,
}
GeosetId 1,
}The DontInterp line is in there so your animation doesn't interpolate between animations. Make sure that you use the starting keyframe of the animation and the ending keyframe of the animation when switching between visible and non-visible (0 is non-visible and 1 is visible). The geosetid corresponds when you count the geosets down the list starting with 0. You don't need to have the in-between animation keyframes, but when transitioning between visible and non-visible - always use both the starting and the ending keyframes. Now you can save your model and convert it into an mdx using Yobgul's War3FileConverter located here: http://www.wc3campaigns.net/attachme...7&d=1136598231 You can now add additional items to your mdl such as global sequences, events, particles, and a camera. This tutorial will not cover these items. You can view your converted model using Warcraft 3 Viewer 2 located here: http://www.wc3campaigns.net/attachme...0&d=1145878857 Now you can import your model into World Editor using the Import Manager. I have attached a reference model and mdl of a sheep (The animation isn't that good so don't get your hopes up). This is the end of this tutorial. Edit: Placed code tags around the clipped text and screenshot sizes fixed. |
| 07-01-2006, 02:09 PM | #2 |
Your images are a little too wide, make them like 650 width instead of 744. Use [code] tags wherever you place the mdl code. I'll have RDZ read this over for approval. |
| 07-01-2006, 03:39 PM | #3 |
Hrm, few things I'd like to mention. Interesting choice of Oinker's header generator (not my finaliser ), since it seemed to crash a lot at inopportune moments for me. I'd have thought a tutorial dealing with finalisation would do it from scratch all by hand, but there you go. Just a remark, not a crit ![]() Also, don't just dismiss Blend as Team-Colour; blend is a filtermode and only does team-colour in conjunction with the right little bitties. No idea what you're talking about with the ""slowly" fade in and out" bit of the geosetanim, since it's got DontInterp. Might I suggest using [code] tags so you can retain tabbing and such in the mdl code bits? That's all I can think of for now, seems to be good. |
| 07-12-2006, 10:22 PM | #4 |
That exporter makes the headings for you, though. |
