- Joined
- Jun 17, 2023
- Messages
- 91
New modern guide on porting Heroes of the Storm models/animations to Warcraft 3. Intended for power users who can troubleshoot minor issues on their own. Will likely work for any M3 Starcraft models as well.
Many of the HoTS heroes and minions have already been ported. Check the Hive, Goblin Academy, WCUnderground, and any other model site before wasting your time porting redundant models.
Tools
Workflow summary:
Stage 1 - Export Model Data from CASCView
Stage 2 - Model Processing - Import into Blender and Export as .mdl
1 - Import the .m3a (animation file) first
File -> Import -> Starcraft 2 Model / Animation
Note some simpler models may not have an additional m3a file required. Minions or Creeps commonly do not have an .m3a file, their animations are baked into the .m3.
2 - Import the .m3 without any animations. Pick the Import Preset ModeMesh, vertex groups & materials.
NOTE - If the model did not come with a .m3a file then you can import the .m3 with animations. Pick the Import Preset Mode Everything.
3 - For every mesh imported add an armature modifier (blue spanner icon) and select the Armature from the Object drop down menu. The armature should have imported when you imported the .m3a file. For models without a separate .m3a file this step is not necessary and this modifier will already exist upon import.
4 - Transform the armature (bones) if it does not line up with the model and the animations look wrong. Use animation preview to fine tune this step. In blender 3.4.0 - Select the Armature, clicking the Orange Box icon (Object Properties) and messing with the location fields until the animations look good. In many cases this step is not necessary.
5 - Make the mesh and armature face the X axis. On the default view of blender the model will be facing toward you.
The global rotate in Layout view is good for rotating everything for export purposes. Click and hold the Z rotation axis. Type in 90 while holding the mouse to rotate exactly 90 degrees. Make sure the Armature and Mesh are both selected when completing this step.
6 - Set Blender to modeling view. The Meshs and Armature Object need to be in T-Pose prior to export.
If your animations look great in Blender and off in your WC3 model editing program this issue is probably why. A telltale sign is the model isn't its T-Pose after export or the bones are otherwise misaligned with the mesh.
7 - Export from Blender
File -> Export -> Warcraft 3 MDL (.mdl)
Selected Objects OFF, 60 Scale (Not 0.60), Y Forward, Z Up, Optimize Keyframes OFF, Demote Bones to Helpers ON, Use Actions ON, Use SkinWeights OFF.
Export MDL
Another cause of animation issues is checking Optimize Keyframes when exporting.
Stage 3 - Texture Processing - Photoshop Process the Specular, Normal, and Diffuse textures
Stage 3a - Texture Processing - Photoshop Add Teamcolor Alpha Channel
The steps below were required in the past but appear to be unnecessary now.
Blender Model Processing - Assign meshes to materials.
Check the mesh is assigned to a material. In Layout view in Blender select each mesh and click Material Properties (Red Sphere Icon) on the right. Under the MDL Material Settings section click the Plus sign to add a dummy material to each mesh. This step is required for the model to open in Twilac's Retera's Model Studio. If you're using the June 16th, 2023 or newer build of mdl-exporter this step may not be required. Looks like Twilac has programmed auto mapping the materials based on the m3 file's data.
Blender Model Processing - Populating Warcraft 3 Sequences
You don't have to repeatedly export the model for each animation you want to use. You can copy and paste the frames (the little dots) from each action into a singular master action. Mark the start and end of each animation with a marker and rename both markers to the name of the animation. I spaced each animation by 10 frames just to make it easier to differentiate each one. If you did it right you should see the animation appear in the Warcraft 3 Sequences section of the scene menu in blender.
Many of the HoTS heroes and minions have already been ported. Check the Hive, Goblin Academy, WCUnderground, and any other model site before wasting your time porting redundant models.
Tools
- CASCView Casc Storages - Main page
- Blender 3.4.0 Index of /release/Blender3.4/
- M3 addon GitHub - SC2Mapster/m3addon: Blender Addon to import and export m3 files
- Photoshop with .dds Nvidia Texture plugin. Texture Tools Exporter
- TME = Twilac's mdl exporter GitHub - tw1lac/mdl-exporter: Warcraft MDL exporter for Blender
- TRMS = Twilac's Retera's Model Studio (RMS_Twi_Truly3d_06_d) RMS Twilac Edition #TwilacsTruly3D v06
Workflow summary:
- CascView - Obtain the HoTS model, animation, textures
- Blender - Import and Export in WC3 compatible format the HoTS model + animations.
- Photoshop (or GIMP) - Merge diff/emis/norm textures for SD usage and draw teamcolor alpha channel
- TRMS - Import Blender exported model, check for quality map textures, complete all tweaks and finishing work to model.
Stage 1 - Export Model Data from CASCView
- File -> Open Online Storage
- Heroes of the Storm / hero / us eu cn kr tw sg
- Export the model (.m3), animations (.m3a), and textures (.dds) into the same folder.
- Note some simpler models may not have an additional m3a file required.
- Models are located in mods\heroes.stormmod\base.stormassets\assets\units
- Export the .m3 file
- Animations are usually stored in the same parent folder as the model with the suffix _requiredanim.
- Export the .m3a file
- Textures are located in mods\heroes.stormmod\base.stormassets\assets\textures
- _diff, _emis, _norm, and _spec .dss files should all be exported even when porting for SD use.
- .lvl0 files are not needed.
- diff, norm, and spec will be combined into one texture and set as Blend mode in TRMS.
- emis will be added in TRMS to a stack of 3 layers (teamcolor, combined texture, emissive) comprising a material
Stage 2 - Model Processing - Import into Blender and Export as .mdl
1 - Import the .m3a (animation file) first
File -> Import -> Starcraft 2 Model / Animation
Note some simpler models may not have an additional m3a file required. Minions or Creeps commonly do not have an .m3a file, their animations are baked into the .m3.
2 - Import the .m3 without any animations. Pick the Import Preset ModeMesh, vertex groups & materials.
NOTE - If the model did not come with a .m3a file then you can import the .m3 with animations. Pick the Import Preset Mode Everything.
3 - For every mesh imported add an armature modifier (blue spanner icon) and select the Armature from the Object drop down menu. The armature should have imported when you imported the .m3a file. For models without a separate .m3a file this step is not necessary and this modifier will already exist upon import.
4 - Transform the armature (bones) if it does not line up with the model and the animations look wrong. Use animation preview to fine tune this step. In blender 3.4.0 - Select the Armature, clicking the Orange Box icon (Object Properties) and messing with the location fields until the animations look good. In many cases this step is not necessary.
5 - Make the mesh and armature face the X axis. On the default view of blender the model will be facing toward you.
The global rotate in Layout view is good for rotating everything for export purposes. Click and hold the Z rotation axis. Type in 90 while holding the mouse to rotate exactly 90 degrees. Make sure the Armature and Mesh are both selected when completing this step.
6 - Set Blender to modeling view. The Meshs and Armature Object need to be in T-Pose prior to export.
If your animations look great in Blender and off in your WC3 model editing program this issue is probably why. A telltale sign is the model isn't its T-Pose after export or the bones are otherwise misaligned with the mesh.
7 - Export from Blender
File -> Export -> Warcraft 3 MDL (.mdl)
Selected Objects OFF, 60 Scale (Not 0.60), Y Forward, Z Up, Optimize Keyframes OFF, Demote Bones to Helpers ON, Use Actions ON, Use SkinWeights OFF.
Export MDL
Another cause of animation issues is checking Optimize Keyframes when exporting.
Stage 3 - Texture Processing - Photoshop Process the Specular, Normal, and Diffuse textures
- Import the diff, norm, and spec textures into an image editor like Photoshop.
- Layer 1 Specular texture in color dodge mode
- Layer 2 Normal texture converted to black and white in overlay mode
- Layer 3 Diffuse texture unmodified
- Merge all 3 layers.
- Export as .dds in DXT5 format
Stage 3a - Texture Processing - Photoshop Add Teamcolor Alpha Channel
- Create an alpha channel and fill it with 100% white. If an alpha channel already exists then fill it with 100% white.
- Select the area on the image you want to be teamcolored
- Copy the selection and paste it as a new layer twice.
- Convert one copy layer to grayscale or black & white and then invert it so the colors are inverted.
- Select the inverted layer and paste it into the alpha channel
- Hide or delete the inverted layer. Do not hide or delete the alpha channel.
- Select your second copy layer and fill it with black
- Modify with the brightness and contrast of the alpha channel to determine how bright/dark the Teamcolor will be
- The alpha channel should have a deep rich color with the shading and detail of the area clearly visible.
- A darker teamcolor will appear as a deeper color.
- 3 Layers - 1 Material - Teamcolor (ReplaceableID1), Combined Texture (See Stage 3), Emissive
- Teamcolor should be on top of the texture in the material. Use no mode or additive depending on the style of the TC you want (transparent or solid)
- Combined Texture should set to filter mode blend.
- Emissive texture set to filter mode AddAlpha.
- If your emissive texture is completely black it can be deleted and not mapped to the model.
The steps below were required in the past but appear to be unnecessary now.
Blender Model Processing - Assign meshes to materials.
Check the mesh is assigned to a material. In Layout view in Blender select each mesh and click Material Properties (Red Sphere Icon) on the right. Under the MDL Material Settings section click the Plus sign to add a dummy material to each mesh. This step is required for the model to open in Twilac's Retera's Model Studio. If you're using the June 16th, 2023 or newer build of mdl-exporter this step may not be required. Looks like Twilac has programmed auto mapping the materials based on the m3 file's data.
Blender Model Processing - Populating Warcraft 3 Sequences
You don't have to repeatedly export the model for each animation you want to use. You can copy and paste the frames (the little dots) from each action into a singular master action. Mark the start and end of each animation with a marker and rename both markers to the name of the animation. I spaced each animation by 10 frames just to make it easier to differentiate each one. If you did it right you should see the animation appear in the Warcraft 3 Sequences section of the scene menu in blender.
Last edited: