Twisted bones when playing animation. Blender to UE4

Hi,

I have a problem when playing an animation exported from blender. The main problem is that one bone (in this case) is “twisted”. Let me show two screenshots.

8caa92cb9f3fc7e813132ef6f92020626af0f534.jpeg

Look at the rear leg of the Octopus. In blender the legs is animated down.

And in UE4 the leg is animated up.

Find also a link to the .blend model that I’m exporting:
https://dl.dropboxusercontent.com/u/7549551/Octopus.zip

Thanks,

Arturo.

have you tried clearing location/rotation and scale and then reapplying location/rotation/scale?, sometimes fixes these types of issues, you could also try both exporters.

if that doesn’t work I will download it and take a look:)

Ok, I will try it tomorrow.

Just one question: by two exporters, do you mean the text format and binary format of the default exporter or the default exporter and the experimental one?

Tomorrow I will let you know the results of the test.

Thanks!

I mean the FBX6.2 and FBX7.4 exporters, they both have some issues but I find the 6.2 exporter often works better then the 7.4.

Hi ,

I finally tested both exporters: FBX7.4 Binary and FBX6.1 Asc¡i. All tests were performed clearing location/rotation/scale and then reapplying location/rotation/scale, just in case.

The results for the FBX7.4 Binary:

  • The twisted bone always appears.
  • I can control z to be the up axis, missed facing direction for the animation, +y becomes -y (I still need to play with this… I still don’t know if it’s a problem yet). Blender seems to have a right handed system and UE4 seems to have a left handed system… I will need to think about this.

The results for the FBX6.1 Ascii:

  • The twisted bone is not pressent. The model is animated correctly.
  • The axis problem gets worse. The y axis becomes z, and z becomes y. I have tried to fix this controlling the forward and up vectors but no luck influencing the result of the default mesh. Animation seems afected, so you can place the Octopus facing down (-z) and when playing the animation it will play looking forward. This won’t help placing objects. :frowning: 7.4 Binary seems to behave better in the axis scenario.

I will post my export/import settings.

looks like your making progress at least.

do you mean if you export from blender without changing the default axis in the export settings then import to UE4 the model imports on its back or side?

if you do mean that there is a trick that often works, during import to UE4 turn on the “use TOA’s ref Pose” option.

Yes, I played with that option too.

But it seems that I get better results setting the correct axis and unchecking “Convert Scene”.

By the way… I forgot to uncheck this with the 6.1 exporter (I tested it again now)… and it seems to work in the same way that 7.4 exporter (as far as axis are concerned). So we could say that 6.1 is a “working” exporter :-). I could use this for now, waiting for 7.4 to be correctly exported/imported.

Thanks for the help.

well its not that the 7.4 exporter doesn’t work, its more like it’s unfinished witch is why I don’t use it, still it sounds like you can get models fro blender into UE4 without any real issues at least:)

Hey, i was trying to export animation using 7.4 until i noticed that it says "still in development, no animation yet) :slight_smile:

Hi ,

Yes, It seems there is a workaround for everything. The workflow is not smooth because of this, but… time to time. I think that blender and unreal will end up smoothing this :).

Hi Raikoh,

7.4 exports animations. The problem is that people is getting twisted bones. I always have some twisted bones, but some people say that only sometimes and on some actions (animations). Maybe is related with the animation, per se, and not the armature structure…

Try this solution, import with -X = Front Z = Up -as shown as a possible solution on this AnswerHub Thread: https://answers.unrealengine.com/questions/153044/import-scale-and-rotation-46-doesnt-work.html

Hi ,

That solution is for the bad axis alignment when using the 6.1 ascii exporter? I haven’t tried it, but I remember having good results just unchecking “Convert Scene” when importing. I will try it to see if works as an alternative solution.

The thing I have tried to address is the twisted bone problem. I will try to give more details, just in case this helps you or Adam Davis (the ones that seem to be looking into this).
The thing is that I erased one keyframe of the bone: “Leg5part1” of the octupus (the one at frame 28) and the twisted bone disappeared. Before this test, I thought that the problem could be due to a wrong imported armature. But after reading this Blender Animations Not Imported Correctly - Character & Animation - Epic Developer Community Forums and starting to play with the keyframes of the twisted bone I’m starting to think that the problem is in the treatment of the animation.

I will need time to look at the source code of either Blender exporter or Unreal importer (if the importer is part of the github repository), but speculating about this… maybe the problem is related with the quaternion rotation keyframes. I know that blender lets you break the normalization of a quaternion, this is in order to provide freedom when animating. But before animating, blender normalize it (or if normalization doesn’t apply here… maybe projects the quaternion back again over the theorical surface of the one radious sphere; I’m always lost with quanternions mathematically… so I could be saying something that doesn’t make sense now…). Anyway… the thing is that I don’t know if the exporter takes this into account… or just exports the values directly; and I will also want to see what Unreal imports or if applies a correction to the quaternion. Again… this is just speculation… Unfortunately I don’t have time now to continue digging into this problem. I hope to find it in the future. And of course my fist step will be to look at the math around that Leg5part1.

The problem aligning an objet to an axis is not important for me if I can use a workarond, but this one scares me… because that twisted bone is, of course, a problem… but that could also mean that the other bones that are not twisted have small deviations that make the animation different than the one created.

add a small amount of movement to the bones that are twisting.

Unfortunately I’m not familiar with Blender so I’ve been working with our primary Blender liaison, Adam Davis, to determine whether this a bug with the Engine or with Blender’s FBX exporter. So far, we have not been able to replicate the issue here. You may want to check out the latest Twitch broadcast which deals with working with and exporting from Blender:
http://www.twitch.tv/unrealengine/b/623031933
One point that stands out is to be sure “Leaf Bones” is unchecked before exporting.

This seems like a common issue. I’ve had it with mutliple assets and have resorted to baking my animations out and exporting everything to maya then exporting from there to UE4. 3ba2e9ae3a9ab8e4924c036f5892f39a37ee3fa7.jpeg140eb6b351da7e2b3f3bac748a565a7e5c2c3ea8.jpeg

Hi ,

When you say that you can not reproduce the error, do you mean creating your own mesh and armature, doing some animation and exporting? or do you refer to downloading the Octopus example I provided and exporting it? I’m using the export settings that you can find on the firsts posts of this thread (Exporter 7.4 Binary). For my first test I was using Unreal 4.5, for the other tests I upgraded to Unreal 4.6.1 (just in case). Still not in 4.7 preview. Do you want me to try it with 4.7 preview?

I also watched the blender twitch episode but only static meshes were concerned there. Exporting/importing static meshes never failed to me.

Thanks KrunkFu, for letting me know that it’s not only me the one that is having this kind of problems.

Thank you all for your time to try to clarify this issue.

I was able to replicate the issue you were having. 81b71a81c737d021f3d40e306ec0eb09447b003b.jpeg

I’m really hoping this gets fixed soon. This has brough development on my game to a halt.

Hi all,

I was able to replicate the same problem with your settings/file Artur. It’s similar to a problem I’ve been having with 2.73a which is preventing me from completing the Vehicles User Guide in documentation.

For length reasons I won’t go into detail here, but I’ve consistently had bad imports with scale, bone, and physics bodies for a very basic test car (1 mesh, no materials/textures, 5 bones). Importing occasionally makes the UE4 Mesh Editor camera (not a camera object, but the 3D view in the editor itself) zoom way out until the mesh is tiny with the mesh’s “approx size” jumping to many times the actual size of the model and zooming stops working. I’ve also noticed that with 4.6.1 physics bodies in the physics editor don’t translate or scale smoothly anymore (very coarse adjustments) and sensitivity prevents me from making fine adjustments (small mouse movements during translations moves a body a great distance, this movement is not smooth but “jumpy” like the body is snapping to something while I’m dragging it). I did a comparison with 4.5.1 and found that its editor was noticeably different in behavior and, oddly enough, bone construction. When I imported my test car into 4.5.1 it added an extra “layer” of bones (or something else that displayed an extra layer of sub-components) that 4.6.1 didn’t have.

I’m fairly new to UE4 (~1 month now with it) and am unsure of what’s going on exactly. I’ve tried every tutorial and workaround I’ve come across and still have been unable to produce a vehicle using the steps described in the Vehicles User Guide or any of videos. Ultimately progress has been made, but issues keep popping up with bones/scale/physics-bodies.

I have a background in Software-Dev/QA so hopefully this afternoon/weekend I can get a little time to do some version comparisons. Maybe I’ll find something useful, or at the very least find versions of Blender/UE4 that play nicely together until a solution is found.

Blender 2.73a

UE 4.6.1