Announcement

Collapse
No announcement yet.

Blender to UE4 - Easily Export/Import Animations and Meshes! - Free Addon - Mr Mannequins Tools v1.3

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [TOOL] Blender to UE4 - Easily Export/Import Animations and Meshes! - Free Addon - Mr Mannequins Tools v1.3

    Click image for larger version

Name:	MMT_1.3_Cover.jpg
Views:	7338
Size:	139.2 KB
ID:	1746437
    Mr Mannequins Tools (v 1.3)
    - Third major update of the add-on for Blender 2.8+ that gives the ability to export animations and weighted meshes that are directly compatible with the third person mannequin without re-targeting anything in Unreal Engine! Even more bugs and issues have been solved and some new features have been added!

    Now contains:
    - an animation ready mannequin rig with female bones and other various rigging features
    - an animation ready first person gun and bow rig (more rigging features at some point)
    - an accurate Blender version of the mannequin and gun materials
    - all mannequin, femmequin, gun and bow meshes
    - a detailed pose interface with some useful rigging options
    - a new WIP custom character mapping system (retargeting within Blender)
    - a modular rigging system that works with any mapped character (my rigging where you want it)
    - a basic socket system for any object (still more to come on this)
    - the mother of all FBX export scripts (improved animation export code)
    - the father of all FBX import scripts (improved animation import code)

    Plenty more to come including advanced mutilation rigging options, mannequin themed weapon and animal templates amongst other rigged meshes, further modular rigging options, automatic IK vs FK switching and character creation tools

    Here's the covering video for the update: (watch this before using any new features!)


    I've scheduled a live stream here to answer questions: (and do a Patreon t-shirt giveaway)
    https://youtu.be/MXgy4coclz4

    You can download the add-on for free from Gumroad: (donate if you feel generous)
    https://gum.co/MrMannequinsTools

    It can also be bought on Blender Market: (10% goes to the Blender Development Fund)
    https://blendermarket.com/products/mr-mannequins-tools

    You can find out more on my YouTube channel: (tutorials coming soon, subscribe to get notified)
    https://www.youtube.com/c/JimKroovy

    Here's the Github repository: (read the read-me if you go here)
    https://github.com/Jim-Kroovy/Mr-Mannequins-Tools

    Consider supporting me on Patreon: (to get exclusive monthly assets)
    https://www.patreon.com/JimKroovy

    Find me live on Twitch and Mixer:
    https://www.twitch.tv/jimkroovy
    https://mixer.com/JimKroovy

    Follow me on Twitter, Facebook and Instagram:
    https://twitter.com/JimKroovy
    https://www.facebook.com/JimKroovy
    https://www.instagram.com/jimkroovy

    If you have errors or issues with this add-on then i will need screenshots and details to fix them!

    Feedback much appreciated, suggestions for updates would be lovely!
    User Guide (I STILL NEED TO UPDATE THIS SECTION FOR 1.3!)

    Installation:
    Download (Just offer 0 if you aren't donating)
    Open Blender
    Go to Edit\Preferences\Add-ons and click "Install..."
    Select the .zip you just downloaded and click "Install Add-on From File..."
    Then tick the box to the right of the add-ons entry

    Updating:
    Download (Just offer 0 if you aren't donating)
    Open Blender
    Go to Edit\Preferences\Add-ons find Mr Mannequins Tools and "Remove" the old version before installing the most recent version

    Loading the defaults:
    Make sure you have set your desired unit scale as anything that gets loaded or exported will be scaled to fit it
    In the toolbar next to the 3D viewport open the "Mr Mannequins Tools" panel
    Then in the "Stash" panel select a "Rig" to load and click "Load Rig"
    Making sure the loaded "Rig" is selected in "Object Mode" in the "Stash" panel select a "Mesh" to load and click "Load Mesh"
    (Set "Auto-load Materials" to True if you don't want to load and assign them manually and "Parent to Active" does what it says on the tin)
    ("Apply Scale" applies the scaling calculated on loading to the object, generally this should be left True but the option to not apply it is there just in case)

    Exporting animations: (Your .blend must of been saved at least once before you can export anything!)
    Make sure you have the armature selected in "Object Mode"
    In the "Export/Import" panel of "Mr Mannequins Tools" set "Export Animations" to True
    Set the "Animation Export Folder" you wish to export to
    Setting "Batch Export Animations" to True will result in all actions that the armature can use in the .blend file being exported to seperate .FBXs
    If not batch exporting only the active action on the selected armature will be exported.
    ("Force Start/End Keyframes" may solve end frame inaccuracies and sometimes the "No Animation Track" error once imported to UE4)

    Exporting meshes: (Your .blend must of been saved at least once before you can export anything!)
    In "Object Mode" select the meshes you wish to export then select the rig that those meshes have "Armature" modifiers to
    In the "Export/Import" panel of "Mr Mannequins Tools" set "Export Meshes" to True
    Set the "Mesh Export Folder" you wish to export to
    Setting "Batch Export Meshes" to True will result in all selected meshes being exported to seperate .FBXs
    If not batch exporting all selected meshes will be exported into the same .FBX
    ("Apply Modifiers" is up to you but setting it True will stop shape keys being exported")

    Importing animations: (Your .blend must of been saved at least once before you can import anything!)
    Make sure you have the armature you wish to convert the animations on selected
    Be certain you have set your desired FPS setting as the length of the imported animations will be scaled to fit it
    In the "Export/Import" panel of "Mr Mannequins Tools" set "Import Animations" to True
    Select the folder where you have exported your animations from UE4
    Setting "Batch Import Animations" to true will result in all .FBXs in the folder being imported
    If not batch importing a drop down of the file names will appear for you to choose which animation to import
    ("Convert Root Motion" will force all the animation data on the import animations armature to be applied to the root bone)
    ("Pre Scale Keyframes" will scale the imported animations length before converting it, if False the animations length gets scaled after converting it)
    ("Key Controls" keyframes the relevant pose control options on the first frame of the animation, if false the options still get set for import but don't get keyed)
    ("Key Location" One of my tests... just don't mess with this unless you know what you are doing)

    Importing meshes: (Your .blend must of been saved at least once before you can import anything!)
    Make sure you have an armature selected
    In the "Export/Import" panel of "Mr Mannequins Tools" set "Import Meshes" to True
    Select the folder where you have exported your meshes from UE4
    Setting "Batch Import Animations" to true will result in all .FBXs in the folder being imported
    If not batch importing a drop down of the file names will appear for you to choose which mesh to import
    ("Import to Retarget" only available when not batch importing, will jump straight into re-targeting the imported skeletal mesh)
    ("Rig to Active" set the imported skeletal meshes armature modifier to use the active armature and remove everything else that got imported)

    Retargeting: (Bone names that are not named after the mannequins convention will be treated as extra bones and will not receive my rigging options!)
    Make sure you have an armature that is not my mannequin rig selected
    There should be a "Start Retargeting" button at the bottom of the "Export/Import" panel
    Once pressed a template of the mannequins control bones will be loaded for you to pose
    The template should pick up the bone locations of the target and snap itself into what it thinks might be a good pose
    The idea is to create a pose with the template that you could animate with in Blender then press the "Apply Retargeting" button
    I would strongly advise watching the update covering video on how to do this...
    Yellow bones think they know where they should be but can still be changed if needed
    Purple bones need checking and probably posing correctly
    Pink bones are extra bones that it is up to you to pose
    ("Force Template Rotations" will force all the posed bones to use the templates original rotations)
    ("Force Template Locations" will force all the posed bones to use the templates original locations)

    Character Stashing: (There are still a few bugs/issues with customs stashes but it works great for the default armatures, meshes and materials)
    Choose a name for the folder you wish to create
    Then select the location for it
    Click "Add Stash" and a drop down menu should appear (If a stash folder already exists then that folder gets assigned instead)
    In "Object Mode" select the meshes you want to save for later then select the rig they have armature modifiers to (These limitations will be needed in future)
    Extra panels should of appeared underneath the "Load Mesh" and "Load Material" buttons with some options for saving your character

    The "Overwrite" options will cause anything saved with the same name in the current "Stash" to be overwritten, if false nothing gets saved if it already exists
    "Pack Images" packs any images the material uses into the saved file (so you don't have to fix up texture filepaths when loading)
    "Auto-save Materials" will cause any materials used by the selected meshes to be saved to the current "Stash"

    Once you have chosen your options click "Stash Meshes" to save the selected meshes to the current "Stash"
    Now you should be able to see meshes/materials in the same drop downs as the defaults and be able to load them just the same

    Clicking "Remove Mesh" or "Remove Material" will delete the selected mesh/material from the current stash and your PC
    (you can't remove the default ones though)

    Clicking "Remove Stash" will only remove the current "Stash" folder from the add-on memory, to remove it from your computer you will probably have to delete it externally. The add-on will try to delete it from your PC but if it cant it just removes it from the add-on. Maybe it will work for you, who knows!

    Deleting a "Stash" folder externally without removing it from the add-on will result in the add-on getting rid of it itself.

    I have crashed once or twice when loading custom meshes from custom "Stash" folders, when i re-opened the .blend everything had loaded as expected. I am currently unable to recreate this bug so i am still diagnosing the cause, i have a feeling it might be to do with what's selected in "Object Mode" but i'm not sure.
    Bugs: (v 1.3)

    Current:

    None!

    Solved:

    A-pose on a frame once imported: (Fixed in v1.2) I managed to mess up fixing this bug in v 1.1 i made the fix condition wrong, if the current frame is at the start or end frame of the animation when you hit export that frame will become the A-pose. Thanks for noticing gtnardy from Github!

    (Workaround: Same as before set your current frame somewhere outside your animation frame range before clicking export)

    Utf-8 error when loading from default stashes: (Fixed in v1.2) So... Installing the add-on on a user of your computer with a special character in the name (eg: à) will cause a utf-8 de-coding error if you try to load anything. I am unsure how to fix this as the add-on requires the file path to the add-ons installation folder which is, by default on windows, in "C:\Users\[InsertName]\AppData\Roaming\Blender Foundation\Blender\[InsertVersion]\scripts\addons\MrMannequinsTools"

    (Workarounds: Try changing your Blender add-ons directory in the preferences, create/use a different user on your PC that does not have any special characters in it's name)

    CENSOR_1337s steps for changing add-ons directory.
     
    Spoiler


    Offset FK digit option trying to process a clavicle bone of all things: (Fixed in v1.1) Setting the digit rig option of Offset FK did not work, it got halfway through the set up function and bug out trying to process a bone that it shouldn't. Thanks for spotting this Tom!

    Importing animations with extra bones stops the process finishing: (Fixed in v1.1) When importing animations that contain extra bones than just the mannequins default will cause the clean up process of import function to fail, super easy to fix. Thanks for finding this CENSOR!

    Disappearing Secondary Armatures: (Fixed in v1.1) Loading a second mannequin mesh after loading a second mannequin armature removes the second armature and set's the second meshes armature modifier to the first armature. Thank you for finding this YouTube user Milan!

    (Workaround: just load the meshes you want with the first armature then duplicate them manually (Shift+D) after loading a second armature and set the duplicated meshes armature modifier to target the second armature)

    A-pose on a frame once imported: (Fixed in v1.1) For some reason if the frame is not set to a frame that is not within the frame range of the animation, when you hit export whatever frame you were on gets set to the rest pose in the animation. Thank you for finding this Twitter user Anny!

    (Workaround: Set your current frame somewhere outside your animation frame range before clicking export)
    Updates: (I may add, move, change or cancel any plans at any time and i'll try to keep this section up to date)

    Currently Working On:

    Version 1.4: (Between: 1st/July/2020 - 1st/August/2020)
    • System:
      • Pose interface (improvements) - Done!
      • Armature and template stashing (might not have time to get this into 1.3) - Doesn't look like i'll have time to do this!
      • Combined LOD loading, saving, import and export - Doesn't look like i'll have time to do this!
      • Socket export (might try and find a way to import them as well) - Doesn't look like i'll have time to do this!
      • Armature re-target options (improvements) - Done!
      • Socket attachment options (improvements) - Done!
      • Animation import and conversion (improvements) - Done!
    • Rigs:
      • Mannequin Bow Rig - Done!
    • Meshes:
      • Mannequin Bow Mesh
    • Materials:
      • Mannequin Bow Material
    Planned Updates:
    • System:
      • Character scaling and morphing?
      • Animation stashing?
      • Animation generator?
      • IK offset from FK?
      • Modular rig building?
    • Rigs:
      • Humanoid Rigs?
    • Meshes:
      • Humanoid Meshes?
    • Materials:
      • Humanoid Material?
    Last edited by Jim Kroovy; 04-16-2020, 12:30 PM.

    #2
    Almost got the script done for animation import! default third person run imported and working on my rig in Blender! Check it out! Only a few things left to fix



    Comment


      #3
      Hey this is pretty cool!

      Comment


        #4
        HeadClot Thank you! i'm currently editing together a video that goes into more detail about how the mannequin compatibility actually works! If you're interested i should have it uploaded later or tomorrow. I worked really hard on this, and i have many big plans for it

        EDIT: Here's the explanation video!
        Last edited by Jim Kroovy; 09-11-2019, 05:54 AM.

        Comment


          #5
          Idk if you ever worked with the 3ds max biped rig but when you animate with the biped rig the rig is full fk but at the same time is ik too meaning you pose with fk and adjust with ik. Is your rig able to do this without the need of going to some settings and manually fk ik switch?

          Comment


            #6
            dandezign I've done some work with 3DS max (i dont get on with it very well) but i do have a method of doing almost as you mentioned as well as a method of switching manually, i just haven't implemented them on this rig yet (My method of IK with FK both enabled at the same time kind of works in reverse to what you described so... you would pose with IK then adjust with FK, i'd like to try and have it work both ways though so it's something i've been trying to do in Blender)

            EDIT: I did have the pose with FK then adjust with IK system very nearly figured out, but i stopped working on it as i'm not sure if it's something Blender users would like as many people i've spoken too are used to using a manual switch! What do you think? Should i keep working on it?
            Last edited by Jim Kroovy; 09-11-2019, 07:14 AM.

            Comment


              #7
              Jim Kroovy Yeah you should and the reason why I like to pose in fk and adjust with ik is to have the fk rotations because posing with ik you have to do a lot of in-between poses and thats just time consuming.

              I've been wanting something similar to the biped control rig from 3ds max with just the ability to not have to manually switch between fk and ik in blender and still keep the fk rotations, I hope you understand what I'm trying to say cause i feel like I'm not using the right terms here. Thank you for this amazing plugin.
              Last edited by dandezign; 09-12-2019, 07:37 AM.

              Comment


                #8
                dandezign alrighty, i can't promise it will be in the next update in a few weeks but perhaps the one afterwards

                Comment


                  #9
                  Originally posted by Jim Kroovy View Post
                  dandezign alrighty, i can't promise it will be in the next update in a few weeks but perhaps the one afterwards
                  Awesome thank you so much.
                  Last edited by dandezign; 09-13-2019, 02:29 AM.

                  Comment


                    #10
                    Thanks a lot for this, this will be very handy for prototyping when you have lack of animation. I kept hitting the export button to try to export my first animation, but it wouldn't work. Took me a while to figure out that I needed to save my blender file to get it to work. :P Just a warning to the rest of you, if it won't export your animation, just save the blender scene first

                    Comment


                      #11
                      ThatLittleSpider I think one of the first things i said in the covering video was that you had to save your .blend file first BUT i do appear to have missed it out from the "User Guide" above in the post! I'll be sure to put it in there soon!

                      I plan to make add on screen notification windows for all my error messages in the next update so that should hopefully help a lot too.

                      If anyone has any problems with anything then it would be great idea to check the console window... i've set up most of my error messages to print there until i finalise them and add in the warning messages

                      Comment


                        #12
                        Haha, guess it is my own fault for not watching the video.. Typical me, I am the kind of person that just try things on my own before trying to find a solution. :P I am not an expert in blender either, trying to convert from 3dsmax to blender these days. Thanks for the tool, its awesome.

                        Comment


                          #13
                          Blender > 3dsmax in my humble opinion Around 5-6 years ago i started learning animation in Maya and gave up within 6 months and downloaded Blender instead hahaha, i've never regretted it even once! Now it seems like everyone's making the switch!

                          You are very welcome, there's a whole lot more coming for this add-on too!

                          Please let me know if you have any Blender troubles and i'll see what i can do for you

                          Comment


                            #14
                            I am pretty experienced in 3d packages in general. I always figure out the way to do it in blender by google. It is just the start that is hard, the general small stuff. where tools are located etc. If there is something I cant figure out I will ask you. I Appreciate the offer.

                            I did buy an awesome plugin, the pie menu editor. Which allows me to create my own pie menus. That made it a lot more similar to Maya's marking menus, which I loved. It speeds up the workflow, and I don't have to look for the tools.That gave me access to all the tools how I wanted them. Something I missed in max, tried different plugins for max, but they just didn't hold up and could not compare to marking menus or pie menus.

                            Thanks again.

                            Comment


                              #15
                              Should have everything ready for the next update (v 1.1) within a week or so!

                              There's mannequin animation importing/converting from UE4 to blender, there's a good optional head tracking system... optional IK parenting... optional finger IK... IK vs FK switching and FK offset from IK options... the mechanism and deform bones visibility can be toggled too... aaaand i've fixed both the bugs that had been found by users

                              Just need to add the final tweaks and options to the animation import script then i'll get a covering video recorded and upload everything!

                              Should be uploading the scripts to github shortly after this update so others can help improve them! (some of my methods are a little hacky even if they are quite stable, and could be better)

                              Hope everyone who reads this has an awesome day!

                              Comment

                              Working...
                              X