Blender Rigging and Animation

Do you guys know if using the “Very Low poly” meshes from MakeHuman would be important for game optimization in Unreal Engine? Also when mapping the UE4 Tools rig to a custom character in Blender, is it important to align the Armature Layer 3 bones, or do I just need to align the Layer 1 bones?

Interesting addon RichLee. I might have to check that out if it saves a lot of time rigging.

Does anyone have any experience getting fingers working from MakeHuman -> Blender UE4 Tools Rig -> Unreal Animations. I’m having problems aligning the fingers with the AnimStarter Pack. Even though the fingers seem to be aligned properly in Blender, then seem to always come out messed up in Unreal Engine. Here is what I have in Blender:

This is what results I get in Unreal Engine:

It seems like the more I try to fix the alignment of the bones in Blender, the worse it gets after re-importing into Unreal Engine. As you can see the left hand thumb, middle, and pinky are out of alignment. The right hand index is out of alignment. In general the fingers are quite out of alignment from what I’m defining in Blender. One difference is I notice the weight on the finger joints on the default UE4 Tools mesh are red, but on my rig they are automatic weighted and not as red.

Editing for my solution: I was able to adjust my Blender FBX export settings to -Y forward, and Z up and it’s resolved the fingers twisting. The alignment now is pretty close:

Why did you use automatic weighting? Makehuman already gets good weighting. It’s missing the twist bones but they would not work with automatic weighting anyway (the left shoulder on your screenshot looks very off… this could usually be fixed easy and quick with a twist bone that just turns a bit backwards).

I don’t know the workflow from Makehuman -> Blender -> UE4-Tool -> UE4. I only know the way Makehuman -> Blender -> UE4. That would be:

*) Export from Makehuman centimeter as dae
*) Import into Blender
*) Import the UE4 mannequin into Blender
*) Pose the Makehuman character to get a (very) similar pose to the UE4 mannequin (afterwards delete the UE4 mannequin)
*) Apply the armature modifier to (all) meshes, apply the pose as new rest pose in pose mode to the skeleton, add armature modifiers back to the meshes.
*) Add twist bones (they are a must have). Copy vertex groups (e.g. upperarm_l) and split the weight up (autonormalizing on and subtract and blur) between the twist and the normal bone.
*) If you like you could add some IK bones. They are pretty useless in UE4 (as you could use the IK functions even without them in UE4) but very handy while animating in Blender.

Regarding the twists at the fingers. It is very, very, very … very… important for retargetting to get a Rest-pose that is similar to the UE4 mannequin in Blender. The rest-pose is the pose that would be used if you switch to edit mode. You could see it even if you click on that little human like button on the right side of blender when you select your armature. There is a pose position button and a rest position button. The rest pose should look like the A-pose of the mannequin. If you get annoyed by a few anims too much you could even just disable the retargetting of your fingers (leave the mapping at the retarget manager empty) before you retarget. Your hands would be in the restpose of your hand afterwards (no twists but even no “grabbing” pose). You could pose your hand in UE4 afterwards apply a key at the first frame and export (and reimport) the anim. It is usually not that difficult (a matter of 1minute per anim) to pose your hand properly from the rest-pose to the “grab some rifle” pose. But it is a pain to untwist all those weird twisted fingers manually. Anyway I would recommend you to fix the rest-pose.

Actually it is possible (just retargetted the same anim from the free anim starter pack (don’t use that anim-set in my game)):

Regarding your “low-poly” question. Forget Makehuman-low-poly for UE4 …except probably for some LOD (much, much later)… or if you go for mobile. If I would be create something for moblie based on MH then this would be a heavy retopo session anyway ;)… and not those low-poly meshes. UE4 renders polys very well. It is more likely that you slow down your game with adding some effects with transparent materials than with too much polys of your main char. If you don’t make a strategy game where you see thousands of them 30-50k for your main characters are very ok.

Hi Neutronux this is super helpful thank you so much.

I used automatic weighting because someone else recommended it for this in the above posts.

I’m a little confused about what you mean by “Pose the Makehuman character to get a (very) similar pose to the UE4 mannequin (afterwards delete the UE4 mannequin)”. Should it not be the other way? For example I modify the Armature, Bones etc of the UE4 Mannequin to exactly match my character? My character is a women, so much smaller than the hero sized UE4 Mannequin.

Maybe I could hire you for a web meeting or something to go through it with me? I’m having a really hard time finding complete documentation or tutorial videos on this. They all have a lot of conflicting approaches for this.

Yes she’s smaller but she could still get a pose that is similar. Think of ripley when they jumped into that huge yellow robot and owned that alien. I’ve created this one few days ago with ManuelBastioniLab (another project from the Makehuman team leader) for the tutorial in that thread: New project released by MakeHuman team leader - Community & Industry Discussion - Epic Developer Community Forums …I did the rest pose rather quick as I’m not going to use this mesh in my game and did not try the retargetting of that rifle anim until now.

This is the pose in Blender (as you could see the mannequin in the back is just there to get a clue) - it’s what you would do with the Makehuman mesh as well:
38efe7c84a59615f8ce928faa530ff6f2f30886a.jpeg

Result of anim from the free starter pack:
b93dbbaf1c372f4e871561c4e6a2138dc0516f71.jpeg

Ok. Thanks I’ll try and go through your steps on that forum post using ManuelBastioniLab. Maybe that will give me a better understanding of what I need to do.

Another question for you. Should I be aligning all of the UE4 Mannequin Armature Skeleton Layers to my character? From my understanding layer 2 is the IK bones which are not required. But I’m confused about the other layers. The ones i’m talking about are in the UE4 Tools Mannequin.

Here is what I have right now. I’m a bit confused why if I leave the hand bones un-aligned with my character they seem to work better once imported into Unreal. I think I need to re-watch that Alien movie so I know what you’re talking about!



Layer1 keeps the deform bones (all of them are required). Layer2 keeps IK bones and twist bones. You can ignore the IK bones (they don’t get any weight and are just helpers). But you have to take care about the twist bones:

Otherwise you would get something like this: Re-tarjet problem and please advise - Character & Animation - Epic Developer Community Forums

The finger-bones in the last screenshot are a bit off from the mesh? Otherwise it looks like a UE4 similar pose. Is this the rest-pose (if you select the mesh and enter edit mode … does it change the pose)?

Yes. I purposely left the finger bones out of alignment to see what would happen. It is good to know that I need to re-align them. If I change from “Pose Position” to “Rest Position” under Skeleton it changes my thighs slightly, and also it looks like it moves the animation circle things out a bit. Besides that it doesn’t really change at all.

Ok. I have been deleting the IK Bones as they seem to cause problems when I set automatic weighting when I parent the mesh to the rig. Regarding the twist bones, yes I’m now getting that problem. Is there something I need to add to my workflow for that? I’ll read over those links you just sent!

Here is what I have so far:

Steps for making a MakeHuman/Blender character for Unreal

MakeHuman

  1. Create character in make human. Add low poly eyes, but leave hair and eyebrows and clothes out - Don’t include skeletal mesh.
  2. Export it to dae with cm selected.

Blender with UE4 Tools Addon

  1. Set scene scale to 0.01, and metric, and framerate to 30.
  2. Import the dae export.
  3. Select the mesh and center to it with “Shift C”
  4. Import the UE4 Tools Hero Rig (Without the MESH)
    5 Select the Hero Rig, and turn on all layers.
  5. Put the Hero Rig into Edit mode. Put the Pivot Point as “3d Cursor”. Press “S” to scale, and type approximately “80” to scale the rig up to the size of the body
  6. Align all of the bones to inside the rig. Don’t rotate bones. Ensure the Roll of the fingers stays the right direction. (Use X-Ray under Armature settings for easier viewing. Note you may not want to use x-axis mirror as each side is slightly different)
  7. Delete the small almost hidden “Bone” in the left elbow joint.
  8. In Object mode select the mesh, and also select the rig. Hit “Ctrl + P” and “Armature Deform with Empty Groups”. Repeat this for other objects such as eyes.
  9. Set the HeroTPP in Pose Mode, then select your character mesh and put it into Weight Mode. Individually assign automatic weight from bones by clicking the bones and pressing “W” key. (You don’t want to assign weight to any IK Bones) (Important: To avoid twisting with arms and clothes manually set the weight on the twist bones to match the default HeroTPP Mesh Weighting).
  10. For clothes, in Object mode hit “Ctrl-P” and select “Armature deform with Empty Groups”. Then select the body mesh, and secondly select a clothing item. Then go to “Weight Paint” mode. On the left hand side, under Tools choose “Transfer Weights” and adjust Source to “By Name”.
  11. Put the HeroTPP Rig into Pose Mode and Select it. With the Armature Layers all turned on try moving the different IK Poses. You may notice that some things stick when moved.To resolve this add/remove/review weight to the bones in this area or re-align the bones, and re-apply weight.

Unreal Engine 4

  • Import the files into Unreal Engine.
  • In Skeleton Tree click “All Bones, Active Sockets” and select “Show Retargeting Options”.
  • Set all below pelvis to be “Skeletal” instead of animations
  • Set pelvis to be “Animation Scaled”
  • Under “Retarget Manager” select “Humanoid” as the rig.
  • Set the “root” to “root” and make sure all items match their mapping.
  • Test the joints by pivoting to make sure they move to scale/quickly.
  • Remove the toe ball from the physics model, and align the foot so it is flat.

I think my problem might be that I’m rotating some of the bones. I’ve noticed that especially in the fingers, if you rotate them that really messes up the way they line up in Unreal Engine. Is there a way to select, and re-align the bones with the Y, X, Z axis?

If it’s (really) just a bit than it’s ok.

Twistbones have to be painted manually (as they are child bones that are in line with their parents). Automatic weights would not work in that case. But you could copy the vertex groups (e.g. upperarm_l and rename it to upperarm_twist_01_l) and afterwards subtract from both vertex groups some weight with autonormalizing on (so you get 1.0 weight). This works if you use the weightpainting from Makehuman (not sure how this would look if you use that automatic weights). The next version of the ManuelBastioniLab should include some twist bones already (which is pretty cool).

You could even use high-poly eyes (it’s a nice base if you would create some more advanced eye with cornea and iris hole). But I would recommend to switch either of those with some mesh from UE4 (content example - eye shader demo - export mesh, import into blender, and replace with the eyes from the Makehuman export).
You could even include hair and eyebrows and cloth. They all got proper weightpainting from Makehuman. Usually I would even recommend to use the skeletal mesh from Makehuman (and just change the rest-pose instead of replacing it with some other rig).

Yep.

Maybe. I never used this rig for UE4 (neither for makehuman, manuelbastioniLab or my own meshes). But if I would use it I’m not sure if deleting the layer2 would be a good idea. Probably just once to get your automatic weights (if you go this route). However you would even have to add at least the twist bones back again afterwards.

Sounds good if you don’t have cloth with weights already and/or if you created your own cloth in Blender.

Yep.

You mean the boneroll? You could do this with CTRL-N in edit mode.

You mean the boneroll? You could do this with CTRL-N in edit mode.
[/QUOTE]
Ya. that appears to be it! Do you have any advice for fixing the bone rolls on the fingers so they align with the proper X Y Z directions?

After spending some time, that was it. I needed to adjust the “Roll” for the fingers to match the default UE4 Tools Mannequin. I’m still stuck though, when I adjust the roll of the fingers it doesn’t seem to do anything in Unreal. I can’t seem to find what’s going on.

So my advice would be to get auto rig pro if you are doing any form of Rigging with blender.

It will save you so much time. Link to the Blender Market. It just got Unreal Humanoid Support!

If you are having a hard time importing skeletal meshes into unreal. Follow this export guide.

EDIT: There is also an official Export guide in the Auto rig pro docs. :slight_smile:

Looks interesting. Seems like it would be almost as easy as it would be with Maya to add some humanoid rig. But in my opinion this makes more sense if you have a character without any skeleton and without any weightpainting. Makehuman already provides a skeleton and the weightpainting works well. I would still recommend to keep it and just fix the rest-pose.

That said… I’m even no big friend of all those “GPL” blend files. While it’s probably ok to be a bit pragmatic in this case I don’t see a real benefit to move into a possible grey-zone. Both the UE4 Tool (if you get it from github) and the Auto-Rig pro (which is even available from github as well in an older version) contains blend files and are distributed under the GPL without an exception for the blend files (well the UE4 tool could be downloaded from LUIs site which does not contain any license info as well). I think non of those plugin creators would restrict the exports (I guess) but leave the users in an unclear state. Probably this differs from country to country. GPL is a great license for open-source software but an annoying license for any media in a closed source game. While exporting something from a GPL program does not cast the GPL to the export (the export is out of the scope of the GPL and exports from Blender are stated as your own) it even does not clean the GPL from imported media that is already under the GPL (e.g. images, blend files, …). For example if I create a cool character (or Rig), put it under the GPL and share it with the world (only) under this license it would be too less for somebody else to just import and export it with some (GPL or non GPL) program quickly to remove the GPL from it. That’s the reason why Makehuman added an export exception. If you export a mesh from an (unmodified) version of Makehuman it got the CCO exception (so you may use it even in closed source software). It’s similar with ManuelBastioniLab but you have to give credits as well (which is perfectly ok for what you get afterwards). It even protects the export between the users a bit. If you put all those body mass sliders into the same 0-1 position (by luck) as another user somewhere else in the world both may use it and nobody could say it’s his own. Only the modification (beyond those shape target sliders) that are made by you afterwards are your own. In short: That’s a further reason why I would prefer using the (CC0) Makehuman skeleton over (replacing it with) a skeleton that comes as GPL blend file somehow. The Makehuman skeleton fits perfect to the mesh got well working weightpainting. Only the rest pose differs a bit (which is not that big issue). And regarding the weightpainting of the twist bones it seems either of those tools leave you into a position where you have to do this your own (currently). This should change with 1.5 of ManuelBastioni lab.

I would have thought that using GPL software would not alter the end character in anyway. For example if I use a bunch of tools with GPL to develop a unique image in GIMP. My image is my own unique artwork that someone else can’t use. However if I make a customization to GIMP itself, since it is GPL I would need to make the code public available.

I’ll pick up a copy of Auto Rig Pro today and try it out. As a beginner to 3D Modeling and video games anything that can help automate my workflow is probably in my best interest. (With potential Licenses exporting issues aside).

So Neutroniux it sounds like you are using the “Game engine” bones in MakeHuman, and then aligning it with the rest post of the UE4 Mannequin. I didn’t realize this earlier. I guess I should have put this together when you said you were using the weights from MakeHuman. My bad, but this really changes the workflow I was trying to do. What do you mean by CC0? I guess I’ll go back to trying using the bones in MakeHuman/ManuelBastioniLab.

Regarding animation; is it not a problem that these methods don’t have any IK Bones? I would think that the IK would be later important for use with creating your own Animations in Blender? What process do you guys use for rigging other characters like animals, vehicles etc?

Exports are out of the scope from the GPL. If you paint something with Gimp yourself it’s yours. If you get some image from a hollywood movie it would not belong to you just because you import/export it via Gimp. The same is true if the image was already protected via the GPL and you import it. You can’t just take an icon-set of a GPL software and use it in your program. However if an image that comes with some GPL software is meant to be under the GPL as well is a bit blurry ( The trouble with artwork and free software licenses - Linux.com ) because it must be clear what’s source and what’s not. ManuelBastioni Lab made this clear: manuelbastioni.com - manuelbastioni Resources and Information. - Makehuman as well: http://www.makehuman.org/license_explanation.php …others don’t make this clear and it may or may not be ok. I think both of them provided theses tools for the purpose in the mind that you can use those .blend files and still use the export in your game. Sometimes things get worse if you ask to much… anyway I don’t see a reason to use any of those as the Makehuman export is fine with weighting, with skeleton, you can use the eyebrow, hair, cloth, … I’m in doubt that you would save some time if you remove the skeleton and replace it (and the weightpainting). If you create some mesh yourself those tools could be handy.

https://creativecommons.org/publicdomain/zero/1.0/deed.en

Of course. But it’s really not that complicated to add some IK bones yourself ( https://www.youtube.com/watch?v=cGvalWG8HBU ). They don’t have any weights (so no painting and other time consuming stuff) you just have to add some Bone constraints to it.

So I purchased the Auto Rig Pro Addon. The auto bone mapping feature to the mesh is neat. Unless maybe I’ve missed something. I’ve gone through the process exactly according to the instructions for exporting specifically for Unreal. It doesn’t put the rig into a pose that matches the default UE4 SK Mannequin. I tried re-targeting as per the documentation specifically for Unreal Engine, also following the Unreal Engine Tips section and nothing lines up correctly.

I appreciate all of the help, but I am still wondering why there is no clear and complete documentation on doing something like MakeHuman -> Blender -> Unreal Engine. I don’t know what I am doing, but people putting documentation online about these things also don’t seem to know what they are doing as it’s always incomplete documentation or videos that are missing vital steps in the process. It’s seems to be a simple case of the blind leading the blind when it comes to Blender with Unreal.

Here is my end result re-targeting:

Editing: After further testing of Auto Rig pro I would say it’s a pretty decent plugin. It definitely simplifies creating a bone structure similar to that of the default UE4 SK Mannequin. You still need to manually match it to the pose of the default UE4 SK Mannequin though if you want to re-target animations properly. It would be nice if it had a feature to adjust the pose automatically to scale and match the UE4 SK Mannequin. (This is asking a lot I know).

I’m just re-writing some of your instructions as they were missing a couple of steps that was confusing me as a beginner:

Makehuman -> Blender -> UE4. That would be:

*) Export from Makehuman as Collada (dae) format and Scale Units set to “centimeter”. With “Game engine” skeleton.

*) In Blender ensure your Frame Rate is set to 30, Scene units set to Metric, with Unit Scale 0.01.
*) Import into Blender with “Fix Leaf Bones”, “Find Bone Chains” and “Auto Connect” selected under Armature Options.
*) Import the UE4 mannequin into Blender (This is your exported UE4 SK Mannequin that has been exported as FBX from Unreal Engine).
*) Put your camera in Front Ortho view. Resize the UE4 mannequin mesh with your Pivot Point tool set to 3D Cursor and then by pressing “S”.
*) Pose the Makehuman character to get a (very) similar pose to the UE4 mannequin. To do this: In Pose Mode select the individual bone joints and move them using the arrows so that they closely match the layout of the UE4 Mannequin. (afterwards delete the UE4 mannequin)
*) Apply the armature modifier to all of your meshes. To do this click on your character in the Outliner. Expand down, and beside each of your Meshes click the wrench icon. Then click “Apply”.
*) Apply the pose as new rest pose in pose mode to the skeleton. Select your character and choose “Pose Mode”. On the bottom left Blender menu click “Pose” -> “Apply” -> “Apply Pose as Rest Pose”
*) Add armature modifiers back to the meshes. To do this select your character in the Outliner. Expand to your meshes. Click the wrench icon. Click “Add Modifier” and select “Armature”. Set the Object as your characters Armature. (Don’t click Apply).
*) Add twist bones (they are a must have). Copy vertex groups (e.g. upperarm_l) and split the weight up (autonormalizing on and subtract and blur) between the twist and the normal bone. (Not sure the exact steps on this but needs further documentation).
*) If you like you could add some IK bones. They are pretty useless in UE4 (as you could use the IK functions even without them in UE4) but very handy while animating in Blender. (Should add documentation for this too for animating in Blender).