If the bones are off center you will get that result. You will need to manually adjust them in blender after the Auto Rig process.
I should have made that clear up front. Sorry.
If the bones are off center you will get that result. You will need to manually adjust them in blender after the Auto Rig process.
I should have made that clear up front. Sorry.
Looks good :). Regarding that twist bones. Take a look where they are on the UE4 mannequin. Think of it like you split up the weight of one bone to two bones. But the bone itself is not split. They are more parallel. The twist bone is a child bone (if you move upperarm_l then upperarm_twist_01_l should follow). If you have an animation without any critical pose than there should be no difference between a mesh with or without a twistbone.
Some example:
Starting point - weight of lowerarm_l vertex group (and a pose that looks bad without twistbone):
Add a bone (use shift-s and snap curser and start/end point of the new bone to get good start and end points based on the already existing bone). Even take a look at the mannequin which bone is a child of which other bone and afterwards copy the vertex group:
This causes too much weight. You’ve got 1.0 on some vertex at lowerarm_l and 1.0 lowerarm_twist_01_l now (= 2.0). Make it that it’s either 1.0 lowerarm_l and 0.0 lowerarm_twist_01_l or 0.5 lowerarm_l and 0.5 lowerarm_twist_01_l (subtract/blur with auto normalize):
Result is split up weights:
…this one is already rotated as you can see the result (the pose is still the same … the only change is that the weight that was on one bone before is now split up on two bones and the twist bone was rotated parallel to the lowerarm_l bone):
But as you can see if I select both bones… it’s still the known weight that you had already previously. So you don’t have to think a lot where the weighting starts or ends at the ellbow for example. You just remove the weight at one end for the first bone and the weight on the other end for the second bone (you have to take a look a bit how it looks good so a bad pose is a good starting point… and even keep the wrist in mind). At the upperarm_twist it’s not the lower part that is critical (wrist) but the upper part (shoulder)… and so on.
Ok. Thanks for that information on the twist bones. I’ll review more when I get back from dinner. For some reason, when I export as Collada (dae) from makehuman, and import into Blender my bones show up super small. Any ideas what might cause this? See image:
There was some change between Blender 2.77 and 2.78 regarding dae. You have to enable all those Armature Options at import now. Unfortunately Blender 2.78b still contains a rotation bug. It’s fixed in the nightly: Blender Builds - blender.org
However I remember some script in another thread that rotated and FBX export. I tested it and it looked promising… but did not really use it myself afterwards. Anyway probably it’s worth a look (because as far I remember it adds blank twist bones as well (without any weight so far… but better than nothing)): Root Motion with MakeHuman? - Character & Animation - Epic Developer Community Forums
thanks Neutronux. I’m still having problems getting my fingers lined up from my rig to the Unreal AnimStarter Pack. They always come out really close, but not quite exact for the gun grip. (as you can see in the image below they curl up in the right hand).
Is it unrealistic to expect a MakeHuman Character that has been re-rigged to have fingers that line up perfectly with the AnimStarter Pack? In building a game using marketplace animations based on the UE4 SK Mannequin, would you normally have to go back and re-adjust each animations fine details such as the fingers?
Ps. I know these arm twist bones are off, because this is a new character where I was focusing on trying to align fingers with the UE4 Tools Addon in Blender. I just want to make sure my Characters are built right from the ground up so I don’t have to go back and start over.
Usually you would avoid going back. Your issue still looks like an issue with the rest pose.
Default MH 1.1 (game skeleton) export (unmodified restpose):
Modified rest pose of MH 1.1 (game skeleton) export:
Modifications (not perfect but already a lot better …so probably a starting point) - Note this is based on the default game skeleton export (not the UE4 Tool):
Rotations:
upperarm_l and upperarm_r x 6
lowerarm_l and lowerarm_r x 5
lowerarm_r yy 20
lowerarm_r y 17
lowerarm_l yy -20
lowerarm_l y -17
hand_r yy -20
hand_l yy 20
hand_r xx -7
hand_l xx -7
hand_r y -10
hand_l y 10
index_01_r: zz 10
index_01_r: yy 5
index_01_l: zz -10
index_01_l: yy -5
ring_01_r: yy 10
ring_01_l: yy -10
Afterwards applied pose as rest pose and changed bone-roll to Global +Y axis… added quick some twist bone (even not perfect but already a lot better).
Just to confirm you are setting this rest pose in Blender right?
Yes… as shown in the screenshot a few post previously: Blender Rigging and Animation - Character & Animation - Epic Developer Community Forums
cyaoeu. I’m just experimenting with your recommended method here; adjusting my character mesh to closely match the bones of the UE4 Tools mannequin Rig. I just did a quick trial run and it does seem to line up better with retargeting the AnimStarter Pack. The Idle_Pistol animation with that grip mostly lined up which is great.
What’s the best way to get the finger joint bones to line up without rotating them? From my understanding of this method you recommend is that it would be better to scale down the hand/finger joints to be smaller from UE4 Tools rig Armature (Layer 1 bones) and then remodel my MakeHuman character mesh finger joints to go over top of the UE4 Tools Rig Armature (Layer 1 bones)? So that I don’t have to change the size of my characters hand/fingers.
If you want to keep the perfect retargeting of the mesh you can only scale the bones, not move or rotate them. So you can really only change the proportions. What I would do is select the ball part of the bone near the wrist (can be either a hand bone or an arm bone), then do Snap Cursor to Select (search with spacebar). The 3d cursor will appear at that joint, then change the pivot point from median point (or whatever the default is) to the 3d cursor.
Next select the bones you want to scale, probably the whole hand to begin with, including IK bones/control bones. Then scale them to roughly fit the size of the hands in your mesh. Do the same with the fingers too if you want (moving the 3d cursor to the innermost finger bone). Then you’ll have to actually move the vertices of the mesh to fit with the rig. You can have the Hero Mannequin mesh as a reference mesh to see how the fingers/thumb line up.
The fingers of the UE4tools rig is setup to rotate inwards on the Z axis, to see how that looks start the rotation operation and press Z Z. The thumb moves closer or further away from the fingers so keep that in mind when editing the mesh. Basically just look at your own hand and mimic that.
thanks cyaoeu. I’ve made a few attempts at modifying my mesh so it matches the UE4 Tools rig but still having a lot of trouble when getting to the fingers. For now I’m going to spend more time with Neutronux method of using the skeleton from MakeHuman and add the twist bones. I think this is a more simpler approach for me as a beginner.
Hi Neutronux. I think I’ve got the twist bones setup right. Does this look correct to you? I made the twist bone the same size as the regular bone as that is how the SK Mannequin had it.
I’m also having a problem with clothing. And thought you might have good advice. I’m trying to make a loose hooded jacket. I’ve parented the jacket to the armature “With Empty Groups”. I then did a weight transfer from the body object to the jacket. For the most part it works, but the body arms tear through when the pose is changed. Iv’e tried different weighting on the jacket and it helps in certain spots, but for the elbows it doesn’t seem to help. (See images).
It’s not easy to guess how it would look if you do the weighting in the restpose. I would recommend:
*) Export this rifle anim (that is already retargetted to your skeleton) as fbx from UE4.
*) Import it in Blender. It should look almost ok (don’t waste your time with the skeleton if it does not - even if it is terrible rotated… you would not improve the skeleton but the weightpainting right now)
*) Unrotate all bones that are not of interesst (select and do ALT-R pelvis, spine_01, …) focus on your arms. We would get a symetric mirror-pose.
*) Select all your arm and hand bones in pose mode, include the clavicle as well and hit “CTRL-C” in pose mode.
*) Now mirror your selected bones pose with Shift-CTRL-V.
*) If you exported the mesh with your animation then remove the mesh from UE4 export now in Blender (you don’t need it… grab an original mesh from Blender).
*) Open a further Blender session. Copy (only) your relevant mesh(es) with CTRL-C and paste it into your second Blender window with CTRL-V.
*) Add the skeleton from the animation as modifier to your copy/pasted mesh(es) (your copied mesh should now be in the pose of the anim).
*) Now… start weightpainting. Autonormalize on. X-Mirror on (or if not then copy all those group in vertex manager). I think it’s faster with X-Mirror on but usually it would make some dirty painting.
*) If you are done… Check your mesh if the X-Mirror did not do weird stuff: In weightpaint mode go to the options tab (left “T” sidebar) and choose “Show Zero Weights”: Active…
*) Go to the vertex groups (triangle symbol right side) and click on all of them (arrow down key on keyboard). If you see a weight on both sides of the arms at one group… remove it with your subtract brush in weightpaint mode.
*) If you are done… click to the Tools and Weight-Tools tab in Weightpaint mode (left “T” sidebar) and do “Limit Total” and choose 4 or 5. Usually 4 bones should be enough for any vertex (and should remove some dirt from X-mirror… like 0.00001 on lower_arm_l from lower_arm_r … which is garbage).
*) Afterwards do… “Clean” in the Weight-Tools tab to remove all 0.0 weights. If a vertex does not got weight on a bone then the assignment is useless.
*) Afterwards do… “Normalize all” in the Weight-Tools tab… to make sure that really every vertex got 1.0 weight.
*) Copy your mesh and put it back to your second Blender window (save and remove the original mesh first). Assign the armature modifier back to your orignial skeleton (that one that was no UE4 import but some MH import modified by you few days ago or so).
*) Take a look into the materials … if you copy paste via two Blender windows Blender might think he have now 2 materials and renames something to material.001 or so (rename it back … as you deleted the original mesh).
*) Now export the mesh from Blender again and do Reimport mesh in UE4. You should have the exact same looking pose and the exact same looking weightpainting (as in Blender).
Regarding your cloth. Weight transfer is the correct way to go with this. However you could try to fix this issue with different transfer options. E.g. if it should take the nearest vertex or face. It’s even possible that you got too less polys at the ellbow (try subdiv). For example if your cloth ellbow is green with few faces and your skin ellbow is green with many faces the cloth would do it’s best via splitting up the 0.5 between is few faces but it would look like you would create a circle with just 2 matches vs a circle with 10 or so. And as a further hint… those polys are hidden (right now). If you don’t plan to show her naked ellbow then remove those skin polys. You would lower the polys and with this suit it should even be not that necessary (while I still recommend to add) the weightpainting for the twistbones (as the arm/hand would usually turn below the cloth). This blue cloth is no knights-armor of course but it’s even no rubber and it would not look that painfull like a twisted balloon without any cloth with offset (like in the lower screenshot) if you keep the hand and the lowerarm_l weights seperate.
Thanks for the steps Neutronux. This is very helpful. Going to try and spend some time on this over next day or so. I was able to apply a “Mask” to hide the skin polys under the mesh. I think I’d like to keep them there just in case I need to re-cloth the character later.
Neutronux, So far my ironsights animations are working great now after your tips. Although now my jacket is twisting one arm when it falls down the the death ironsights animation. So I think that I need to adjust the weight paint on my jacket for those twist bone areas. (My body under the jacket and pants is masked out). The problem is when I try to add weight paint on the jacket for those vertices (upperarm_twist_01_l, upperarm_l) I get the error “Warning skeletal mesh influence count of 57 exceeds max count of 8. Influence truncation will occur. Maximum Ignored Weight 0.005”. I’ve tried googling this, but can’t seem to find what it means exactly.
Here is the error on import after I’ve tried applying some weight paint to the jacket for those twist bones.
I think I found the problem. It’s more with the Unreal animation for Death_Ironsights_2. If you play the default mannequin animation it has the same glitch. For my weighting, I ended up weighting doing automatic weighting on the clothes and that seems to have worked better than weight transfer.
Regarding your warning (if it still exists). This sounds a bit like too much (useless) bones are assigned with (usually almost 0.0) weight to vertices. If you do that “Clean” step make sure you don’t limit to one group (e.g. if you selected only one bone) but change the pulldown to all groups (in the left “T” sidebar)… and probably even set some limit 0.00001 or so. You can select single vertices in the weightpaint mode and you could see the assigned bone/vertex_group names in the “N” sidebar afterwards. For example at some vertices near the ellbow you would see some values for upperarm and lowerarm bones. For example 0.5 upperarm 0.499999 lowerarm and 0.000001 some foot_l (which is **** at the hand as the hand does not require the foot to tell him how he should move the vertices around) or some other bone somewhere far away or from the right side instead the left (caused via X-mirror painting earlier). It sounds like you have for some reason 8 bones assigned to one vertex. “Clean” in Blenders weightpainting mode should remove all such wrong assignments below the specified weight. So if you set some limit it would left for example 0.5 upperarm and 0.499999 lowerarm. And “normalize all” should set afterwards the missing 0.000001 to one of those two bones. However it seems even UE4 made some kind of clean now as it seems everthing below 0.005 was dropped anyway (I’m not sure if this is the lowest weight in UE4 or just the lowest weight after there are too much bones pulling on one single vertex).
Regarding that Death_Ironsights… I think this is an anim bug. Probably many don’t care because you could get better “animation” via physics ragdoll (instead of keyframed anim) to “die”.
auto rig pro at Blender market, the cost is currently $36.00 enabled me to retarget my blender mesh to the SK_Mannequin rig in unreal, so my blender mesh can use the unreal mo cap files. it is like an art tools for blender. Auto-Rig Pro - Blender Market
please update to 2.8x