• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Helpful Import MDX into Blender 2.79 Addon

Status
Not open for further replies.
Level 9
Joined
Jul 22, 2010
Messages
32
Hey Everyone! After searching far and wide for something that could do this, I'd finally come across a super helpful addon for Blender 2.79 that allows a very comprehensive import of an MDX file that appears to include everything from mesh, UV, rig/animations and even other nodes like attachment points. After having found broken importers that could partially do one thing, I was surprised to find one that did it all. The only con is that it isn't compatible with Blender 2.8+, but that's not too bad because you can import through 2.79 and just save to a .Blend file to open in 2.8+.

Since I did not find this on HIVE, I figure I'd post it here for anyone else looking here for something like this. Between this and Fingolfin's MDL exporter (Exporting models from Blender using the MDL exporter plugin) we now finally have the ability to fully export and fully reimport models to and from Warcraft 3 via Blender. It's about time haha!


Here is the link to this addon:

PavelBlend/Blender_WarCraft-3

Or if for some reason this link stops working, I can upload my copy.

Have fun modding my friends! :D
 
Level 9
Joined
Jul 22, 2010
Messages
32
Actually it does! Mostly... and under certain conditions... It does not work with Reforged models in their current format. But if you use the experimental feature in Reterra's Model Studio to convert the HD > SD model under the Scripts tab. It does actually make it importable into Blender 2.79! And it seems to retain everything! Except animation fidelity... hahaha (see 2nd screenshot below). It retains the mesh, the rig, the UV's (though you do need to reassign them with their file, the DDS file works) and animations. It's just... not all there... xD But nonetheless I honestly didn't expect that to work! That's still exciting because we don't necessarily need the in game animations as long as we have the rig (though I haven't tested if custom animations break it).

Another interesting thing I found out is apparently these models have skeletons in them!

Peasant Good.PNG

Peasant Bad.PNG

Skeleton.PNG
 
Level 9
Joined
Jul 22, 2010
Messages
32
After some more experimenting... (I saved the 2.79 project to work on it in 2.82a) it looks like most of the animation problems are correctable. For example, the Blood Mage had no issues aside from having his spine not follow his pelvis. I corrected this by applying a bone constraint onto the main spine bone which happened to be spine_02_bind_int (see below) to this connector bone called bone_turret which was in his pelvis and using the mix: Before Original and the Space: Local With Parent <> Local With Parent. This seems to have corrected him entirely thus making his model entirely moddable and probably even able to reimport into classic War 3 haha.

Some other models are not so lucky though. The peasant, as I first showed you, has this same spine issue in addition to a couple others. The deal with his face is fixable by correcting an odd weight deformation. For some reason there are several vertices that decided they want the 3rd left finger bone to also influence them. So you can go in the Weight Paint mode while the main peasant object is selected and scroll through the bones in the Context Data list at the bottom right (click the little green upside down triangle icon to see that) and find the bone where you see the color gradients affecting vertices it shouldn't to determine which bones have how much influence over the depicted areas of color. Use the Paint tool on the right panel of the 3D view and set it to subtract instead of add in order to uncolor/dissociate the wonky vertices and they should move back into place.

On top of that though, I noticed the peasant was also just straight up missing a bone in his right arm also. Worker models have always had a bunch of weird anomalies. But with these corrections, I expect nearly the entire game's set of models are fully editable. There will likely need to be some more experimentation before claiming everything is possible. But at this point it sure looks like anything is possible! :D

Oh also, for ease of access here is a link to Retera's model Studio: Retera Model Studio Reforged Hack

Make sure to grab the most recent version (check the date sequence in the ZIP file's name, it's usually the bottom most file on the first message).


Working.PNG
 
Level 20
Joined
Apr 12, 2018
Messages
494
The spine and pelvis not being connected isn't a mistake so much as a conscious choice so the walk cycle and upper body can act independent from each other. Warcraft 3 doesn't really use this so much, but it is used on other games (such as using a spell animation while walking in WoW)
 
Level 11
Joined
Jul 4, 2016
Messages
626
Thanks for finding this, I don't have to do the tedious method of utilziing gmax to convert models to use in blender anymore.
 
Level 9
Joined
Jul 22, 2010
Messages
32
Hmm, I followed your same steps and mine worked okay. The only difference I can see is that your version says 2.79 and mine says 2.79.1, I wonder if there was a small bug fixing patch that could affect compatibility.

If not that, the only other thing I can think of is if you accidentally put the 2.8 version into a ZIP instead of the 2.79

Here is a link to the last release of 2.79b before it went to 2.8 if you'd like to try this version: https://download.blender.org/release/Blender2.79/blender-2.79b-windows64.zip
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
The spine and pelvis not being connected isn't a mistake so much as a conscious choice so the walk cycle and upper body can act independent from each other. Warcraft 3 doesn't really use this so much, but it is used on other games (such as using a spell animation while walking in WoW)
Wait so if the new Models have this this means that Reforged supports this internally, right?

So I can turn upper bodies independently to lower bodies.
Is there a new function for this? I cant just play a spell animation while a unit is walking so far. But there might be a way to do that if models are designed for it?

I am very interested in learning about this feature.
 
Level 12
Joined
Jan 30, 2020
Messages
875
You guys seem to all know a billion more things than me about modeling.

But as for using upper and lower bodies, I guess it already existed in Classic WC3 with models like the Ancient Protector.
As for playing a spell or attacking while moving, I believe it is still impossible with Reforged.

There is no native that allows any of these two to work, but I suppose for the first, it is managed directly by the model's animations themselves.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
You guys seem to all know a billion more things than me about modeling.

But as for using upper and lower bodies, I guess it already existed in Classic WC3 with models like the Ancient Protector.
As for playing a spell or attacking while moving, I believe it is still impossible with Reforged.

There is no native that allows any of these two to work, but I suppose for the first, it is managed directly by the model's animations themselves.
There is SetUnitFaceAt which turns the head bone exclusively. Towers have a turret Bone for that.
There is nothing special about that and unfortunately it cant be used to play upper and lower body animations independantly. However the new special effects might for something similar if you want to implement it manually. Just attach the upper body as an effect and then you can animate it. I dont think it will ever look good though as it removes animation blending.
 
Level 12
Joined
Jan 30, 2020
Messages
875
Yet, this is interesting info indeed.

In all fairness, I have not often encountered the need to do this in my TD, for a start my custom root ability allow all towers to face their targets.

Yet I have not checked in detail how it affects models like let's say ancient protector. I should probably take a closer look :)

This said I could see great potential using your "attached upper body as an sfx" idea for some models with simple geometry!
 
Status
Not open for further replies.
Top