Announcement

Collapse
No announcement yet.

Animations from Blender using default settings don't work in UE4 - help fix the Blender FBX exporter

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Animations from Blender using default settings don't work in UE4 - help fix the Blender FBX exporter

    I have made a bug report on the Blender issue tracker but this seems to be a hard issue to solve (been around for a pretty long time) so help from UE4 devs would be appreciated. I think it's time to solve the last Blender issue once and for all!

    The issue is that animations exported from Blender with default settings (meaning either scene units in Blender units or Metric with 1 scale) get messed up on import in UE4. Animations turn really small (100 times smaller) when using the extra root bone fix (for example naming the armature object in Blender "armature".

    A workaround is to work in metric 0.01 scaling in Blender, but that causes a lot of issues in Blender because it's not really a normal scale to work in.

    Anyway, the Blender issue tracker post is here: https://developer.blender.org/T51704 and has a bunch more information of what's going wrong and some example .fbx files. Any help is appreciated!

  • replied
    The 0.01 scale "trick" in Blender works perfectly fine as long as you dont change the scale within UE. So, make sure you have the proper proportions of your mesh in Blender, and export to UE as it is. If for example you change the uniform import scale to something else.. you will get again all those transforms warnings.

    The only downside of using the 0.01 scale way is that, as other said, you going to find some "problems" in Blender. For example, when you create new meshes, they are going to appear with the wrong scale, of course. Things like bones will appear so small that you would think that blender actually didnt add any bone (happened the other day to me. I created 4 bones because i thought that blender was ignoring me.. turned out they were just tooo small to see em :s).
    Last edited by amstradcpcuser; 02-27-2018, 03:28 PM.

    Leave a comment:


  • replied
    The issue is not at UE. I say this because if it was, when you create a FBX using 3DS MAX or Maya for example, you would get issues, and this does not happen. The best approach for blender developers would be create something using Autodesk tools and export it, then the same job in Blender, and compare which are the differences and understand them. FBX format, thou proprietary, it is described by Autodesk, so the only way to achieve compatibility is with such comparison.

    Leave a comment:


  • replied
    Maybe upcoming Blender 2.8 can get updated FBX that do not need those scaling tricks anymore, lets hope for best.

    Leave a comment:


  • replied
    Same here. Ive been trying for days to succesfully import an animation form blender into UE4. Looked all around the internet, googled a lot, until i found the solution of the 0.01 unit scale and apply transforms at 1 scale on both mesh and armature.

    But i still keep seeing the annoying error message in UE4. And it gives me the creeps. The animation looks fine, but i cant stop thinking that there is something wrong (because of all those msgs) and im going to have problems in a future.

    Leave a comment:


  • replied
    Hey are there any updates on this? I ran into the issue just today and have scoured a bit trying to understand it all.

    Leave a comment:


  • replied
    The title looks a bit off now since it was basically confirmed that this isn't a Blender specific issue (Max example: https://forums.unrealengine.com/show...-same-skeleton). You could probably do the same thing in Maya if you felt like changing the default to meters instead of cm. The title should really be "Animations from Blender using default settings don't work in UE4 - help fix the UE4 FBX Importer".

    To recap the issues:
    1. The created physics asset is inaccurate with a UE4 transformed rig (from meters to centimeters). My guess is that this is caused by the physics asset getting created from the tiny version before the transform instead of after the transform when the bones have gotten bigger. It's possible to export a tiny mesh and animation from Blender using the FBX All or FBX Units Scale settings, and there the mesh has the same number of bodies as the bigger mesh exported in meters that looks normal except for the physics body.
    Bug report: https://answers.unrealengine.com/que...to-1-in-a.html

    2. The mesh looks fine but the animation is too small. Basically the root bone is getting stripped of scaling in animations which makes animations too small. In 4.17 it's actually possible to scale the root bone in the animation in Persona without the mesh going haywire, so I replaced the 1/1/1 scaling from the "Imported bone transform is different" error to 100/100/100 of the original skeleton, and guess what, it looks perfect. It also looks perfect if you change the import global scale of the tiny animation to 100 and reimport. The bottom line is that the UE4 transform thing for skeletal meshes with different scaling only works correctly for the mesh itself but messes up animations. I would be very interested if someone could reproduce behavior in Maya by setting the units to metric instead of cm and scaling the rig and mesh so they look normal, then import into UE4 and see what happens. My guess is that you end up with the default Blender to UE4 behavior.
    Bug report: https://answers.unrealengine.com/que...to-1-in-a.html

    This impacts all Blender users who are new and don't change the unit system before creating their animations, Blender veterans who have to use Blender with a changed unit system that messes up certain parts of the program like dyntopo sculpting detail size, curve taper/bevels and addons and the people in between really. When the next major version of 2.8 is released the confusion will get worse with the new influx of Blender users. It would be nice if the scaling issues were solved by then, either by finding the cause and fixing these issues or by removing scaling for skeletal meshes altogether if it doesn't work like intended anyway.

    Leave a comment:


  • replied
    Update: Bastien Montagne (main developer of the Blender fbx exporter plugin) made an update to the FBX exporter adding some additional scaling options for the FBX exporter. The new options didn't fix the issues, but I did found out some things so I will post what I said there here as well.

    "I tested the new version. None of them gave the perfect result of normal looking mesh and normal looking animation. AllLocal and FBXCustomScale gave the result of a scaled mesh but tiny animation. The root bone has 100 scale in the skeleton but 1 scale in the animations. FBXAll and FBXUnitsScale gave the result of a tiny mesh and tiny animation. Basically what you would expect if you exported meters as centimeters, it seems like it wasn't scaled at all.

    I did find out some interesting things however.

    When importing a 0.01 metric (working) scale mesh into UE4 and in the UE4 import settings selecting 10 import scale, the mesh is 10 times bigger than usual but animations still work. Checking the skeleton, the root bone is scaled 10/10/10. In the animation it's still 10/10/10. This means that scaling the root bone but not any other bones is the UE4 way of scaling a character.
    This means that when importing a character with AllLocal or FBXCustomScale the root scaling is 100/100/100, which is what you would expect in UE4 terms. However when you get the error "Imported bone transform is different from original. Please check Output log to see detail of error." from other bones having a scale other than 1 (in these cases all bones have 100 scale at import time), all bones in the animation have their scale reset to 1, including the root bone.
    This should mean that if the root bone scale wasn't reset to 1 in the animation the animation would look like you would expect. This seems like a UE4 bug for now.

    Since FBXAll and FBXUnitsScale gave a tiny mesh/animation I tried scaling them 100 times in the UE4 import instead. It worked without any errors, the mesh and animation looked normal. However the physics asset (ragdoll version of the skeleton) was messed up, the physics bodies had too low of a mass, and when scaling them they would turn bigger and they were stuck that way, you couldn't make them smaller.
    It seems like the physics asset is created without taking scaling into account which seems like another UE4 bug.

    I will report these bugs for now. I think that if you could scale only the root bone and leave the rest of the bones at 1 scale in the FBX export things would work fine."

    The bug reports are here:
    https://answers.unrealengine.com/que...to-1-in-a.html
    https://answers.unrealengine.com/que...caling-sk.html
    Last edited by cyaoeu; 06-07-2017, 10:31 AM. Reason: added original emphasis

    Leave a comment:

Working...
X