System Information
Win8, GTX1070
Blender Version
Broken: e92f235283 along with newer (May 29) builds
Short description of error
This is the only thing I know of that's still an issue in the Blender - UE4 pipeline. The workaround was to set the scene unit scale to metric 0.01, but this causes a lot of issues in other parts of Blender as well as in addons. I think we should attempt to fix this issue once and for all.
I'm using the official UE4 fix for the extra root bone issue, by naming the rig object "armature" the extra bone gets removed on import.
What works (all exports and imports at 1 scale):
0.01 metric unit scene scale, mesh at 1 scale (dimensions about 2 meters) apply unit scale on or off either works (results in normal looking mesh, normal sized animation)
1 metric unit scene scale, rig/mesh scaled up 100 times, applied transforms so 1 scale on both rig and mesh (dimensions about 200 meters) apply unit scale off (results in normal looking mesh, normal sized animation)
What doesn't work:
1 metric unit scene scale, mesh scaled up 100 times, applied transforms so 1 scale (dimensions about 200 meters) apply unit scale on (results in 200m mesh in UE4, normal sized animation)
1 metric unit scene scale, mesh at 1 scale (dimensions about 2 meters) apply unit scale on (results in normal looking mesh, tiny animation)
1 metric unit scene scale, mesh at 1 scale (dimensions about 2 meters) apply unit scale off (results in tiny mesh, tiny animation)
When apply unit scale is on, in all cases but the 0.01 metric mesh, there's a warning on UE4 import saying "Imported bone transform is different from original. Please check Output log to see detail of error."
In the output log there's a bunch of messages saying
LogFbx:Warning: IMPORT TRANSFORM ERROR : Bone (foot_r:66) Source Global Transform (-17.131426,-8.075233,13.492712|-88.834320,-140.732407,-38.382278|100.000000,99.999962,100.000351), Converted Global Transform (-0.171314,-0.080752,0.134927|-88.835167,-140.732254,-38.383274|1.000000,1.000000,1.000003) LogFbx:Warning: IMPORT TRANSFORM ERROR : Bone (ball_r:67) Source Global Transform (-17.473686,8.365830,2.830386|2.606994,-89.071144,-89.079277|99.999954,99.999992,100.000343), Converted Global Transform (-0.174737,0.083658,0.028304|2.607001,-89.071159,-89.079292|1.000000,1.000000,1.000003)
for every bone in the rig. When you check the skeleton in UE4 the root bone has 100 scale in XYZ. This means that every other bone inherited this scale, but the scale for the bones were reset to 1 in the animation. This is the reason you get a tiny animation in the case of the 1 metric unit scale 1 normal size mesh export.
With the same mesh/rig but with apply unit scale off you get a tiny mesh and a tiny animation, there's no warning on import and if you check the root it is at 1 scale in XYZ which is what you want. The mesh/skeleton are just too tiny to use, about 2cm.
So there are two options that work, 0.01 metric unit scene scale and a normal looking mesh. The disadvantage of this method is that lots of other parts in Blender (and addons) break when scene unit scale is not 1.
The other option is 1 metric unit scene scale with a character scaled up 100 times, so a huge mesh but it turns out normal in UE4. The disadvantage of this method is that it's just awkward to work with, the whole point of the metric units are that they should make sense to you, but with everything scaled up 100 times it gets very confusing.
I'm hoping this issue can be solved so the Blender - UE4 pipeline gets to a perfect state.
Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps
In the .blend the scene unit scale is 1 metric.
- Export the mesh and rig, only deform bones option ticked. Import into UE4 - this is broken (see above).
- Resize the rig and mesh 100 times and apply transforms. Export with only deform bones option ticked and apply unit scale not ticked. Import into UE4 - this should work (see above). Note that the animation will look wrong because of not scaling the animation, but if the animation was redone it would look okay again
- Open the original .blend again and change the scene units to metric 0.01 scale and resize the mesh so it looks normal again, then apply transforms. Export with only deform bones option ticked. Import into UE4 - this should work (see above).