Orientation of Bones in Blender and Unreal Engine

Question Rigging

I bought a rigged model for use in unreal engine but I am running into some issues when attaching a weapon to model in the game engine because of the orientation of the hand_r bone. The screenshot from UE show that the fingers of the model are pointing in the z direction but it would have been optimal if the fingers were aligned in the x direction. Is there any way to get this done through the export settings in Blender? BlenderModelHand.pngineModelHandBone.png

  • Omar Domenech replied

    Sorry for the late response Aleem. Seems like that's a tough one for us, not enough knowledge about Unreal or rigging going around. Apologies.

  • Adrian Bellworthy replied

    Hey aleem_m

    @waylow may be able to help with the rig in Blender!
    You'll need a time machine though as he is way ahead of us.
    He may have already answered the question before you asked it, and we just need to catch up to see it.

  • Wayne Dixon replied

    Hi Aleem,
    I haven't had much experience with Blender to UE but that does look like you purchased a rigify riged model.

    It might be possible to edit the metarig and then regenerate - however Blender bones always have the y axis pointing down the length of the bone so this might not solve your issue.

    If this is a rigify rig you might benefit from using something like the GameRig add-on (or similar) from CGDive.

    Basically it will convert your rigify rig into a game engine friendly version with a couple clicks.  I have not used this but Todor (CGDive) has a couple tutorials on what you need to do to Blender rigs to get them into the different game engines.  (because as you know all softwares have different requirements and orientations etc).  But the add-on automates all of this.

    This is his site https://cgdive.com/

    But also check his Youtube because that is where the Blender to Game Engine series is located (I don't think he has that one on his site??)

  • aleem_m replied

    Hi Omar, 

    I'm not really sure if it's the Unreal knowledge that's required. It seems a lot to do with the FBX export settings from Blender and maybe something to do with the orientation of the bones in Blender, I'm not sure.

    Thanks for the heads up Adrian. @waylow is Wayne Dixon?

    Hi Wayne, 

    I think they did say it was Rigify. There is an addon from Unreal that facilitates export from Blender to UE but I'm not too sure how to use it so I have been exporting the model as an FBX to UE manually. I've found that tweaking the Forward and Up axes under Transform and the Primary Bone Axis and the Secondary Bone Axis can result in the x-axis of the bone in the "correct" direction. However, this results in the Root bone of the model being oriented in the "wrong" direction and I am using C++ to control the pitch and yaw of the model in Unreal.  This causes the character to do some weird looking stuff. I've tried over 20 different orientations with the axes and had no luck, so I was thinking that maybe the skeleton had to be remade. I've started looking at a course on Udemy to that end: 

    Create an Animated Character in Blender 2.9

     export settings.png

    The GameRig looks useful, hopefully, it will help,  I will try it. 

    I'm wondering if this is a limitation of blender, someone was showing me a page that said something like that and I think it was said that Maya was capable (?). I only know a little blender even though I set out to learn it, I ended doing a lot more in Unreal Engine and I know very little of Maya. Have a look at the post below:

    davidj

    1y

    This problem is both simpler, but more complex than you might realize.The problem is, Blender only supports one fixed bone orientation (blender bones always point towards +Y).However, Maya/FBX supports arbitary bone orientations via the "Orient Joint Options" dialog.For example, the UE4 mannequin leg bones point to -X on the left leg, and +X on the right leg. Which means there is no simple bone conversion that will work, because blender is currently incapable of remembering the orientation.The best solution to this is to extend blender to support arbitrary bone orientation, like Maya, so we can load in the data from FBX and also output the data to FBX.