Home Technical Talk

Exporting out Armature/Bones

DustyShinigami
polycounter lvl 4
Offline / Send Message
Pinned
DustyShinigami polycounter lvl 4
Hi

I'm struggling to figure out how to correctly export armature/bones out into UE4/5 from 3ds Max. Rigging/animating isn't something I'm fully versed in. I've set up rigs and done a bit of animating before, in Max, Maya and Blender, but I don't think I've exported out full animations into Unreal before. And certainly not rigs on their own.
I've been asked to set up armature for a pair of FPS arms I made. Apparently, a couple of other guys are going to do the skinning and animating in Unreal, I think. They're setting up an IK Rig and Retargeting. However, I'm struggling to export out the armature and mesh correctly. I've enabled Smoothing Groups, Tangents and Binormals, Convert Deforming Dummies to Bones, Trinagulate, and Preserve Edge Orientation in the FBX export Geometry options, and I've tried enabling Animation and Bake Animation (not that there are any yet), but no bones show up in Unreal apparently. I'm probably misunderstanding and missing something as usual, but could someone help guide me to getting them exported and imported correctly?

Thanks 

Replies

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    you just need to skin a mesh to some bones, export the mesh and bones to an fbx and then import it as a skeletal mesh

    you could try adding a key on the bones and see if that kicks it into gear
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    poopipe said:
    you just need to skin a mesh to some bones, export the mesh and bones to an fbx and then import it as a skeletal mesh

    you could try adding a key on the bones and see if that kicks it into gear
    Yeah, I suspect that it definitely needs the bones skinned to the mesh in order for it to work. I've not come across any scenario where someone has just tried exporting out the armature on its own.

    But thanks for the tip; I'll give that a try and see what happens. :)
    EDIT: Also, I take it it's not wise to reset the X-Forms (in Max) for things like armature...? Usually when I've tried, it all gets flipped over to its side.
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    Hmm. Not sure if I'm missing something, but I can't seem to add keyframes to the bones. I can add them to the mesh, but nothing shows up on the timeline for the bones. 
  • Alex_J
    Options
    Offline / Send Message
    Alex_J grand marshal polycounter
    to import a skeletal mesh you need the bones and the mesh. They need to not be within any parent hierarchy and I think but am not 100% sure that the root bone has to be named "root". If the bones are within a group what I expect you would see would be the bones listed as mesh items in the skeleton viewer in unreal.

    I don't think the mesh is required to be skinned, though warnings will tell you if bones have no weights. But it will still import as it is perfectly valid for some bones to not be weighted.

    The mesh is not required. Usually when exporting animations you'd only export the skeleton, and then on import in unreal just point to the skeletal mesh asset.

    You should not mess with the transforms of the joints themselves.

    I'm not sure what "armature" means as I am a maya user, but just to be clear, you do not export the controls (like the control curves used for animation). Only the joints (aka bones).

    If you are exporting the joints and the mesh but the joints do not show up in unreal (but the mesh does?) you will likely get an error in the output log which will suggest what the problem is. You should show what that says after import, as well as pictures to confirm what exactly you are exporting as well as the export settings.

    It's good to also ask at the unreal forums as well. Of course if you get an answer there its nice to update here as well just so future searcher finds easy asnwer.

  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    Alex_J said:
    to import a skeletal mesh you need the bones and the mesh. They need to not be within any parent hierarchy and I think but am not 100% sure that the root bone has to be named "root". If the bones are within a group what I expect you would see would be the bones listed as mesh items in the skeleton viewer in unreal.

    I don't think the mesh is required to be skinned, though warnings will tell you if bones have no weights. But it will still import as it is perfectly valid for some bones to not be weighted.

    The mesh is not required. Usually when exporting animations you'd only export the skeleton, and then on import in unreal just point to the skeletal mesh asset.

    You should not mess with the transforms of the joints themselves.

    I'm not sure what "armature" means as I am a maya user, but just to be clear, you do not export the controls (like the control curves used for animation). Only the joints (aka bones).

    If you are exporting the joints and the mesh but the joints do not show up in unreal (but the mesh does?) you will likely get an error in the output log which will suggest what the problem is. You should show what that says after import, as well as pictures to confirm what exactly you are exporting as well as the export settings.

    It's good to also ask at the unreal forums as well. Of course if you get an answer there its nice to update here as well just so future searcher finds easy asnwer.

    Yeah, by armature I mean the bones/joints. I think it's a Blender term. Might be used in Max as well; I can't recall now. But yeah, the issue I'm getting is the mesh is showing up, but the bones aren't. I'll try importing into Unreal again and see if/what errors come up.
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    The error says 'Could not find the bind pose'. The box is empty for the Skeleton as well.

    I think I misunderstood what my other team member meant and it does need to be skinned/weighted. But I am still curious if the bones/joints/armature can be exported and loaded up into Unreal without being weighted. The consensus seems to be that they can at least.
  • Alex_J
    Options
    Offline / Send Message
    Alex_J grand marshal polycounter
    yeah i didn't think it is possible to create skin weights in unreal, but that's beside the original question.

    I am not sure if unreal does some sort of validation to ensure there is at least one weighted joint or not. If it complains about no bind pose, perhaps that is the case, though the "no bind pose" is a very common error you can find that it is related to many things via a google search. In order to have a valid skeletal mesh, it seems logical that at least one joint should be weighted. Because that is what makes it a skeletal mesh.

    you could test that by creating a primitive shape, create a single joint, bind it, and see if that succeeds on import to unreal. If that succeeds then you have much better ability to troubleshoot because you can compare your working example and look for differences with the problem. When doing the simple test, you'd want to make sure both export and import settings are default, and have the unreal docs open and go through step by step. There is always some weird little gotchas and sometimes tehy are hidden in the text, and not conveniently checklisted so its easy to find. Annoying but thats just the way it is.


  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    you need a mesh - on import of a skeletal mesh it creates a skeleton asset that contains the bone information and a skeletal mesh asset that contains the mesh and the skinning information. 

    it's not especially intuitive but its a decent enough system - very flexible at least
     
  • Alex_J
    Options
    Offline / Send Message
    Alex_J grand marshal polycounter
    Ah yeah, sorry the way I worded that is probably confusing. To import a skeletal mesh, you require both the skeleton and mesh to be exported together.

    That creates the skeletal mesh asset.

    Later, to import animations associated with the skeleton, you only need to export the skeleton (no mesh requried for that).


  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    Alex_J said:

    you could test that by creating a primitive shape, create a single joint, bind it, and see if that succeeds on import to unreal.
    I take it by 'bind' you mean to skin/weight it...? Unless you're referring to something else...?

    I have skinned/weighted a pair of arms, so I'll test to see what happens now. I think two of our guys have some system set up using an Unreal Retargeter...? I think the plan was to transfer animations made to different skeletons, but I'm not 100%. I'm sure they'll let me know if both load in correctly. :)
    EDIT: Nope. It's still not showing up. I don't even get a Skeleton appear in the box with Skeletal Mesh checked. My scene just froze too when I tried to import. :-\
  • Alex_J
    Options
    Offline / Send Message
    Alex_J grand marshal polycounter
    Yeah bind aka skin.

    For each joint, it has a weight value for each vertex to describe how much control it has on it.
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    hang on - I think I've figured out the problem. Just a sec...
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    I was collapsing the Skin modifier in Max, which made the rig no longer deform the mesh, so figured that was the issue. But no, still not getting the Skeleton appear on import and it still gives me the same bind pose warning. >_<
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    One of the guys got it working by adding a keyframe/slight animation. It seems to me then that a mesh does need to be skinned and given an animation of some sort before it loads into Unreal properly. Unless someone can prove otherwise...?
  • Alex_J
    Options
    Offline / Send Message
    Alex_J grand marshal polycounter
    when i export a skeletal mesh I don't include animation with the fbx at all.
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    And the mesh and bones import fine...? I was told in a lecture last week that Max's CAT rigs tend to be more 'compatible' with Unreal compared to Maya, so it's ironic I'm having so much trouble lol. What was your approach? What settings/checkboxes did you have checked on export?
  • Alex_J
    Options
    Offline / Send Message
    Alex_J grand marshal polycounter
    I just opened the unreal export/import docs and went step by step. Didn't have any issues except that if the joints are in a group then it gets confused and thinks they are a mesh. I don't remember all the details - its not possible and not necessary. Just carefully go through with a simplified setup first and with the docs as your guide and it will work. No need for any guessing.
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    Was it this one...?
    https://docs.unrealengine.com/4.27/en-US/WorkingWithContent/Importing/FBX/HowTo/ImportingSkeletalMeshes/
    EDIT: Going through different documentation, I'm not seeing anything that I haven't already done, and the majority are showing using Maya. Maya allows you to bind the rig to the mesh whereas Max doesn't give that option. It seems to be done via the Skin modifier, which I've already added and weighted everything. Also, Maya looks to allow you to export an FBX as an FBX Skeletal Mesh. I don't think Max does.
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    I'm starting the suspect things are different with Max/CAT rigs compared to rigs from Maya. It strikes me CAT rigs need an animation to import in correctly.
  • Alex_J
    Options
    Offline / Send Message
    Alex_J grand marshal polycounter
    i don't know anything about max, but if an animation was required i feel certain that would be mentioned in the docs.

    When you are new it is very easy to flip some switches in places and not know about it, then you get wierd results that can be almost impossible to debug. It's usually easier to just make a fresh project and first get bare minimum working. This way you have steps that you know can be reproduced to work, and can compare against your problem files.

    It's almost always faster to troubleshoot that way instead of just guessing at random things. Get something working, then you can start making actual comparisons.

    If you want to test if animation is required that is easy to do. Make a single bone, skin it to a sphere or cube, export it with and without a simple animation applied to the bone. Make sure that the absolute only difference between the two files is that one dfifference that you mean to test. Then you'll know!
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    Alex_J said:
    i don't know anything about max, but if an animation was required i feel certain that would be mentioned in the docs.

    When you are new it is very easy to flip some switches in places and not know about it, then you get wierd results that can be almost impossible to debug. It's usually easier to just make a fresh project and first get bare minimum working. This way you have steps that you know can be reproduced to work, and can compare against your problem files.

    It's almost always faster to troubleshoot that way instead of just guessing at random things. Get something working, then you can start making actual comparisons.

    If you want to test if animation is required that is easy to do. Make a single bone, skin it to a sphere or cube, export it with and without a simple animation applied to the bone. Make sure that the absolute only difference between the two files is that one dfifference that you mean to test. Then you'll know!
    Well, the other thing I'm a bit unsure about is what preferences need to be checked before exporting. I've noticed, that if I deselect Convert Dummies to Bones, it will import the rig in, but it treats it as actual geometry. Then it gives me warnings that there are no UVs present and has to create them. So I'm guessing that option definitely needs enabling...? As there's no animation though, I'm not sure if the Animation option should be checked and animations baked.

    These are shots I've randomy grabbed from one of Autodesk's documents just to show what the options are:




  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    - Export a skeletal mesh model as FBX from your application of choice.
    - Check that it opens up fine in FBXReview. FBXReview is the official tool provided by Autodesk to do exactly what it says : reviewing FBX models.
    - Import this skeletal mesh into UE, leaving everything as default.

    These are all the steps you need to get started with skeletal models in UE. There's no point worrying about anything else until you get these basics steps to work for you and all the other people involved.

    (also : a skeleton can be referred to as an "armature", and bones can be referred to as "joints", but a "rig" is something completely different, helping with the manipulation of skeletons in either the 3D app or the engine by assigning user-friendly manipulators. I would advise to not use this term when talking about skeletons, as this is likely going to create confusion - especially now more than ever, since UE has recently been introducing specific assets for in-engine animation rigs).
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    pior said:
    - Export a skeletal mesh model as FBX from your application of choice.
    - Check that it opens up fine in FBXReview. FBXReview is the official tool provided by Autodesk to do exactly what it says : reviewing FBX models.
    - Import this skeletal mesh into UE, leaving everything as default.

    These are all the steps you need to get started with skeletal models in UE. There's no point worrying about anything else until you get these basics steps to work for you and all the other people involved.

    (also : a skeleton can be referred to as an "armature", and bones can be referred to as "joints", but a "rig" is something completely different, helping with the manipulation of skeletons in either the 3D app or the engine by assigning user-friendly manipulators. I would advise to not use this term when talking about skeletons, as this is likely going to create confusion).
    Ahh, I see. So, a 'rig' is only a rig if it has manipulators/controllers to aid with making an animation? Is it not a 'rig' if animations have been made/keyframed...?

    Thanks for the heads-up about the FBXReview. I didn't even know that was a thing. I've just been using Window's default 3DViewer to see if the models look fine and the right orientation etc.

    One of my team members showed me how he managed to get it into Unreal fine. I don't know if it's considered the correct way, but it works at least. He basically added a keyframe to the Parent. And, to be on the safe side, added a keyframe to every bone. All at 0. He then selected everything - Parent, Skeleton, Mesh - exported as an FBX and had Animation checked, as well as the 'animation' baked. On import to Unreal, we just made sure that import animation was checked, along with all the other common options. That seemed to do the trick. :)
  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    Tested it further. Apparently no keyframes need to be added, nor do Animations or Bake Animations need to be checked on export/import. So long as the Parent, Armature and Mesh are all selected and exported, it works. :D
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    "Ahh, I see. So, a 'rig' is only a rig if it has manipulators/controllers to aid with making an animation? Is it not a 'rig' if animations have been made/keyframed...?"

    No. A rig is a compltetely separated entity from the skeleton. It's a set of manipulators that help drive the skeleton, using math (like the math involved to drive the chain from shoulder to hand by simply moving the hand, or the math involved to make the head and/or eyes to look at a point in space by manipulating that point directly).

    Put differently : if you are not an animator or a technical artist working with animators, you will never interact with a control rig (outside of perhaps posing your own models, but even that can be done without a rig if only static poses are involved). As a modeller involved with creating skeletal assets, your work will stop at weighting geo to bones for good deformation.

    This is a skeletal armature :  


    This is a control rig :  

  • DustyShinigami
    Options
    Offline / Send Message
    DustyShinigami polycounter lvl 4
    Gotcha. Thanks for clearing up the confusion. :) I have set up a rig before following a tutorial or two. I did one in Blender some time ago and one in Maya. But as I'm primarily a character artist - yeah, weighting armature to a mesh and posing it for presentation is about as far as I'm likely to go.
Sign In or Register to comment.