Not a bug

Animation not play in same location in play mode

Anonymous 3 weeks ago updated by Peter - Soxware Developer 2 weeks ago 9

Hello there. Same guy that using Umotion more than a year. (which buggering you about multiple instances switching characters easyl etc)

This was same issue from the beginning and drive me crazy.

My game had lots of interactions between humanoid characters, like handshaking, kissing, hugging etc.

So postioning them is importand. I generate lots of umotion animations with two key frames long.

Anyway,  I made the poses animations bake it. etiher of Root Transfer Rotation (all tree of them) was ticked or baked directy (with new verison).


In old forum you say that is a Unity bug and should have fixed in 2018.3 or something. Now I'm using unity 2018.4 and  19.02p

In old times, skewing was large margin, let say 10 cm or more, in latest versions it drops to probably 2cm or something like that. But still there.

And drives me crazy. Everything is ok on timeline or scene windiow.After baking then I press to play, animation position is not exact same point as editing time.

Is there any explanation, Any 

UMotion Version:
19p02
Unity Version:
2018.4.8f

Answer

Answer
Not a bug

When you are using humanoid, small differences are expected. This is just in the "lossy" nature of how the humanoid re-targeting engine works. The humanoid animation system is designed to share the same animation between multiple characters and make it look approximately the same. It will never look exactly like the source animation. I highly recommend checking out this Unity blog post about how humanoid works under the hood: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

When you create an animation in UMotion, it is always previewed precisely as it is. But as soon as you export it to humanoid, the animation is converted into the normalized muscle space which adds imperfections too it (at the benefit of being able to share the animation with other characters configured as humanoid).

If you aim for perfect precise results, you need to configure your characters as "generic" (but you are not able to use the same animation on multiple characters anymore except if they use precisely the same skeleton). You can convert your existing UMotion projects to generic by creating a new project (of type generic), assign the generic version of your character to the Pose Editor and then import the animations directly from the humanoid umotion project.

Let me know if you have any further questions.

Best regards,
Peter

Forget it... Damn me. It seems I have to have very close look for my collisons. 0.004 difference drive me crazy. My Best regards.

Interestingly, I had same problem in another day. I check everything and can't find a solution.

Same two person interaction. Problematic pose was iteration of the base pose. First two pose does not have any problem. Last pose has torso and spine movement. 

Everthing is correct in umotion and timeline however after baking and playing character skewed 10cm of original location.

For a last ditch, I use Generate Root Motion curves then volia problem solved.

However, after baking root motion curves, importing same pose into u motion become problematic. FK eye controllers (especially left one) move and rotate ( I put the screen shot on it).

Best regards.

Answer
Not a bug

When you are using humanoid, small differences are expected. This is just in the "lossy" nature of how the humanoid re-targeting engine works. The humanoid animation system is designed to share the same animation between multiple characters and make it look approximately the same. It will never look exactly like the source animation. I highly recommend checking out this Unity blog post about how humanoid works under the hood: https://blogs.unity3d.com/2014/05/26/mecanim-humanoids/

When you create an animation in UMotion, it is always previewed precisely as it is. But as soon as you export it to humanoid, the animation is converted into the normalized muscle space which adds imperfections too it (at the benefit of being able to share the animation with other characters configured as humanoid).

If you aim for perfect precise results, you need to configure your characters as "generic" (but you are not able to use the same animation on multiple characters anymore except if they use precisely the same skeleton). You can convert your existing UMotion projects to generic by creating a new project (of type generic), assign the generic version of your character to the Pose Editor and then import the animations directly from the humanoid umotion project.

Let me know if you have any further questions.

Best regards,
Peter

I believe I had different case.


My chars hip position changes or some how. umotion hip position and game hip position are not same.


Today I try many things. One interesting thing is. I had two different sets of the characters. Both are same meshes.

However in game I had lots of scripts. So I put my game characters into empty game object shich hold game scripts. I also pose characters which does not contain that empty character. I move that empty object via scripts then I upload animation into the game character wia script.

Today when I'm playing with umotion and my problem. I realize. game characters inside of the empty characters gets teleport update and does not stay at 0.0.0 some how they updating. Is this about baking ?

I'll check more and returning to you.

Another interesting thing is. One of my animations is not have any hip movement, character stays only hands and fingers moves. However, when I import the animation every frame has hip position key frame. 

Also, when I bake the Generate Root Motion inside of the anim file, My game character inner object does not change on his x.y.z location

"Today when I'm playing with umotion and my problem. I realize. game characters inside of the empty characters gets teleport update and does not stay at 0.0.0 some how they updating. Is this about baking ?"

That might mess up the root motion (the offset of the empty game object might be added to the root motion of the animation). I recommend that you keep your humanoids directly in the root of your scene (with no parent object).


"Another interesting thing is. One of my animations is not have any hip movement, character stays only hands and fingers moves. However, when I import the animation every frame has hip position key frame."

That's expected. If there wouldn't be keys for the hips, your hips would move as the center of mass (which is the origin of a humanoid character, see blog post) changes when you move other body parts.


"Also, when I bake the Generate Root Motion inside of the anim file, My game character inner object does not change on his x.y.z location"

That's why "Generate Root Motion" was added to UMotion. In some cases Unity does very weird things when it generates the root motion itself. That's why I've added the possibility to let UMotion generate the root motion curves instead.

Thanks man, sorry for takin your time and it was drives me crazy.

So ? I wrote a simple hack.

When I change the pose or animation, next frame I update the inner object transform to local 0.0.0 problem fixed for now. Also I did not have to use bake everting into animation, no more eye problems. 


And I have to use characters with parent objects. I constantly changes characters. (new blendshapes for face expressions, characters, textures, Hairs.) also characters has some other components attacted. And I got probably 20 chars. In every update setting up these things over and over again takes time. So I put them in a contanier and container holds all of those scripts etc.

Anyway, thanks for support.

Here another problem.

Game play ok.

Timeline ok.

No root baking.

using timeline and umotion with sync.

Boom. Pose character moves forward. hip stay x:0 z:0

Fix: Reimport them fix the problem. Hmmm interesting.


Hi,
if you have a reproduceable problem, please make sure to create an empty Unity project that includes just the things I need to reproduce the issue (please test if you can reproduce the problem in that project too). Then send me the project with a short step-by-step instruction how I can reproduce the problem and a short explanation of the expected result vs the faulty result.

You can send me the project via the email support form (please request a link to my Dropbox if the file size exceeds the limits).

Without such a repo project it's really hard to tell what's going on.

Thank you very much.

Best regards,
Peter