Jump to content

Weird behavior for root motion animation


photo

Recommended Posts

Posted

Hi,

I found weird behavior, when i have root motion loop animation.

When the animation passes from last frame to first frame, it's look like the "Position" bone position go backwards.

Values from log file:

18:51:06 bonePosition x: -0.000014 y: 1.670226 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 1.677411 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 1.684526 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 1.691594 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 1.698737 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 1.705799 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 1.712829 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 1.719946 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
-- start go backward bone position
18:51:06 bonePosition x: -0.000014 y: 1.642935 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 1.415249 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 1.194012 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 0.968947 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 0.738425 z: -0.000008
18:51:06 x: -0.000014 y: 0.000000 z: -0.000008
18:51:06 pos x: 0.000000 y: 0.000000 z: 0.000000
18:51:06 bonePosition x: -0.000014 y: 0.518001 z: -0.000008

It cause that animation is not smooth, when the animation passes from last frame to first frame.

When i ignore last frame and go to first frame from last frame - 1, the bone don't go backward, but animation is still not smooth.

 

Test scene for Unigine Engineering 2.7.3.1, API C++, 64 bit, Float here root_anim.rar.

 

Why this happen?

 

Thanks

Honya

Posted

Honya,

How this animation was generated? It was imported via FBX Importer with "Joints Reorientation" checkbox enabled? If you will reimport it an remove this checkbox - will be there any changes?

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Hi Silent,

I reimported this animations in 2.7.2.1 version of Unigine from fbx, when "Joints Reorientation" checkbox not exist.

Posted (edited)

Same with the 2.7.3 and without joint reorientation.

Edited by demostenes
Posted

Hi Honya,

The problem is in your animation. Bone "Hips" is not looped. I set the Y axis of this bone to 0 and animation started to look good.

Best regards,
Alexander

AppWorldLogic.cpp

Posted

Thanks, it clarified where is the problem.

And for second question, can skip blending between last and first frame, when it blending from 1,7 to 0,0 coordinates?

I mean instantly set coordinates from first frame. I can this behavior to animate num frames - 1, but that means that i lost animation information from last frame?

Honya

Posted

Hi Honya,

ObjectMeshSkinned::setFrame() method doesn't do any interpolation/blending if you set an integer value like: 0, 1, 2, ...
There is no magic in this function. If you set 0, 1, 2 - you will get the target frame immediately. If you set a real value like 0.5, 1.2, 2.33, then you will get a blended pose between the two nearest frames. Also instantly.

Best regards,
Alexander

×
×
  • Create New...