Download

More Blender / root-motion woes

To start, I’ve read everything I could find on how root motion should work, how to enable root motion, show → “Process Root Motion”, etc. And in fact, it does work… just not with Blender FBX. There, it 2/3rds works, which is the odd thing. (Other animations work fully.)

With root motion disabled, I see the proper red bone/path warning that root motion exists. This animation plays properly as-exported, along its root-motion path. When I enable root motion, the animation is properly locked in place, as expected. However, when I enable “Process Root Motion” … it processes a very tiny root motion, i.e., it slowly creeps along the path as if it’s scaled way down. This is the same whether I use the 7.4 binary exporter (with an “armature” root, with root motion keyed to the armature), or a “fixed” 6.1 ascii export, with a single root. I have attached the latter. (Note it needs a 100x scale on importing, which the 7.4 exporter does not, but this version is less ambiguous.)

Importing a similar animation from Maya LT seems to produce the expected result: proper red path, properly fixed in place, and proper process-root-motion.

I’m using 4.12.4 compiled for x64 with VS2015 Community, along with Blender 2.77a.

Hopefully I’m doing something obviously wrong.

Followup: OK so apparently there’s an issue scaling. Unscaled, the animation plays fine. Importing with scale (i.e., UE4’s uniform scale on import) apparently does not apply to that part of the animation after extracted for root motion.

Another problem (on the Blender side I’m assuming for most of this) is that while you can scale up the object and the armature, then apply the scale, and the animation looks correct in Blender, it still exports incorrectly! If the animation is keyed after scaling, that exports and imports correctly.

If there’s a better way to do this I’d love to know. :wink:

Not sure if this will work with Blender or if it will work any better than what you have done, but you could export it as is, then import that FBX back to Blender, scale it, and then export it again. I don’t really have Blender experience and don’'t know how you can deal with scaling in different ways in there but I guess you can try this method.

Blender exports aside (as they are a separate issue), it seems that UE4 is importing root motion animation with an inverse of the scale specified. If I import an animation with a scale of 1.0, even if it’s tiny, the root motion corresponds 1:1 (before/after enable). However if I scale on import to say 10, the model and other animation are larger as expected, including the non-enabled root motion, but after enabled, it seems to be much smaller.

Likewise if I import and scale by a fraction, like 0.1, the post-enable root motion seems to be much bigger.

Did you do any actual measurement?. It sound like possibly UE4 ignore scale. So if your character is 10 times bigger, the same distance will be small compared to a 1:1 scale. Or does it actually shorten that distance?, divide by 10?. Meaning, is a 1 meter forwards travel always 1 meter, or does that change?. It makes more sense that it probably always is 1 meter but because the character is much bigger, it seems shorter, because now it should be 10 meters.

If this is the case, it could be worth posting on answehub, see maybe if Epic can take this into account with their importer. Or if it’s purely a Blender export problem.

I’m going mostly off the grid in UE4 to judge measurements; I assume this does not change in meaning (i.e., 1 uu or meter or whatnot is always the same number of squares).

If I import at 1.0 scale, say, I get a small box that moves, say, 1 meter. I would expect that if I import with scale 10, this would either:

  1. Import a box 10x the size that now moves 10 meters.
  2. Import a box 10x the size that still moves 1 meter.

Instead, it seems to import a box 10x the size that now moves 1/10th of a meter, though it’s hard to say if this is precise or not. Likewise, if I import a box with 0.1 scale, it’s now a very tiny box that moves 10 meters. This seems to be the case regardless of which program I use to export FBX. Note that this also only happens with root motion enabled: if root motion is disabled, the animation seems to play properly (scaled and all, i.e. option 1 above).

Ok, yeah I get it, I’d say make a post on answerhub bug reports section and see what Epic guys have to say. It may very well be a bug on the importer, or they can help you deal with it if it’s not, either way it sounds like something that should be brought to their attention, even if it’s a rare case or whatever, you know.

I think you mean this problem ?
https://answers.unrealengine.com/questions/225569/48-p1-unreal-rotate-bone-problem.html

Backlogged by Epic Unreal Engine Issues and Bug Tracker (UE-15388)

Aha. This appears similar; except it’s for more than rotation, all motion seems to be scaled inversely.

:frowning: