1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Helpful Import MDX into Blender 2.79 Addon

Discussion in 'Warcraft Editing Tools' started by Donut78, Apr 22, 2020.

  1. Donut78

    Donut78

    Joined:
    Jul 22, 2010
    Messages:
    28
    Resources:
    0
    Resources:
    0
    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
     
  2. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,929
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    Thanks for sharing. Does this keep the intricancies of Reforged Models intact?
     
  3. Donut78

    Donut78

    Joined:
    Jul 22, 2010
    Messages:
    28
    Resources:
    0
    Resources:
    0
    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
     
  4. Donut78

    Donut78

    Joined:
    Jul 22, 2010
    Messages:
    28
    Resources:
    0
    Resources:
    0
    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
     
  5. Razorclaw_X

    Razorclaw_X

    Joined:
    Apr 12, 2018
    Messages:
    275
    Resources:
    0
    Resources:
    0
    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)
     
  6. Donut78

    Donut78

    Joined:
    Jul 22, 2010
    Messages:
    28
    Resources:
    0
    Resources:
    0
    Yeah I do recall that from WoW. I suppose these plugins were never really designed to accommodate that difference in the first place.
     
  7. Clanzion

    Clanzion

    Joined:
    Jul 4, 2016
    Messages:
    440
    Resources:
    0
    Resources:
    0
    Thanks for finding this, I don't have to do the tedious method of utilziing gmax to convert models to use in blender anymore.
     
  8. umika

    umika

    Joined:
    Dec 19, 2007
    Messages:
    20
    Resources:
    0
    Resources:
    0
    Hi. i have problem to add plugin.
    i wanna edit model used war 3 reforged.
    so i wanna import mdl or mdx and export.
    plz see video and give me advice.

     
  9. Donut78

    Donut78

    Joined:
    Jul 22, 2010
    Messages:
    28
    Resources:
    0
    Resources:
    0
    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
     
  10. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,929
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    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.
     
  11. Macadamia

    Macadamia

    Joined:
    Jan 30, 2020
    Messages:
    860
    Resources:
    0
    Resources:
    0
    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.
     
  12. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    6,929
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    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.
     
  13. Macadamia

    Macadamia

    Joined:
    Jan 30, 2020
    Messages:
    860
    Resources:
    0
    Resources:
    0
    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!