Rigging in Blender to match UE4 character rig - possible?

If you import UE4’s Mannequin FBX into Blender, you’ll see bones are oriented entirely differently from how you’d usually have bones for characters in Blender.

Is there a way to rig and weight characters in Blender as we usually do that and export them in a way that output rig matches UE4’s Mannequin bones’ orientation exactly ?

While it doesn’t matter for 100% custom characters, it actually matters for characters that will use animations from UE4 or Marketplace. Plus, if a Blender artist/animator wants to make a character for Marketplace, they have to comply with the requirement of making rig match UE4 character rig specs.

Thanks beforehand.

Bumpppppp!

I’m looking into this for you. I work here at Epic and have been talking to another artist here about Blender and animation from the Marketplace. I didn’t realize it was an issue until very recently.

1 Like

Ah, thanks a bunch!

We just had a long conversation in the hall about this and I guess there are some issues as to how the mannequin was built (specifically built for a Maya workflow). I’ll do some testing when I get time but you should be able to constrain the mannequin rig to your blender rig and drive it that way.

If you like, we can test this together. I’ll share what I’ve found on my end but this is definitely a subject that needs to be solved. Blender users should be able to use animation from the Marketplace without much hassle imo.

1 Like

Thanks for looking into it!

I guess Maya’s bone axes are different than Blenders?

I could constrain it in Blender, but then it will be a total pain to get angles and limits correct. Plus that only solves issue “conventionally animating Mannequin in Blender”. I wouldn’t be able to make a new character from scratch and make it UE4 standardized.

One of the issues is that if the skeleton doesn’t match one from Mannequin, it won’t be accepted to Marketplace.

I was also thinking getting rig from Mannequin and using it in Blender with a new character mesh. However, it would not be possible to “skin” it to another mesh, because Blender won’t apply weights properly with bones oriented the way they are in the UE4 characters. I am sure it’s possible to achieve by manually painting weights, but who would do that in production settings :slight_smile: Plus it would still be a royal pita to animate such rig in Blender.

Another thing that comes to mind is having 2 rigs and 2 meshes. One rig/mesh would be just like mannequin’s. Another one will be like conventional Blender rig, but with the same bones and naming. It might be possible to transfer weights from normal Blender rigged character to mannequin-structured character. It’s just a wild theory, but since bones are the same, naming is the same, so the vertex groups should match the bones, even though bones are differently oriented. Even if this works, it’s still a royal pita to work with.

The core issue if with having to weight mesh to armature with bones oriented differently than what Blender expects.

Sure, if I knew what kind of test case to implement :slight_smile: Right now I am still battling with 4.13 and Instanced Static Meshes rendering issues for Gear VR platform. So I am not quite where I need to be to begin investigating characters in UE4. I just figured this topic will take a long time to develop and that’s why I posted it now rather than when I get to the point where I need a solution yesterday :slight_smile:

So if you notice, even though the bones draw differently on the mannequin rig, they still move the mesh correctly so the weights and parents are working properly in Blender. The trick will be getting the animation off that rig and onto a proper Blender rig… and going in the right direction. I would start by making an orient constraint from a mannequin bone chain to a Blender bone chain and see if it rotates correctly. I’m not sure what kind of offset options we have in Blender.

Sure, but the end goal is to rig mesh in Blender in conventional way (think bones oriented as in Rigify rig; but hierarchy and names as just like in the Mannequin rig), and export it so that it’s compatible with Marketplace standard (and anims).

Have you look into this?

@thedaemon

Looks like everyone is having issues with that. Plus, it doesn’t solve this fundamental problem

@tommywright

Layer 1 has UE4-rig (I got bones’ orientation from the top of my head, since it’s nothing like what Blender animators use anyway :P)

Layer 2 has standard Blender rig.

With autoweighting mesh to armature, you can see what I am talking about - UE4 rig doesn’t deform mesh properly.

However, I tested one of my theories - I did vertex data transfer from mesh in Layer 2 to the mesh in Layer 1, while keeping UE4-rig intact (I removed all vertex groups from that mesh prior to transferring vertex data). And it worked :slight_smile:

Basically with that, one can:

  • import Mannequin,
  • delete Mannequin mesh,
  • duplicate new custom mesh (assuming mesh is rigged with standard rig with the same bones/names as UE4-rig and weighted properly) and remove all vertex groups from it,
  • adjust UE4 rig to fit the duplicate new mesh,
  • parent duplicate mesh to UE4-rig armature (without any weights or groups)
  • transfer weights from custom mesh to the duplicate

This way you get your custom mesh with proper deformations and UE4-compliant rig. Now you just need to create control rig with constraints for UE4-rig (control rig would be conventional Blender rig) if you wish to animate your mesh, or you can just export character and use UE4 anims.

Note that I haven’t tested the whole enchilada. I only tested weight transfer to correct deformations.

1 Like

Hey gang,

My name is Kevin Vassey. I’m the technical animator from Epic Games that made a few Twitch streams with Blender tutorials. @tommywright showed me this thread after we chatted about it yesterday…

I’ve been working on this exact problem for a loooong time now. It’s not sanctioned work, per se, so it’s mainly been my free time. Currently, I have had little to no luck getting a control rig onto the mannequin properly in Blender. The main issue I keep running into is constraints with a proper ‘maintain offsets’ option. Maybe this community can save the day on that part. I’ve tried drivers but have run into too many issues trying to capture the proper relationship between rotating on various axes. Does anyone know of a more Maya-like ‘maintain offsets’ constraint for bones??

As for animation errors importing the FBX, which were detailed in that linked thread above, I see the same thing all depending on the version of Blender. I think the best solution there is to import your Blender mannequin with it’s own skeleton asset and then use the retarget manager to get the marketplace anims on YOUR version of the mannequin. The one danger I can foresee here is dealing with blueprints created as part of the marketplace package you might be using. If they are expecting the joints to point down the arm a certain way, for example, and Blender changed that to allow head and tail connections, you could break a lot of the functionality you paid for. That would be bad.

In my most successful attempts to get this working seamlessly, I still get aim problems with the control armature and mannequin armature knees. I don’t believe Blender likes creating IK on joints that are not planar in space. This mean that there is always a huge offset on the pole vector when the knee is pointing straight visually. This can be super annoying and would probably slow down a lot of animators.

But, all that being said, I’m excited to talk more about this process and hopefully get something working for the community.

:slight_smile:

1 Like

@motorsep

And everyone, if you find a solution to this, please share it!

AFAIK, it’s not very likely that there is an easy solution for transferring non-blender rigs / skeletons to or from Blender…

So far what I’ve used Blender (very little, on and off), it seems to be impossible to preserve original bone and joint orientations.

First of all, AFAIK Blender only has a very “rigid” understanding of bones - it doesn’t even have a separate bone and joint, it always makes joint align with bone, and bones only can have one specific length axis (was it Y?) and this sucks big time IMHO.

It’s even more old fashioned than Max, and nowhere as flexible as Maya. More like LW back in the day.

So, you’ll run into problems when importing FBX skeletons;

If you want preserve original joint orientations, you’ll end up having wonky bone orientations in viewport.

Maybe this could be fixed with some import / export script, unless there is a mentioned mystery way to do this already.

I’ve done similar import/export hacks/scripts in Max, (I’m not a programmer) but I’ve not used Blender/Python enough to get this done yet, but have thought about getting into this subject…

Please correct me if I’m wrong about bone axis stuff (I hope I am).

I believe that’s what I did in above post. It’s crude, but it should work. I can only verify the solution if I literally sit down, recreate Mannequin’s rig in Blender from scratch, then make normal Blender rig (and I am not even talking about IK/FW, just plain FK deforming rig), skin the character, transfer weights and export FBX. Then I can tell for sure.

That’s not always required.

If Blender doesn’t do it the same way 3D app X does, it doesn’t mean it’s doing it wrong. I used it for my character for Doom 3 engine and had no issues with it. Just different philosophy. The issue is FBX and Autodesk. But that’s besides the point.

Not if you are not planning on using existing anims. If you have custom character and entire set of anims done for it, then you will have zero issues bringing it to UE4.

@motorsep

Well I probably didn’t underline my issue properly or clearly enough;

A. It’s not most of the time possible to use endless hours to get just one model+skeleton then work on it for hours to get the required result. In reality, you get a rigged/skinned model, it’s expected that you can just open it, then send it back later.

To be able to use Blender for professional work, this is required IMO.

B. Blender doesn’t do it the same way 3D app X does
…does not mean anything. Sticking head into sand does not change the world around.

I’ve got nothing against Blender, and seems like they are not even ignoring industry standards, but tool set seems to be lacking features that are important.

Unless one is very skilled scripter/coder it’s very hard to solve these issues.

IMHO it has nothing to do with “Philosophy” -> if I only got one way to orient joints, that is a limitation, Autodesk has just thought it more and they have more robust solution.

And I’m not going to discuss meaning of formats like FBX, until something else replaces it…

C. Not if you are not planning on using existing anims.
And that is not so often in real world cases, of course that depends on what you do.

AFAIK this is the main reason Blender has issues of transferring animations from/to Max/Maya/Unity/UE.

There is no problem getting rigged characters and animation from Blender to Unreal. The OP is asking about getting Marketplace animation (animation that was baked down to a specific Unreal Mannequin) onto a Blender rigged character which is the challenge. I’m not aware of any fundamental differences of Blender’s bones over other software.

That’s not the topic of this thread. The topic is, as tommywright pointed out, how to rig a character in Blender is it’s out of the box compatible with stock UE4 animations and animations from the Marketplace.

It has to do with bones’ axes, which are different from software to software.

Btw, you don’t need to import Mannequin into Blender. You can open it in UE4, look at the hierarchy and bones’ names and recreate it in Blender from scratch.

1 Like

Hey gang,

I’m Kevin. I’m the technical animator from Epic Games that did all the Blender tutorials for the Twitch stream a while back. Tom and I were talking about this issue in the hallway the other day. I’ve been working on getting the UE4 mannequin into Blender, animate him, and get him back into UE4 with marketplace assets. It hasn’t been sanctioned time unfortunately, so it’s all based on my free time. I’ve found it difficult to say the least. There is a fundamental difference in the way Maya and Blender work with bones, and all the marketplace assets are based on the Maya workflow most of the engine customers use. I’ve gotten things extremely close, but always run into the same problem…constraints with a ‘maintain offset’ option. I’ve tried all the copy rotation/transforms constraints, as well as drivers, and they all cause issues in slightly different ways. There are definitely other issues too, like trying to make control rig IK pole vectors be super accurate to the A-pose leg of the mannequin, but the constraints are the biggie.

There are also a few issues with joint rotation and importing that animation onto the mannequin in the level. I think the best method here is to import the Blender version of the mannequin with it’s own skeleton asset, and using the retarget manager in Persona to get the anims onto the Blender skeleton.

I’m going to be continuing to work on getting the mannequin Blender/UE4 relationship into a better place as I get free time. So, if anyone has suggestions, or a better constraint idea, let me know.

:slight_smile:
–Kevin

never mind

[@motorsep

](https://blenderartists.org/forum/member.php?13572-motorsep)“That’s not the topic of this thread.”

I’m sorry if you are offended by my answer or don’t see it as helpful, sorry. I answered because you obviously had issue understanding what the root of the problem is. It’s not so much to do with any specific software, but the fact that you have to do a round trip. Authoring skeleton in Blender will naturally produce “working” skeleton+animation.

You mentioned:
“If you import UE4’s Mannequin FBX into Blender, you’ll see bones are oriented entirely differently from how you’d usually have bones for characters in Blender.”

and

“It has to do with bones’ axes, which are different from software to software.”

I mentioned in my first post: “First of all, AFAIK Blender only has a very “rigid” understanding of bones - it doesn’t even have a separate bone and joint, it always makes joint align with bone, and bones only can have one specific length axis (was it Y?)”
I’m not sure which part you didn’t understand, I specifically stated it’s related to bone axis, which are different but in Blender’s case limited.

“bones are oriented entirely differently” because of this: AFAIK Blender limits itself to Y-only as main axis of bone. You can see this by enabling bone axis. World up is Z-axis… This is not so much true if you come from Maya. First of all, default world up is Y, not Z. There is already first issue. Also, you can define main axis of joints anyway you like in Maya. Just go to orient joints panel. You can define main axis as any axis. In Blender it’s always Y, and Maya, default is X-axis along length. And FBX has more flexibility than Blender.

Like mentioned already this is the same situation in Blender, as you are only going to have bone along Y-axis. Try this. Change default main axis of 2-bone chain in Maya from default X to Y, export it to Blender, you’ll see bones pointing up in Blender world space instead of along what should be joint to joint span.

You can compensate this using FBX import settings, swapping “Primary bone axis” from X to Y. But this doesn’t seem to work with full rigs. Default FBX importer does bad job, it either gets the skeleton looking good with messed up animation or vice versa. I haven’t been able to find proper settings to do proper axis swapping, if that is even possible.

Anyway, what I mentioned is IMHO very much related to your question, these limitations are the core reason why this happens with any other software… in your case of UE Marketplace and Unity/Maya/Max and so on, and yes, it can’t be that different, if they author skeleton hierarchy in Maya style for example.

But maybe I’ll continue this discussion elsewhere, I have asked it couple of times here in Blender Artists, but no-one seems to be interested, or gives similar low-level solution that is not acceptable in real world use.

I don’t work in Maya. If I did, I wouldn’t bother with Blender when it comes to animation / rigging.

It seems like every times someone brings up an issue between Blender and something else, it all comes down to “Blender sucks, it’s limited, etc.”

I am aware of Blender’s limitations and there is nothing I can do about it. So the only way to solve the issue when it comes to Blender is find a way to work around these limitations. Sometimes it’s possible, and sometimes it’s not.

Maybe one day I will have enough free time to get into Maya and learn it where I can rig/animate freely (I totally can’t stand its modeling tools, so I’d still model in Blender). But for now let’s focus on how to use what Blender offers and solve the issue.