BoneBreaker - FREE Blender plugin for mannequin animation

Hey great work on the plug in. There is something I still don’t get, sorry if this has already been asked (and I’m sure it has, but I’m new to Unreal and animating in general).
I’ve been able to export the UE mannequin, make an animation, export it, and then play the animation in UE4. Cool. But this is on the mannequin model from Unreal.

How can I use the animation on my own model? What is the workflow? Say that I have a character model without any bones attached to it (just the mesh), what do I do? I’ve tried reading this topic and finding more info online, but everyone seems to be doing something different.

I believe in the end everyone will always do it differently.

Ideally you should just create your own rig for your custom character starting from a new armature that makes sense in blender.
You can utilize rigify after generating and applying a humanoid metarig to get the base structure and the rig. Or you can download the many versions of free ones available everywhere and adapt it.

If all you have is a mesh you will need to weight paint it or assign the vertices to the proper bone for it to be affected.
it is a bit of a long process.

After you have the base mesh ready to go you can simply create a pose that is as similar as possible to the mannequin and re-target the animations in order to utilize whatever mannequin animation onto your mesh without too many complications.
There are many tutorials for the whole retargeting thing. The only thing you really need to worry about is to get the rotations as close as possible to the mannequin pose.

Ok, I should not have said that all I have is a base mesh, my bad! I actually did most of that work, I have the mesh, I made an armature, rigged the whole thing, and I even made some animations for the character, imported them in UE4 and they work fine. (They’re ugly but fine lol)

What I wanted to do was being able to, in addition to my own animations, also use animations from the UE4 marketplace, which are made to work with the standard skeleton rig (the one from the mannequin). I thought your plugin was going to help with that, but as far as I understand it’s “just” to import the UE4 skeleton in Blender, animate it and the re-import it in UE4 without problems, right? So techically I can’t animate the mesh I made (unless I do the weight paint again which I really don’t want to do haha) with it, but I have to retarget the animation in UE4.

How do I get the rotation completely right though? Do I just pull and twist my rigged mesh until it matches the mannequin in blender, or are there values I can copy-paste from the mannequin imported with your plug-in to my rigged mesh? I tried retargeting an animation to my mesh, which is in an A-pose similar enough to the mannequin’s A-pose, but the animation was a mess. Maybe it was because my own armature from blender has IK and I imported them in UE4? (Should I remove the IK from the armature in blender?)

No ik bones should stay.

To match poses as close as possible I would suggest importing the ue4 mannequin, scaling it up or down so the arms and legs match your character, and then modifying your characters pose (the bones not the mesh) to match the mannequin’s A Pose as best you can.

You have the mesh of the mannequin already in the correct pose for you to do all of this visually, so you should just separate the layers (that are now collections) and hide the select option on the mannequin once you scaled it so you can overlay your own armature and move it without accidentally changing the object you have selected.

It doesnt take that long if you don’t have super strange changes like extra long arms / legs to deal with.
Finger rotations also matter obviously.

In all of the rotations you should also make sure that at least 1 axis of the bones match exactly - but they usually just do, and you would notice as soon as you re-target something if they did not - it gets pretty wild with knees bending backwards on one side XD

A new update will be out shortly.
I have finished the process of isolating my original code from the rest so as to publish within the UE4 marketplace without issues.

for forum visitors, you can snag an early release from this direct link:
http://mosthostla.com/downloads/bonebreaker-v3.5-2.8.zip

The website and the new curves addon will be released later on along with a complete reworking of the website section that houses my game development stuff - and hopefully the official Blender 2.8 release.

Forum Only video share for now:

Hi, the link is returning a 404 error, looking forward to trying it out, :slight_smile:

Fixed the link above, and adding it here as well:
http://mosthostla.com/downloads/bonebreaker-v3.5-2.8.zip

Well, Website and Addons are updated/released.
You can now find the ue4Curves plugin as well.
direct link:
http://mosthostla.com/gamedev/ue4curves/

I’m still attempting to get it published on the UE4 marketplace, but I think the marketplace people are having some real trouble with the fact the plugin is not meant for UE4… Maybe if some moderator passes by they can put in a good word :stuck_out_tongue:

Hi everyone.

Just pushed a new update that corrected some oversights and interpolation with the curve ad-dons. You should get both fresh versions if you are working with this as they’ll make your life a lot easier.
http://mosthostla.com/gamedev/bonebreaker/
http://mosthostla.com/gamedev/ue4curves/

And this plugin only works with the ue4 mann or can I use any character rig to the epic skeleton?

I have only ever tested with the mannequin, but if they utilize the same bone hierarchy (the epic skeleton) this should work with whatever weight painted mesh that shares the same skeleton.

Awesome It actually works I tested with one of the stylized character from the marketplace and it works perfect. Thanks for the reply :slight_smile:

Hey all.
Everyone always asks the horrible question…
Can I rig my character with this? The answer is finally YES.

Tried and true, very cumbersome method is as follows.

  1. Make your starting mesh, UVit, texture it. do all the basic stuff you are required to do.

  2. Open Blender, Import SK Mannequin, Generate Metarig only.

  3. Copy metarig to a new one - we need to merge up some bones onto the mannequin for good measure.
    In Edit mode, remove every bone except Breast.L, Breast.R, Pelvis.L, Pelvis.R, The Face bone and all it’s children.
    Optionally create your toes? This can be a lengthy manual process, but if you need toes you do need to make them.

  4. Drop out into object mode. You should have the modified Metarig selected. Select the ROOT armature and CTRL+J to merge the 2.

  5. Make sure to correctly parent the Breast, and the Pelvis, as well as the Face and any toes.
    Breast go to Spine_03, Pelvies 2 pelvis, and Face to Head.
    At this point you have a basic skeleton that resembles the UE4 one, but has a few extras. Here’s a screenshot as an example - Pink bones are the Extras.

Step 6
With the Meta-rig Selected, Generate your rig through the skeletal tab/regular Rigify button.
After it’s done, you get your nice little rig that doesn’t move anything at all.

Step 7
Take your mesh you need to rig, Parent it to the rig with empty weights.
This is the “magic” basically. The rig does a better job painting weights then a human with little experience doing it manually.

Step 8
You have your mesh, it’s got it’s ton of vertex groups and it deforms correctly with the rig - Don’t animate yet. this is the starting point to actually get things into UE4 with the right skeletal mesh.
Click the mesh, and Unapparent it from the rig armor.

Step 9
Parent the mesh to the Root armor - select only Armature deform.

Step 10
Right now it’s a mess. the bone names for the vertex groups are all screwed up. No worries.
you can try to run this script:



import bpy

OriginalBones="spine_01","spine_02","spine_03","head","teeth.T","teeth.B","teeth.B","forehead.R","forehead.L.001","forehead.R.001","forehead.L.002","forehead.R.002","temple.L","temple.R","brow.B.L","brow.B.L.001","brow.B.L.002","brow.B.L.003","lid.B.L","lid.B.L.001","lid.B.L.002","lid.B.L.003","lid.T.L","lid.T.L.001","lid.T.L.002","lid.T.L.003","eye.L","eye.R","lid.B.R","lid.B.R.001","lid.B.R.002","lid.B.R.003","lid.T.R","lid.T.R.001","lid.T.R.002","lid.T.R.003","brow.B.R","brow.B.R.001","brow.B.R.002","brow.B.R.003","chin","chin.001","chin.L","chin.R","brow.T.L","brow.T.L.001","brow.T.L.002","brow.T.L.003","jaw","jaw.L","jaw.L.001","jaw.R","jaw.R.001","brow.T.R","brow.T.R.001","brow.T.R.002","brow.T.R.003","cheek.T.L","cheek.T.L.001","cheek.T.R","cheek.T.R.001","cheek.B.L","cheek.B.L.001","cheek.B.R","cheek.B.R.001","tongue","tongue.001","tongue.002","ear.L","ear.L.001","ear.L.002","ear.L.003","ear.L.004","ear.R","ear.R.001","ear.R.002","ear.R.003","ear.R.004","nose","nose.001","nose.002","nose.003","nose.004","nose.R","nose.R.001","nose.L","nose.L.001","lip.T.L","lip.T.L.001","lip.T.R","lip.T.R.001","lip.B.L","lip.B.L.001","lip.B.R","lip.B.R.001","toe.01.L.01","toe.01.L.02","toe.01.L.03","toe.02.L.01","toe.02.L.02","toe.02.L.03","toe03.L.01","toe03.L.02","toe03.L.03","toe.04.L.01","toe.04.L.02","toe.04.L.03","toe.05.L.01","toe.05.L.02","toe.05.L.03","toe.01.R.01","toe.01.R.02","toe.01.R.03","toe.02.R.01","toe.02.R.02","toe.02.R.03","toe03.R.01","toe03.R.02","toe03.R.03","toe.04.R.01","toe.04.R.02","toe.04.R.03","toe.05.R.01","toe.05.R.02","toe.05.R.03","thumb_01_l","thumb_02_l","thumb_03_l","index_01_l","index_02_l","index_03_l","middle_01_l","middle_02_l","middle_03_l","ring_01_l","ring_02_l","ring_03_l","pinky_01_l","pinky_02_l","pinky_03_l","thumb_01_r","thumb_02_r","thumb_03_r","index_01_r","index_02_r","index_03_r","middle_01_r","middle_02_r","middle_03_r","ring_01_r","ring_02_r","ring_03_r","pinky_01_r","pinky_02_r","pinky_03_r","thigh_l","thigh_twist_01_l","calf_l","calf_twist_01_l","foot_l","ball_l","thigh_r","thigh_twist_01_r","calf_r","calf_twist_01_r","foot_r","ball_r","clavicle_l","upperarm_l","upperarm_twist_01_l","lowerarm_l","lowerarm_twist_01_l","hand_l","clavicle_r","upperarm_r","upperarm_twist_01_r","lowerarm_r","lowerarm_twist_01_r","hand_r","breast.L","breast.R"]
CorrespondingBones="DEF-spine.001","DEF-spine.002","DEF-spine.003","DEF-spine.006","ORG-teeth.T","ORG-teeth.B","DEF-forehead.L","DEF-forehead.R","DEF-forehead.L.001","DEF-forehead.R.001","DEF-forehead.L.002","DEF-forehead.R.002","DEF-temple.L","DEF-temple.R","DEF-brow.B.L","DEF-brow.B.L.001","DEF-brow.B.L.002","DEF-brow.B.L.003","DEF-lid.B.L","DEF-lid.B.L.001","DEF-lid.B.L.002","DEF-lid.B.L.003","DEF-lid.T.L","DEF-lid.T.L.001","DEF-lid.T.L.002","DEF-lid.T.L.003","MCH-eye.L","MCH-eye.R","DEF-lid.B.R","DEF-lid.B.R.001","DEF-lid.B.R.002","DEF-lid.B.R.003","DEF-lid.T.R","DEF-lid.T.R.001","DEF-lid.T.R.002","DEF-lid.T.R.003","DEF-brow.B.R","DEF-brow.B.R.001","DEF-brow.B.R.002","DEF-brow.B.R.003","DEF-chin","DEF-chin.001","DEF-chin.L","DEF-chin.R","DEF-brow.T.L","DEF-brow.T.L.001","DEF-brow.T.L.002","DEF-brow.T.L.003","DEF-jaw","DEF-jaw.L","DEF-jaw.L.001","DEF-jaw.R","DEF-jaw.R.001","DEF-brow.T.R","DEF-brow.T.R.001","DEF-brow.T.R.002","DEF-brow.T.R.003","DEF-cheek.T.L","DEF-cheek.T.L.001","DEF-cheek.T.R","DEF-cheek.T.R.001","DEF-cheek.B.L","DEF-cheek.B.L.001","DEF-cheek.B.R","DEF-cheek.B.R.001","DEF-tongue","DEF-tongue.001","DEF-tongue.002","DEF-ear.L","DEF-ear.L.001","DEF-ear.L.002","DEF-ear.L.003","DEF-ear.L.004","DEF-ear.R","DEF-ear.R.001","DEF-ear.R.002","DEF-ear.R.003","DEF-ear.R.004","DEF-nose","DEF-nose.001","DEF-nose.002","DEF-nose.003","DEF-nose.004","DEF-nose.R","DEF-nose.R.001","DEF-nose.L","DEF-nose.L.001","DEF-lip.T.L","DEF-lip.T.L.001","DEF-lip.T.R","DEF-lip.T.R.001","DEF-lip.B.L","DEF-lip.B.L.001","DEF-lip.B.R","DEF-lip.B.R.001","DEF-f_toe.01.L.01","DEF-f_toe.01.L.02","DEF-f_toe.01.L.03","DEF-f_toe.02.L.01","DEF-f_toe.02.L.02","DEF-f_toe.02.L.03","DEF-f_toe.03.L.01","DEF-f_toe.03.L.02","DEF-f_toe.03.L.03","DEF-f_toe.04.L.01","DEF-f_toe.04.L.02","DEF-f_toe.04.L.03","DEF-f_toe.05.L.01","DEF-f_toe.05.L.02","DEF-f_toe.05.L.03","DEF-f_toe.01.R.01","DEF-f_toe.01.R.02","DEF-f_toe.01.R.03","DEF-f_toe.02.R.01","DEF-f_toe.02.R.02","DEF-f_toe.02.R.03","DEF-f_toe.03.R.01","DEF-f_toe.03.R.02","DEF-f_toe.03.R.03","DEF-f_toe.04.R.01","DEF-f_toe.04.R.02","DEF-f_toe.04.R.03","DEF-f_toe.05.R.01","DEF-f_toe.05.R.02","DEF-f_toe.05.R.03","DEF-thumb.01.L","DEF-thumb.02.L","DEF-thumb.03.L","DEF-f_index.01.L","DEF-f_index.02.L","DEF-f_index.03.L","DEF-f_middle.01.L","DEF-f_middle.02.L","DEF-f_middle.03.L","DEF-f_ring.01.L","DEF-f_ring.02.L","DEF-f_ring.03.L","DEF-f_pinky.01.L","DEF-f_pinky.02.L","DEF-f_pinky.03.L","DEF-thumb.01.R","DEF-thumb.02.R","DEF-thumb.03.R","DEF-f_index.01.R","DEF-f_index.02.R","DEF-f_index.03.R","DEF-f_middle.01.R","DEF-f_middle.02.R","DEF-f_middle.03.R","DEF-f_ring.01.R","DEF-f_ring.02.R","DEF-f_ring.03.R","DEF-f_pinky.01.R","DEF-f_pinky.02.R","DEF-f_pinky.03.R","DEF-thigh.L","DEF-thigh.L.001","DEF-shin.L","DEF-shin.L.001","DEF-foot.L","DEF-toe.L","DEF-thigh.R","DEF-thigh.R.001","DEF-shin.R","DEF-shin.R.001","DEF-foot.R","DEF-toe.R","DEF-shoulder.L","DEF-upper_arm.L","DEF-upper_arm.L.001","DEF-forearm.L","DEF-forearm.L.001","DEF-hand.L","DEF-shoulder.R","DEF-upper_arm.R","DEF-upper_arm.R.001","DEF-forearm.R","DEF-forearm.R.001","DEF-hand.R","DEF-breast.L","DEF-breast.R"]

#first, let's rename all the known bones correctly.
for index, bone in enumerate(CorrespondingBones):
    if bpy.data.objects'Sk_Mannequin.000'].vertex_groups.get(bone) is not None:
        bone = bpy.data.objects'Sk_Mannequin.000'].vertex_groups.get(bone)
        print(bone.name)
        bone.name = OriginalBones[index]


What does it do? It goes through all the mesh vertex groups and renames them to what they SHOULD be - based on the starting mannequin.

This makes it so that the UE4 bones actually have the same weight as the rig - and therefore somewhat cleaner animations.

Step 11
Merging extra weights.
Blender has a special tool to merge/mix weight paint. You want to use this in a few cases for the leftover DEF- vertex groups.
This is usually a “done by hand” process that’s a bit tedious, but important.
The bone you will certainly have issues with the is the neck.

The metarig/rig use 2 bones for the neck, UE4 only has one. As a result you will need to merge/add the weight paint from Spine 04 to Spine 05 and rename them to Neck_01

Here is a screenshot of how you want the modifier setup. Pro tip, you can leave the Vertex Group A selected in WeightPaint mode and as you make changes to the modifier you will see what all the different options do :wink:

For grp a make sure you select DEF-Spine.005 for grp B select DEF-Spine.006

Once you apply that you can rename DEF-Spine.005 to Neck_01

Once all the extra weights are merged you should get a complete custom mesh that exactly follows the mannequin so…

Step 12:
Select the root, Select the mesh - click the export button.
You are just exporting the FBX, the currently live plugin is missing the edges and faces button included in the screenshot above.

Make sure to check the Only Selected (you don’t want the metarig or the rig exported).
You don’t even need to check “only deforms”, as what we have is the right rig with just a few extra bones.

Step 13:
Import to UE4 - same settings as always. maybe generate the PHAT. don’t select a skeleton you want to generate it.

Step 14
Open Persona and get to the Skeleton. Set up re-targeting.
Select the drop down, click humanoid, and auto map. Set the base pose. create a custom mesh above that. Save the skeleton.

Step 15
Re target a UE4 animation to test. go with something crouching or jumping. you need a complex animation so you can weed out issues.

COMMON ISSUES:
My shoulders are deformed!? yes. very likely. I think the script above has the twist and the shoulder order inverted. It’s easy enough to rename the vertex groups on these manually.

Some stuff isn’t moving?
That’s expected. None of the steps above told you to delete all of the remaining DEF- bones - on purpose. You need to see which have to be merged together and how. the only way is to keep on re-importing the base mesh and looking at the changes within the same re-targeted animation.

Some stuff looks just wrong?
Yep, that’s the weight paint. Not even the automated system is perfect. You might need to adjust things. Definitely because of the extra bones some things may be off and need re-adjusting.

Luckly, you have all the parts to set up the BoneBreaker rig and fix it up. You just need to follow the nomenclature and structure of a working bone breaker rig - and then you can Generate Rig from the Meta-rig, or import the UE4 re-targeted animations and generate from that to adjust.

A proper port of this method will be scripted and included in future release with some buttons and features that allow to make this 15 steps of a mess into something a little more manageable.
Currently, the biggest “odd” area is the thigh-to-hip zone.
And the neck area.
Both of these are possibly best handled by modifying an export of the re-targeted animation.

Is it possible to export root motion?

I don’t see why not. In fact I have done it in error before.

May I ask what I should be doing in order to export root motion? I tried keyframing the rigify root controller, which looks fine in Blender but doesn’t seem to import correctly.

When importing to Unreal it looks like it has root motion (as in the whole body is translating) but upon closer inspection the root appears to be the only bone that doesn’t actually move at all.

Would be great to get this working

To move the root bone you have to move the whole armature. Basically not in pose mode.
(Because upon import ue4 adds a bone for the whole armature as root)

I must be doing something wrong then because I get the same result when moving/keyframing the whole armature in object mode.

Are you importing the whole thing anew, or using the existing skeleton?
try both. Shouldn’t matter, but maybe it does.

Alternatively, just rename the armor to anything other then Root.

Import the new skeleton - since it’s now changed, and check the hierarchy to verify that you still have 1 root bone.

the parser may be getting confused by the double root names. One is a sinlge bone, one is the whole armature.

Renaming the armature to root will cause the plugin to stop recognizing it as an armature and disable some features (maybe even export button). So you may have to export manually.

If this renaming works I’ll patch the plugin to rename stuff so that root motion just exports without modifications. LMK.

hear ye, hear ye.
A Pre-GameJam update is live.

Fairly simple, it just makes it easier to export meshes correctly via the new interface buttons.

NB: this is to export meshes, static ones usually, not necessarily animated stuff. particularly, not the rig.