Bone scaling discrepancy on animation import

I’m having a weird problem. I’ve got a rig configured with a chain of scalable bones, and I need those bones to scale in their own local space. What I’m using this rig for is controlling “smears” of 3D models; I need the 16-bone chain that I’ve rigged with the smear mesh to scale along their tip-to-tail axis exclusively. This way they produce nice, consistent curves, and by adjusting their scale, I can make that curve larger or smaller (i.e. make the trail longer or shorter).

Now, in Blender (where I’m rigging and animating), there’s a couple of ways to do this. I have tried both, with the same results (see the pic below). The first way is the simple way; simply set each bone’s “scale inheritance” mode from “full” to “aligned”. This causes each bone to inherit the scale of its parent from local-to-local space; i.e. the tip-to-tail axis of the parent gets scaled the same as the tip-to-tail axis of the child. By contrast, “full” mode causes the child bone’s WORLD space scale to be inherited; this causes it to deform arbitrarily based on the angle of its parent. The second way is to tell none of the bones to inherit any scale at all, and manually set their scales with constraints that define it in local space.

So far, so good. I’ve got a good-looking trail in Blender; you can see that in the top left pic. But when that animation gets imported to UE4 (with Preserve Local Transform checked, otherwise it just completely craps the bed), you’ll notice, looking at the top RIGHT pic, that the scale is extended. Instead of a curve of identically sized bones, each bone inherits the (local) scale of its parent, and then APPLIES that local scale again, creating a pretty but wholly-unintended Fibonacci spiral that quickly blows up to infinity if the trail is too long.

Here’s where it gets weird. I tried a bunch of things, and in a fit, decided that I should just flip everything in Blender back to “full scale inheritance” because I understand that this method of scaling inheritance is “correct” in the standards of fbx (or at least I believed so); each bone inherits the scale of its parent. I expected that from this, I would at least get the same result in Blender and UE4, and from there I could maybe work out some sort of complex constraint system that would then correct all the deformations. The bottom-right pic is what that looks like in Blender; an elongated, pinched mess.

Then I imported it and got the bottom-right pic. Not only was it not identical to the Blender file that I exported to make it, but the result that it gave me was exactly what I wanted to get in the first place. It seems that, for some reason, UE4 is natively treating the scale of a bone as being necessarily proportional to its parent space (or perhaps to its rest space; these bones have a perfectly vertical column for a rest pose, I suppose that could be related).

I am completely stumped. I really, really can’t be going in to all these bones (mercifully only 16 here, but for some of my rigs with multiple trails, potential 32 or 64 bones, a couple with more than 128) and changing the inherit scale factor by hand every time I export an animation. Especially if I tend to iterate on animations (which I do) which means constantly flipping back and forth for WYSIWYG consistency.

Does anyone understand what’s happening and how I can fix it? If not with some setting in UE4, then some setting or trick in Blender? I stress again that it doesn’t matter how I GET the bones scaled in this way (whether via an inheritance rule or manual scaling), UE4 and Blender simply disagree about what a bone looks like in the context of its parent’s scale. I don’t believe this can be changed in Blender but I could be wrong. If there’s some export or import setting (apart from Preserve Local Transform) that I’ve missed, can someone point me to it? Or is there some other trick someone knows of (probably in Blender) that will change how it handles “full scale inheritance” so that what it shows is calculated the same way as what UE4 shows, WITHOUT actually changing the properties of the bones and their scales as it goes to fbx export?

I did find a really clunky, awful workaround: I create a duplicate of the skeleton, set all of its articulation/control bones to copy the transforms of the primary skeleton’s bones, then set the original skeleton from Aligned mode to Full mode on each bone, and told the mesh to instead be rigged to the duplicate. So I’m animating and exporting a skeleton whose bones are being deformed in the way UE4 is happy with, but inside Blender I’m viewing a mesh being controlled by a sister skeleton that does nothing but copy all of its bone positions and calculate scale differently.

It’s a cumbersome mess to set up… but at least I only have to set it up once, rather than every time I want to iterate on an animation. So we’re back to forward progress (once this refactor is finished) but I’d still like to understand if there’s a RIGHT way to work around the effect I’m seeing.