PDA

View Full Version : [Guide] [WIP] Full guide to importing models from MPQ Archives (Blizzard games) using 3DS Max 8



BlacRyu
03-01-2011, 05:51 PM
Ok, so I think this guide is going to end up pretty long, so I decided to just post it in pieces when I have time to work on it. Feel free to post feedback, suggestions, and/or requests here.


http://dl.dropbox.com/u/5534703/model%20import%20tutorial/Blizzard_logo.jpg
Model Importing

http://dl.dropbox.com/u/5534703/model%20import%20tutorial/ysera_blend4.png

Table of Contents
Overview
Getting Ready...
Step 0: Choosing a Model
Step 1: Getting the Files
Step 2: Importing the Model
Step 3: Fixing stuff (textures, bones, animations)
Step 4: Exporting the Model
Step 5: Fixing more stuff (materials, animations)


Overview:
In this guide I will be explaining how to import models and textures from blizzard MPQ archives into HoN's K2 format. This (currently) includes the games Warcraft III, Starcraft 2, and World of Warcraft. 3D Models don't like being thrown around between different formats, so you will most likely run into some weird glitches which require even weirder workarounds to fix, and as such I don't expect this guide will be able to cover everything. So if you have any questions or you discover something useful that isn't in the guide please leave your questions or comments here.



Getting Ready...

Things you will need:
3DS Max 8 (not 2008)
M3 Plugins for 3DS Max (http://www.sc2mapster.com/assets/m3-export-plugin-3ds-max/files/24-m3-plugins-v1-7b/) (v1.8 doesn't seem to work with 3DS Max 8, so use 1.7b instead)
MPQ Archive Browser/Editor (http://www.zezula.net/en/mpq/download.html)
S2's 3DS Max 8 K2 Model Exporter (http://forums.heroesofnewerth.com/showthread.php?t=23225)
BLP Laboratory (http://www.hiveworkshop.com/forums/tools-560/blp-lab-v0-5-0-a-137599/) (not needed for WoW)
WoW Model Viewer (http://www.wowmodelviewer.org/) (use this one for WoW)

Things you will probably want:
An image editor. I personally use Paint.NET (http://www.getpaint.net/) and GIMP (http://www.gimp.org/about/introduction.html). Both are free to download and use.
Normal map plug-in for GIMP (http://code.google.com/p/gimp-normalmap/) is an easy way to generate normal map textures to add an extra layer of detail to a model.
Notepad++ (http://notepad-plus-plus.org/) is useful for editing the script/text files that HoN uses to define the properties of it's models and textures. It will give you XML syntax highlighting (if you set it up), as well as auto-tabbing and other useful coding stuff.



Step 0. Choosing a model
Before you can import a model, you have to know what it is you're going to import! If you don't already have one in mind, here are some good ways to get some ideas and see your model in action before you import it over to HoN.

0a. World of Warcraft: The best way to find a model from WoW is using the WoW model viewer (link in the above section). You can search for models by name, see them instantly, look through all their animations, and attach weapons and other items to them. It can also export the models into the M3 format which is needed to import them into 3DS Max 8, as the M2 importer doesn't seem work.

http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_wmv_ysera1.jpg

0b. Starcraft II: The best way I've found to look through the models in SC2 is by using the built-in previewer inside the Starcraft 2 Map Editor. To open the Previewer, click on Window > Previewer or press ctrl+shift+V
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/sc2Previewer.jpg

In order to see all the models you will need to create a blank map and add dependencies. To do this, click file->New..., then where it says Dependencies, click the Modify button, then click Add Standard and choose the dependencies you want (or just use all of them). When you click OK it will take a while to load all the assets. Then open up the previewer as stated above (ctrl+shift+V) and look through the models there. Alternatively you can browse/search for units in the terrain editor and then right click their name and click View in Previewer. Don't use anything that starts with SM or StoryMode, as it is meant to be used in cinematics and won't have the animations you would want to use.

http://dl.dropbox.com/u/5534703/model%20import%20tutorial/sc2Editor.jpg

0c. Warcraft III: The only reason I can think of for looking for models from WC3 is to import models from DotA for nostalgia's sake, so you probably already know what it is you want.

Here's a list of DotA Heroes in HoN: http://honwiki.net/wiki/DotA_vs_HoN#Ported_Heroes


Step 1. Getting the Files

1a. World of Warcraft: Alright, back to the WoW Model Viewer (link above). Once you have found the model you want, click on File > Export Model > Export Options....
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_wmv_exptopt.jpg

On the window the opens up, click on the M3 tab. Set the Bound Scale and Sphere scale to 1.0, leave texture path blank, and then select the animations you want to import. I recommend importing most animations, as you won't be able to come back and import more later. However, importing all the animations is usually a bad idea, as there are usually some animations that are broken to begin with (such as some of the emotes), and will cause problems with the model when you try to import. You can continue to mess around with the model in the viewport while this options window is open, so you can see which animations you want or if any are broken (you will definitely be able to tell if an animation is broken). Keep in mind that the animations are sorted by number in this window, while in the default viewing window they are sorted alphabetically.

Once you have all of your animations set, you can click Apply and close that window, then click File > Export Model > M3... and choose where you want to save the model file.
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_wmv_m3exp.jpg

Then click File > Export Textures... and click on Export all to TGA. This will place all relevant texture files into the WoW Model Viewer/Export Directory. Now you should have everything you need and can start importing stuff into 3DS Max![/b]

1b. Starcraft II: To get the files from Starcraft 2 you will need the mpq editor linked in the Getting Ready section. First, make sure you don't have SC2 open as it won't let you access the files if it is. Now, open up the MPQ editor and click File -> Open MPQ, then navigate to your Starcraft 2 directory. There will be two directories here where your model could be located; Campaigns\Liberty.SC2Campaign or Mods\Liberty.SC2Mod. The folder it is in depends on whether your model was only used in single player or if it's a standard multiplayer unit. If you aren't sure where it is, just check one folder and if you don't see it there then try the other one. In each folder you should see a Base.SC2Assets and another one that corresponds to your language. First, open up the base.SC2Assets file (it should be the largest file). After you open the MPQ, first find the model you want by expanding the Assets folder, then the Units folder. You should be able to find the folder you want from there. Once you've navigated to your units folder, you should see a file with a m3 extension. Right click on it and click extract, then choose a location where you want to extract the file.

Now that you have the model, you will want to find the texture that goes with it. You can find all the textures in the Assets -> Textures folder inside base.SC2Assets. Open it up and search for the textures you think go with your model. You can filter through the files by using the File Mask box in the toolbar at the top. You need to use * as a wildcard, so for example, type in *zergling* to get all the textures for a zergling. Be sure you delete the mask after you find what you want or all the other folders will appear to be empty. Once you have the textures extracted, you will need to open them up with a compatible image editor (Paint.NET should work), and then re-save them as tga files.

And finally, sounds. If you want sounds for your unit there are two locations where they could be located. Firstly, for sounds other than speech, simply look in the Assets\Sounds folder in the same MPQ that you found your model. For sounds which are related to a specific language, you will need to open up the MPQ archive for that language (i.e. enUS.SC2Assets) and then look in LocalizedData\sounds. Once you find the sounds you want, just extract them like you did with the model/texture.

1c. Warcraft III: To get the files from Warcraft III you will need the mpq editor linked in the Getting Ready section. First, make sure you don't have WC3 open as it won't let you access the files if it is. Now, open up the MPQ editor and click File -> Open MPQ, then navigate to your Warcraft III directory. Your model will be inside either War3.mpq or War3x.mpq, depending on whether it is an expansion character or an original one. If you don't know which one it is from just try them each one at a time. Once you open the MPQ, you can either manually browse through the files for the unit you want, or click Tools -> Search Files... and search for the unit you want. Once you get to the folder for your unit, there should be two files with a mdx extension. If there isn't then your unit is probably just a re-skin of another model, and you'll have to figure out which one that is. Once you have your model, right click the mdx file that doesn't say portrait and click Extract, then choose a location where you want to extract the file. If you want to, you can extract the sounds now as well if there are any in the folder. Some sounds may be located in War3xLocal.mpq.

Now that you have the model, you will want to find the texture that goes with it. You can find all the textures in the Textures folder inside the MPQ. Open it up and search for the textures you think go with your model. You can filter through the files by using the File Mask box in the toolbar at the top. You need to use * as a wildcard, so for example, type in *arthas* to bring up the texture for Arthas. Be sure you delete the mask after you find what you want or all the other folders will appear to be empty. Once you have the textures you want, extract them like you did with the model. The textures should have a blp extension, but we want tga, so you will need to open up BLP Laboratory (linked in the Getting Started section) and then open and save the textures as TGA files.


Step 2. Importing the Model

2a. WoW & Starcraft II: At this point you should have at least one *.m3 file and one or more textures (*.tga). You will also need to have 3ds max 8 installed and the import scripts (http://www.sc2mapster.com/assets/m3-export-plugin-3ds-max/) downloaded.

Open up 3DS Max and Click on the Utilities tab.
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_util.jpg

Now click on the button labeled MAXScript, then on the button labeled Run Script.
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_script.jpg

Find and open the script you downloaded named m3_import_v0.30.ms. Then you should be able to select "M3 - Import" from the Utilities list just below. Click on it and the Import options should show up below. Click on the button labeled 'Open', then navigate to the m3 file for the model you want to import. Leave all the settings checked, and change the FPS from 1000 to 30. 30 FPS is the default used by HoN, but you will be able to tweak the animation speeds a little bit later if you need to. Now, click on the Import button. You should get a message saying that it couldn't find the textures in the maps directory. Just tell it to import anyways and it should work fine. If you get an error message that there isn't enough scripting memory, try importing again, sometimes it will fix it on its own. If it doesn't, then click on Customize > Preferences..., then select the MAXScript tab and find and modify the Memory field as necessary.

Now you should see your model in grey the viewport, congratz! But there's still a lot of work to do before it is ready to be exported into HoN.


2b. Warcraft III: To import from Warcraft III, follow the same instructions as WoW/SC2 above, however instead of using the M3 Importer you will use the mdx importer from the same package. The script should be called impexpmdx_v2.0.4.ms

If you end up with a bunch of big flat squares on your model, you can select and delete them if you don't think they are needed (left click and press del). Usually these are for static player-colored glows and things that are usually just handled using effects scripts in HoN. But if you do want a glow to be player-colored in HoN, it will need to be a textured part of the model, as effects currently can't change with player color.


Step 3. Fixing stuff

At this point you should have your model imported into 3DS Max 8. You may think that you're almost done, but unfortunately you're really only getting started. There are a lot of things that need to be fixed and added to the model before it is ready to be exported to HoN. The first thing we'll look at is getting the textures back onto the model.

3a. Scale: The first thing we need to do is change the scale of the model to fit properly in HoN's engine. You can tweak the hero's scale after you export it and have it in game, but this will also scale up any effects that play on your hero. So if you were to scale it up 100 times bigger this way, then the effects that play on your hero would be 100 times bigger than on other heroes as well. So, you'll want to get it as close as you can before you export it. Fortunately this is pretty easy to do. Simply press ctrl+A to select all the parts of your model, then right click on the scale button:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_Scale.jpg

You'll need to type in the x y and z scales individually. Generally you want to set the scale to somewhere between 5000-10000. An average sized hero shouldn't be bigger than about half the size of the grid (press G if the grid isn't visible). After you enter the values, close the scaling window and your model should be a lot bigger. Zoom out with the scroll wheel and make sure this didn't screw anything up. Some models that are split up into multiple parts will have their animations break when they are scaled up, and it may not be possible to fix them.




3b. Textures: First, open up the Material Editor:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_mat.jpg

This will bring up a window with a bunch of grey circles on top and Parameter fields below. The Grey circles are the materials which you will create to be applied to the model. Materials are composed of one or more textures (images), along with some paramaters which together describe how the model, or a part of the model, should be colored. There may already be some materials defined here using the Starcraft 2 Material type. You will not be able to use these materials in HoN, so you will have to replace them with new ones.

To create a new material, fist click on one of the empty material slots. The material type should be just to the right of the materials name. If it isn't Standard, click on it and then choose Standard from the list that appears.

Next, choose a diffuse texture. The diffuse texture is the main texture used to define the color of the object. To choose a diffuse texture, first click on this button:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_mat_diff.jpg

Now click on bitmap at the top of the list that appears and then navigate to where you saved your textures in step 1 and pick whichever texture you think is a skin for your model. Your model should already be split into a few pieces and be ready to have the textures wrapped around it, so select the piece or pieces you think the material you made applies to and then click on the 'Assign material' button:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_mat_apply.jpg

The model's color might change a little bit, but you won't be able to see the actual texture on the model unless you click this button:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_mat_show.jpg

Now just repeat this process of creating and applying materials until you have the whole model textured. Note that what you see in the viewport isn't at the full quality of what you will get in-game. To see how the model looks in a higher quality you can press f9 or click the teapot icon to get a quick render of the model, although it still won't be exactly what it will look like in HoN:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_quickrender.jpg

One thing you may notice on some models is that some flat objects like capes will only be visible from one side, but invisible from the other side. To fix this, right click the object and click properties. Then find the box that says 'Backface Cull' and uncheck it and click OK. Now the object should be visible from both sides.

Alright, I think that about covers it for textures. Remember if you have any questions feel free to post them here or PM me and I'll try to get back to you. Now, moving on...


3c. Animations:
To view the imported Animations in 3DS Max, simply go to the Utilities panel on the right side of the screen which you used to import the model, and In the maxScript box click on the Utilities list and select M3 Sequences. This should open up the M3 - Sequences box which has a drop-down box labeled "Select Animation". Select the animation you want to look at, then use the animation controls at the bottom right of the screen to play the animation.

Looping Animations:Animations are usually working pretty well already, but if you're importing from WoW you might have a small issue which is easy to fix. If you are using a WoW model and you select a looping animation, you may notice that the animation doesn't loop correctly. To fix this, simply press ctrl+a to select everything in the scene. This will show you all the keyframes in the animation in the timeline at the bottom of the screen. Hold shift, then click and drag the first keyframe in the animation all the way to the right and drop it onto the last frame in the animation. This will copy the keyframe so that the first and last frame of the animation will be the same, allowing for a smooth transition from start to end. Now play the animation again and if you did it right it should loop correctly.

Warcraft III:Unfortunately the importer for Warcraft III doesn't give any options for FPS, so you will need to change it manually. Even more unfortunately, the M3 Sequences tool doesn't automatically adjust for this, so you will need to go through each animation and change the start and end times. According to 3DS Max the animations import at 960 FPS, and we want them to be 30, so that means the start/end times for all the animations need to be divided by 32 (960/30 = 32). When you divide the times you will usually get a decimal result, so you will have to round it. When you are changingthe start times you will need to round up, and when changing the end times you will need to round down. This is because just before and after the animation, there will be a key frame that sets the model back to it's reference pose. If you round incorrectly then this frame will become part of your animation, which will make your character flip out really fast whenever your animation loops.

Hooray, animations complete! Now it's time for the fun part, bones...

3d. Bones: The goal of this section is to get the bones of your new model to roughly match the bones of the original one so that effects will properly show on your hero. You don't need to copy every single bone over, however there are some bones which are shared amongst all heroes and are used as attachment points for skill and item effects. I'll try to list these bones out here, but you might want to look at the bones on the model of the hero you are replacing for reference. To do this, open up HoN and start up a practice game. Then spawn the hero you want to look at and then press ctrl+F8 to open up the console. Type in these commands: vid_drawbonenames true and vid_drawbones true. You also might want to use the commands ServerPause and ServerUnpause to make it easier to see the bone names. Now just zoom in and try to see the bones and their locations on the model.
List of shared effects bones:
_bone_overhead
_bone_centerofchest
_bone_center
_bone_head
_bone_back
_bone_chest
_bone_lefthand
_bone_righthand
_bone_leftfoot
_bone_rightfoot
Bip01 Head
Bip01 Pelvis
Bip01 Spine
Bip01 Spine1
Bip01 Spine2
Bip01 Neck
Bip01 Head
Bip01 L Clavicle
Bip01 R Clavicle
Bip01 L UpperArm
Bip01 R UpperArm
Bip01 L Forearm
Bip01 R Forearm
Bip01 L Hand
Bip01 R Hand
Bip01 L Thigh
Bip01 R Thigh
Bip01 L Calf
Bip01 R Calf
Bip01 L Foot
Bip01 R Foot
Yeah, that's a lot of bones. If you don't want to take the time to do all of them, I recommend just doing the ones that begin with _bone, as they are used quite often. Now, unfortunately you can't just rename the existing bones on the model, as there are problems with the effects scaling up way bigger than they should. This is due to the effects inheriting the size of the bone they are attached to, and in the process of importing and exporting from one game engine to another, the scaling of bones can get out of whack, and I don't know the proper way to fix it without screwing up the animations. If you just try to resize the bones, then it will shrink the part of the model that uses that bone for animating the model.

So instead, we will have to add attachment points to the model which have no impact on the models animation, and therefore can be resized without screwing anything up. There should be some of these attachment points already, which will show up as green cubes in the viewport. You can use these ones if you want to. First just rename them to one of the bones listed above, then you'll need to change their box size and scale to 1. To change the box size, click on the Modify tab:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_ModifyTab.jpg

Then change the field titled Box Size to 1
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_BoxSize.jpg

To rename them just change the name in the box at the top of any tab.

To change the scale, right click this Icon:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_Scale.jpg

Set the scale to 1 for now. You may need to come back and change this later if effects appear too small or large in-game.

Continue this with all the attachment points on the list which you plan on including with your model. If there isn't already a green box somewhere where you need a it, then you should just copy an existing one and then put it where you need it. You can do this by using the move or translate tool, and holding shift when you drag an existing attachment point, which will create a copy at the new location and leave the original one unchanged. Then rename the new copy and move it to wherever you want it to be.

Once you think you have it where you want it on the model, you will need to link it to the nearest model bone so that it follows the units animations correctly. To do this, first find the nearest model bone to the attachment point you are adding and remember it's name. Now select your attachment point again and click on the Select and Link button:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_Link.jpg

Now press the H key on your keyboard to bring up a list of all objects in the scene. Find the bone you want to link to (you can filter out bones using the check-boxes on the right), select it on the list and then click link in the bottom right.

Now if you right click on your attachment point and click properties, it should show the linked bone in the "Parent" field.

Alright... hardest part is over. Now let's see if we can get this thing into the game.



Step 4: Exporting the Model
Alright, time to export the model into a format that the game can use. The model and each of the animations will be contained in separate files, and each animation will need to be exported one at a time...

~WIP~


4b. Help! My program crashed when I clicked export: This is pretty common, and happens with probably over half of the models I've tried. But fortunately I found a solution which has worked every time for me so far. I don't know why it works, but it does. Be sure to save before you start doing this (you should always be saving pretty often anyways), so that you can start over if things get really messed up.

So I noticed that the crashes during export always occurred when it was "copying skin weights", so I looked around Max for things that looked like they were related to that. I found this thing called the Weight Tool Dialog that lets you do some fancy skin weight stuff that I don't fully understand, but what I do know is that it will magically fix whatever stops the model from exporting. We will need to fix each of the different 'parts' of the model one at a time, which can be seen by pressing H and selecting the Geometry filter on the right. So, to open up the Weight Tool Dialog first select the Modify Tab
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_ModifyTab.jpg
With the Modify Tab open, select a part of the model (by either clicking on it in the viewport, or pressing H and double clicking it), then right click somewhere in the viewport and click on Weight Tool Dialog.
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_weighttool.jpg

Now back on the Modify Tab, click on the big Edit Envelopes button, then press ctrl+A to select all the vertices in the part of the model you have selected. Make sure there are at least 2 bones in the list on the modify tab:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_bonelist.jpg

If there is only one bone, then click Add and pick any other bone at random to add to the list.

Now, select a bone and go back to the weight tool window. Click on the 1 button, then on the 0 button. If it doesn't look right, click on the 1 button again. Once you're done with this, everything should look exactly like it did before you started, but after you do this to each section of the model, it should export correctly.


Step 5: Fixing more stuff
Alright, now you've got your model in the game (hopefully) and you start up a practice match to have a look at it, but when the game starts you notice something doesn't look right. Maybe your model is all white, has a checkerboard skin, looks like a jumbled up ball, isn't visible at all or, or it is simply too dark or lacks detail. Obviously nobody would want to play with something that looks like that, so now we'll try to address some of these problems.

5a. Animations: Parameters regarding animations are located in a hero's mdf file. This file should be copied straight from the hero you are replacing and then modified to use your custom model and animations. If you rearrange or remove any animations in this file, then the game will get confused and your animations will no longer work correctly in online games.

In the mdf file you can change the speed (fps) of your animations, you can make animations loop, and you can tell the game to play special sounds or effects at certain frames of the animation.

-WIP-


5b. Materials: The material file is what holds information about how the game should draw the model. It defines the textures, shaders, and parameters used and can be used and modified to add a lot of detail to your model. You can learn a lot about modifying textures and materials here (http://forums.heroesofnewerth.com/showthread.php?t=59189).

The exporter will give you basic material files for each material but they usually wont look too great and might not even work at all. I recommend starting with a material file from a fairly new hero that has been released, as these usually use the newest shaders and parameters available. However, be sure names of the material files match what they were in the material editor in 3DS Max as that's the only way the model knows which material to use on which parts of the model.

So take an existing material file and open it up with a text editor. Find the lines that say <sampler name="diffuse"> and change the texture on those lines to be the one that your model uses for color. You will probably also want to add a normal map and possibly a team color map which can be generated using GIMP or Photoshop. You can find the normal map plugin for GIMP here: http://code.google.com/p/gimp-normalmap/. The tool will make your normal map for you automagically and usually it gives pretty good results. Using a normal map will make your model look much better. For those who don't know, a normal map (also known as a bump map), is used by the pixel shader to determine the lighting on the model at a specific point by pretending as if the surface of the model is facing a different direction than it actually is. This allows you to add bumps, cracks, and other small details to a model without needing to actually alter the geometry.

A team color map is used to tell the game what parts of the model will be colored with the color of a players slot (blue, pink, orange, brown, etc.). I usually make these by using various tools in GIMP/Paint.NET until I get what I want. A team map should be transparent in all parts that you don't want the players color to appear, and white in places that you do want it. The diffuse/color texture should also be white or gray at these parts so that it is easy to see the tint of the player color.

Well, that's pretty much it. At this point you might want to make some custom effects or work more on the textures. If you need help with anything else or if there's something I missed just let me know so I can add it to the guide. If you need some real-time help you can usually find me on irc at irc.s2games.com channel #honlabs, my nick is either BlacRyu or Vorg.

BlacRyu
03-01-2011, 05:51 PM
Reserved

BlacRyu
03-01-2011, 05:52 PM
Reserved

Yurixy
03-02-2011, 11:07 AM
Nice.
Waiting for this!

Yuichi
03-02-2011, 11:30 AM
Oh sweet this will be interesting :)

DeckardPain
03-04-2011, 03:21 AM
Really want to see more on this.

Veldt
03-04-2011, 06:23 AM
The crowd is anxiously biting their fingernails in anticipation for the final act!

Really appreciate stuff like this

an7hraxjax
03-05-2011, 05:55 AM
impressive ... go on!

DeckardPain
03-08-2011, 12:50 AM
nice, as soon as you finish the part about bones and such, i myself will begin doing models from wow. its actually the only reason ive kept it installed after quitting LOL!

edit: everytime i try to get myself up to where you are at on the tutorial, i can only get this far.
"import failed unknown property: "position" is undefined"
can you tell me where i should be looking to fix this?

this is exactly what im getting:

http://img508.imageshack.us/img508/6428/67340859.jpg

thanks.

Durandal_
03-13-2011, 09:46 PM
Something to help BlacRyu to place in "Getting the Files" For wc3

"Step 1 Download an MPQ editor from this link http://www.zezula.net/en/mpq/download.html"

"Step 2 Use said MPQ editor to extract the files you want, make sure to extract both the model and the textures that work with the model."

BlacRyu
03-15-2011, 04:54 AM
nice, as soon as you finish the part about bones and such, i myself will begin doing models from wow. its actually the only reason ive kept it installed after quitting LOL!

edit: everytime i try to get myself up to where you are at on the tutorial, i can only get this far.
"import failed unknown property: "position" is undefined"
can you tell me where i should be looking to fix this?

this is exactly what im getting:

http://img508.imageshack.us/img508/6428/67340859.jpg

thanks.Do you get that with every model or just with one? Looks like its a problem with the import script. Probably nothing that can be done about that aside from asking for help from the creator here (http://www.sc2mapster.com/assets/m3-export-plugin-3ds-max/). Maybe you can try using an earlier version of the script as well but its unlikely that will work.

DeckardPain
03-15-2011, 07:50 PM
hmm okay.

how about a newer version of 3dsmax itself? would that improve results?

and it was happening with both models i tried unfortunately.

BlacRyu
03-15-2011, 08:24 PM
hmm okay.

how about a newer version of 3dsmax itself? would that improve results?

and it was happening with both models i tried unfortunately.
Maybe, but S2's export script only works with 3DS Max 8 for now. I guess you can try importing using a newer version and then exporting using Max 8 if it will let you.

EDIT: Ok it looks like maybe the new scripts don't work with 3DS Max 8, so use v1.7b of the import scripts (http://www.sc2mapster.com/assets/m3-export-plugin-3ds-max/files/24-m3-plugins-v1-7b/).

Sixerzi
03-16-2011, 05:17 PM
I hope you are done soon, I am waiting impatiently for the next part xD, good work so far though. :)

DeckardPain
03-17-2011, 11:04 PM
ok now that ive got the scripts ryu linked me i can get my model inside 3dsmax, but now im lost at this part:

"Now click on bitmap at the top of the list that appears and then navigate to where you saved your textures in step 1 and pick whichever texture you think is a skin for your model. Your model should already be split into a few pieces and be ready to have the textures wrapped around it, so select the piece or pieces you think the material you made applies to and then click on the 'Assign material' button:"

I'm not seeing anywhere the word bitmap or any option for bitmap. (im not very adept with 3dsmax yet, sorry)

where is it under or what am i looking for exactly?

BlacRyu
03-18-2011, 12:50 AM
ok now that ive got the scripts ryu linked me i can get my model inside 3dsmax, but now im lost at this part:

"Now click on bitmap at the top of the list that appears and then navigate to where you saved your textures in step 1 and pick whichever texture you think is a skin for your model. Your model should already be split into a few pieces and be ready to have the textures wrapped around it, so select the piece or pieces you think the material you made applies to and then click on the 'Assign material' button:"

I'm not seeing anywhere the word bitmap or any option for bitmap. (im not very adept with 3dsmax yet, sorry)

where is it under or what am i looking for exactly?
Sorry I had the wrong picture there. Here's the button you want:
http://dl.dropbox.com/u/5534703/model%20import%20tutorial/hontut_max_mat_diff.jpg

DeckardPain
03-18-2011, 07:04 PM
ok so far i got it all working. just need to start on the bones section.

i attached a weapon before exporting it from the wow model viewer, and i dont know how to get it to reappear in 3dsmax.
in the wow model viewer i loaded the sylvanas windrunner model, attached a bow, and exported the model.

any ideas as to why a weapon isnt showing up in 3dsmax?

BlacRyu
03-29-2011, 08:02 PM
ok so far i got it all working. just need to start on the bones section.

i attached a weapon before exporting it from the wow model viewer, and i dont know how to get it to reappear in 3dsmax.
in the wow model viewer i loaded the sylvanas windrunner model, attached a bow, and exported the model.

any ideas as to why a weapon isnt showing up in 3dsmax?
Weapons should be imported/exported separately and attached via effects. There should already be a reference bone on the model that you can use to attach weapons.

Yurixy
03-30-2011, 11:08 AM
thx for update this thread :)

Rean
04-03-2011, 03:57 AM
stuck at exporting,waiting for guide to be finished.
this is just awesome, Blacryu for president

MaxGhost
04-03-2011, 11:48 AM
Nice! I had figured this stuff out around 2 years ago and made a thread about my progress on getting the WC3 Orc Grunt into HoN (just for fun). I was able to use an old max 6 WC3 model imported and get it into max 8 afterwards. When I tried to export, it crashed, and made me sad.

Rean
04-04-2011, 07:28 AM
i converted sc2 mesh to editable mesh, and when i reapply skin modifier (modifier -> animation -> skin) and add all bones, they dont seem to work properly at all.

its the fail way by default or i am doing something wrong?

add:

sc2 Imported models come mostly as one object, with edit mesh modifier and skin modifier for animation. Skin modifier is on top of edit mesh, so any changes to the mesh would result in loss of animation info.
:sadface:

Rean
04-05-2011, 03:20 PM
nvm fixed!

Yurixy
04-05-2011, 07:32 PM
Thank you for the updates!

Yurixy
04-13-2011, 12:56 PM
bump for easy locate

techno4229
04-19-2011, 11:45 PM
is there a place were you get the textures :D

techno4229
04-20-2011, 02:37 AM
start the export please :D

Tony`
06-10-2011, 08:00 AM
So you can only get models from those three games?

Rean
06-10-2011, 08:59 AM
guide is valid for other games too. the only difference is how u obtain files from games and import them in 3dsmax.
after model is imported in max process is the same no matter from what game u've obtained them
(texturing->exporting model+animation)

the main problem is to find a way to export model,textures and animations u want from original game.

Dazius
06-18-2011, 10:51 PM
Wow, this guide is just what I needed :D, thanks a lot blacRyu :D.

I was already on the process of importing the model of the Raynor Marine unit but after I import it to 3ds Max the animations are all jumbled up and weird :S. I was using the 1.8 scripts when I imported it so I thought that must be it so I changed all scripts/plugins for 1.7b but it's still the same T.T.

Ultimately, I started working on my own animation by converting the model into an editable mesh and making a CAT object rig for it, there was one called marine in the list don't know if it came with the starcraft plugin but it seemed to fit quite well the model I wanted to use it on. Anyway I would like some help with the issue if not I guess I'll just finish doing it by myself but I'm also kinda stuck on that: I'm all done except for the weapon, I can't find the guns model anywhere so I'm not sure if I should animate the weapon as part of the model making some extra bones or something weird for it or keep looking for the gun's model file.

Any help would be appreciated, thanks.

BlacRyu
06-19-2011, 02:18 PM
Wow, this guide is just what I needed :D, thanks a lot blacRyu :D.

I was already on the process of importing the model of the Raynor Marine unit but after I import it to 3ds Max the animations are all jumbled up and weird :S. I was using the 1.8 scripts when I imported it so I thought that must be it so I changed all scripts/plugins for 1.7b but it's still the same T.T.

Ultimately, I started working on my own animation by converting the model into an editable mesh and making a CAT object rig for it, there was one called marine in the list don't know if it came with the starcraft plugin but it seemed to fit quite well the model I wanted to use it on. Anyway I would like some help with the issue if not I guess I'll just finish doing it by myself but I'm also kinda stuck on that: I'm all done except for the weapon, I can't find the guns model anywhere so I'm not sure if I should animate the weapon as part of the model making some extra bones or something weird for it or keep looking for the gun's model file.

Any help would be appreciated, thanks.
Hmm I'm not sure, I just tried importing it and the animations looked fine. Are you using Max 8? Are you trying to import the story mode character? Did you import two things in a row without resetting the program?

Dazius
06-19-2011, 10:30 PM
well, I'm using 3ds max design 2011.

For the second question I'm using a unit from the campaign It's Jim Raynor in his marine suit though I'm not sure if by story mode you mean the models appearing in the cinematics or the campaign's units.

And last I remember the first thing I imported was that unit and it came already like that. though I did it again a few times and also resetted the program another few.
So, is this only working for 3ds max 8??

BlacRyu
06-19-2011, 11:21 PM
well, I'm using 3ds max design 2011.

For the second question I'm using a unit from the campaign It's Jim Raynor in his marine suit though I'm not sure if by story mode you mean the models appearing in the cinematics or the campaign's units.

And last I remember the first thing I imported was that unit and it came already like that. though I did it again a few times and also resetted the program another few.
So, is this only working for 3ds max 8??
I tried 2011 and had some issues with it so I've stuck with Max 8, that might be the problem. And yeah models labeled SM or story mode are used in cinematics and I wouldn't try to import any of them since they're split up into multiple files.
I saved Marine Raynor to a Max 8 scene, you can see if it works for you in 2011: MarineRaynor.max (http://dl.dropbox.com/u/5534703/MarineRaynor.max)

Dazius
06-20-2011, 12:31 AM
Ok, downloading. thanks a lot BlacRyu. owe ya lot for this :D.

Dazius
06-24-2011, 01:02 PM
ok, so I downloaded 3ds max 2008 and imported the models everything fine up until there but the exporter isn't loading... it says it isn't made for that program :S.

EDIT:
"DLL <C:\Program Files\Autodesk\3ds max
2008\plugins\s2exporter.dlu>
is not made for this program - not loading"

to be more exact.

+EDIT: PS: please tell me 3ds max 8 IS 3ds max 2008 T.T...

BlacRyu
06-24-2011, 04:46 PM
+EDIT: PS: please tell me 3ds max 8 IS 3ds max 2008 T.T...
Sorry...

Dazius
06-24-2011, 11:37 PM
*sigh* nvm, back to searching and downloading... btw what year's max is it then?

EDIT: even better do you have a spare link around so I can download the correct Max at last? xD.

Dazius
06-26-2011, 09:41 PM
Scratch all that, I'm back on track. Just to clarify when you say to select the geometry filter you mean DE-select it right, 'cause in the filters list they're are all already checked.

EDIT: I'm once again ready to export but it crashes like how you mentioned in the guide but I've done it all right I think. There must be some small mistake or something I'm missing. :S, what can it be? T.T

BlacRyu
06-27-2011, 12:24 AM
Scratch all that, I'm back on track. Just to clarify when you say to select the geometry filter you mean DE-select it right, 'cause in the filters list they're are all already checked.

EDIT: I'm once again ready to export but it crashes like how you mentioned in the guide but I've done it all right I think. There must be some small mistake or something I'm missing. :S, what can it be? T.T
I meant to select only the geometry filter and deselect all the others. When the exporter crashes you should be able to see what it was trying to do at the point of the crash. If it was 'copying skin weights' then look at what part of the model it was working on and use the method I posted about to fix it. If it was doing something else then I'm not sure what the problem/solution is.

Dazius
06-27-2011, 02:02 PM
Found it, in the guide you said you had to add a bone if there was only one, thing was the head was just one bone so I added another bone to do the 0 1 switch, but then after I finished I took out the bone. Thx a lot for all the help.

EDIT:
So take an existing material file and open it up with a text editor. Find the lines that say <sampler name="diffuse"> and change the texture on those lines to be the one that your model uses for color. The texture that appears in the material.material file is a .tga does that mean that we must save our textures in a .tga format too?.

EDIT+: and another thing after I changed the skin's weight the animations messed up again, is that normal?

BlacRyu
06-27-2011, 11:04 PM
Found it, in the guide you said you had to add a bone if there was only one, thing was the head was just one bone so I added another bone to do the 0 1 switch, but then after I finished I took out the bone. Thx a lot for all the help.

EDIT: The texture that appears in the material.material file is a .tga does that mean that we must save our textures in a .tga format too?.

EDIT+: and another thing after I changed the skin's weight the animations messed up again, is that normal?
I use tga's but other formats might work as well.

No the animations shouldn't be messed up, how exactly are they messed up?

Dazius
06-28-2011, 01:07 AM
Nvm all that. I'm almost done now but I got the invisible hero problem. I made a resources.s2z zip for him. and included a folder in textures.s2z. Placed all the right texture files there. but still nothing... although I got the Icon working.

add: lol sorry didn't see your post there, thanks for the response.

DentMan06
06-29-2011, 08:26 PM
I REALLY could use some help. I've followed this tutorial step by step and I'm having a couple of issues. A picture is included to show these issues. Please help fill my noob ass in :D

1) I went through and checked all of the animations in WoW Model Viewer to see if they were "broken." Even so, once the model is imported into 3DS Max, there are extra hands below the model (circled in the picture). Is this normal? Can I simply just delete them?

2) Also, when the model is imported to 3DS Max 8, what is up with all the white lines everywhere? I'm assuming they are part of the bone structure perhaps?

THANKS in advance!

http://i55.photobucket.com/albums/g134/DentMan06/3dsmaxWTF.png

BlacRyu
06-29-2011, 10:14 PM
I REALLY could use some help. I've followed this tutorial step by step and I'm having a couple of issues. A picture is included to show these issues. Please help fill my noob ass in :D

1) I went through and checked all of the animations in WoW Model Viewer to see if they were "broken." Even so, once the model is imported into 3DS Max, there are extra hands below the model (circled in the picture). Is this normal? Can I simply just delete them?

2) Also, when the model is imported to 3DS Max 8, what is up with all the white lines everywhere? I'm assuming they are part of the bone structure perhaps?

THANKS in advance!

http://i55.photobucket.com/albums/g134/DentMan06/3dsmaxWTF.png
You can delete any extra geometry just fine. They are usually used for special animations like death gibs and stuff, or for static effects like glows. These things are usually handled by effects in HoN.

The white lines/boxes can be ignored, they're just in the editor and have to do with the fact that you are scaling things up so much from normal. There's probably a setting to make them hidden in Max if they bother you but I don't know what it is.

DentMan06
06-29-2011, 11:09 PM
These things are usually handled by effects in HoN.

So that leads me to another question or two.... First, does the statement you made mean that if I were to see a model in WoW Model Viewer that happened to have a glow or other special effect, that it would show up in HoN after importation?

Also, as far as armor AND weapons go, do you wait until after you've imported the plain model you want and then do it afterward in another step? I'm trying to figure out what would be the best way to do it. On one hand it would be much simpler to import the model with the armor already, on the other hand, it would probably make the process more complicated?

Anyway, thanks for all your help. I'm really wanting to get learn this thoroughly so that I can start pumping out some cool stuff for the community.

BlacRyu
06-30-2011, 01:07 AM
So that leads me to another question or two.... First, does the statement you made mean that if I were to see a model in WoW Model Viewer that happened to have a glow or other special effect, that it would show up in HoN after importation?

Also, as far as armor AND weapons go, do you wait until after you've imported the plain model you want and then do it afterward in another step? I'm trying to figure out what would be the best way to do it. On one hand it would be much simpler to import the model with the armor already, on the other hand, it would probably make the process more complicated?

Anyway, thanks for all your help. I'm really wanting to get learn this thoroughly so that I can start pumping out some cool stuff for the community.
Effects can't be directly ported. If there are static glows or things built-in to the model I suppose you can leave them in and mess with the material file to get them to look right. I tried to do this with the smoke on Arthas' eyes and I couldn't get it to look exactly like it did originally, but it ended up alright. The only real reason/benefit to have an effect built into a hero like this is that you could make it change with the players team color. Currently there is no way to have scripted effects on a hero change with the players color.

As for armor and weapons, I export them separately and then attach them to the hero using effects files. The bones that things will attach to are already there, so at the most you'll just have to toy around with scale and rotation. Effects files are easy to work with and you can learn how to use them just by looking at ones that already exist. Every hero has a passive effect which is played at all times, you can tell the game which effect to use by opening up the hero's entity file and changing the line that says passiveeffect="*****.effect"



Nvm all that. I'm almost done now but I got the invisible hero problem. I made a resources.s2z zip for him. and included a folder in textures.s2z. Placed all the right texture files there. but still nothing... although I got the Icon working.

add: lol sorry didn't see your post there, thanks for the response.
You shouldn't be modifying the original s2z files at all. You don't even need to make an s2z file when you are working on your mod, in fact it makes it harder. Just place the files in your game folder using the same folder structure as in resources0.s2z (ie: Heroes of Newerth/game/heroes/*****/)

Once you have the stuff there open the game, then type host_dynamicresreload true into the console. Then you can change stuff that isn't working right and the game will automatically reload it whenever you save your changes. This works best for text files, larger things like textures can have problems as the game tries to load them before the image editor can finish saving them.

ReDsKiN
07-12-2011, 01:35 AM
Just a note,these M3 plugins don't work for 3ds Max 2011 (if not already stated before). It imports fine but does not export properly, crashing the program.

Malaevalos
07-18-2011, 03:02 PM
can some1 say which blp is razor? couldnt find

ReDsKiN
07-18-2011, 10:14 PM
can some1 say which blp is razor? couldnt find
Pretty sure it's Revenent, look under Units>Creeps>Revenant.

RaiZa_
09-07-2011, 12:03 PM
Well I tried it with the model of Spectre from WC3 but I keep get an error msg...

http://s7.directupload.net/file/d/2640/rvpdnhvl_png.htm

Hope someone can help meT_T

BlacRyu
09-07-2011, 07:24 PM
Well I tried it with the model of Spectre from WC3 but I keep get an error msg...

http://s7.directupload.net/file/d/2640/rvpdnhvl_png.htm

Hope someone can help meT_TYou should be using 3DS Max 8, not 2010 and not 2008.

Veldt
09-07-2011, 10:33 PM
2010 works fine, use the warden model instead of spirit of vengeance since that one obviously doesnt work (theyre the same anyway)

RaiZa_
09-08-2011, 07:03 AM
The warden model worked but I think im too stupid to get it work.. The model is always getting purple or pink instead of black.
Veldt couldn't you do that since you know how it does work=.=

Rorschak
09-30-2011, 06:53 PM
where is _bone_overhead, _bone ,etc.. ?¿??¿? :S

Rorschak
09-30-2011, 07:30 PM
i can't do the step 3 > bones :(.

more info pls.

Rorschak
10-15-2011, 02:39 PM
video tutorial pls for step 3 ,4 and 5 xD.

Schyler
10-19-2011, 12:40 AM
Can somebody try and export SC2 Banshee for me? I tried and failed, with both 3DS Max 8, 12 and 14 (all threw fatal errors on the S2 Export part of the script).

BlacRyu
10-19-2011, 01:01 AM
Can somebody try and export SC2 Banshee for me? I tried and failed, with both 3DS Max 8, 12 and 14 (all threw fatal errors on the S2 Export part of the script).
Did you try the fix in section 4b?

GrapeATL
10-26-2011, 01:07 AM
You completely lost me after exporting the model. All my things are properly exported, how do I substitute that for an existing heroes files/where do you find the hero files at?

BlacRyu
10-29-2011, 05:48 AM
You completely lost me after exporting the model. All my things are properly exported, how do I substitute that for an existing heroes files/where do you find the hero files at?
Existing files are located in Program Files/Heroes of Newerth/game/resources0.s2z
You can open it up with 7zip (free) or any other archiving program. s2z is another name for zip.

To replace a hero model you go to the same game folder as above and create a new folder named "heroes". Then inside that place a folder with the name of the hero you are replacing (ie: chronos). In the end you should have the same file structure as what you find in resources0.s2z. Then extract the model.mdf from the hero's folder in resources0.s2z into the identical folder you created. Open it up with notepad and change the line at the top that says model="oldmodel.model" with model="newmodel.model", where newmodel is whatever you exported your model as. Then replace the animations with any clips that you exported for your model (you'll need at least one animation to see your model). Now open up the game and you should be good to go.

GrapeATL
10-29-2011, 06:08 PM
Snip
You are my lord and master, thanks a million.
This model stuff isn't that hard after all. D;

edoitachi
11-08-2011, 08:30 AM
I can't get the model into the game, i have no idea why... :/

My model.model is increadibly big compared to others. Its 558kb.

GrapeATL
11-10-2011, 09:34 PM
I can't get the model into the game, i have no idea why... :/

My model.model is increadibly big compared to others. Its 558kb.
It's fine if that file is big. Are you renaming the mdf file to the name of your heroes model?

edoitachi
11-11-2011, 05:45 PM
I can see the Hat only... -.-

And hes running backwards... This is just making me insane.

lyk4ntrophi3
01-10-2012, 11:56 AM
hey guyz

i'm rlly interested in importing wow models into 3ds max but i have a huge problem :c when i try to import a m3 model via the script no error messages appear but after finish loading there is only one pyramide in the scene. i first tried it in 3ds max 2010 and it worked well 1 time. after importing a model for the first time it didnt work anymore -.-

here is an picture of my problem after loading: http://imageshack.us/f/600/3dsmax12m3error.png/

big thx lyk4nthopi3

p.s. sry for my bad english

Maskovsky
01-19-2012, 01:47 PM
Im all done, just my export is crashing my program z.z. Anyways this guide is great. Really easy to understand and all. ^^

Aoshii
01-31-2012, 12:00 PM
Just a question guys, is it possible to fix this? or i better just leave it?
http://s15.postimage.org/oglgxedcb/kingymironmesh.jpg

ErDiaulo
03-04-2012, 12:59 PM
Hi all I'm new to editing and I'm using this guide trying to import a WC3 hero. I can easily do all the fases until animations. in the model I'm trying to import the animation are really slow in some cases and at normal speed in some other cases I don't know wich command use for set timing in a right way may someone help???

p.s. the model I'm trying to import is the HeroPitlord.mdx

RCMP
08-10-2012, 12:09 PM
Awesome, I think I will try my hand at getting a Deathwing skin for Draconis. I don't think I will succeed but I will sit here for an hour or so trying to absorb this information and have a go at it lol