plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.

Please take a moment to read the platform’s guidelines before you get started!

question

tonypezz avatar image
tonypezz asked karlo922 commented

Animation NLA blending issue

hello guys,
I am having an issue with multiple NLA animations mixing up in game.
I need your help to understand how to play them "separately" in game.

There is 1 armature with multiple bones, all these bones are performing 4 actions (A,B,C,D) and some of these bones are shared between the actions.

aligned.jpgI tried having 4 tracks with 1 strip each, all from 0-100 frames and been playing with Blending modes "replace, add, multiply, combine" to mix them correctly.
The issue is, I do not want them to mix, but I need them to play separately since each track will be connected to specific Hardware input.

I also tried to split NLAs by using different keyframes:

staggered.jpg

and obviously adapting the animation lenght in the XML.

The result is the same, in either cases the animations end up mixing and I can't find no way to fix this.
also changing the extrapolation modes does not help..
In blender all is fine and it looks as wished, I just need to see it in game.

I am using blender and exporting glTF2 with mfs2020toolkit addon.

ps. all animations exported one by one work good in game, it is all about avoid mixing them once exported together.

Can anyone please help?
Thank you.

animationblender
aligned.jpg (121.3 KiB)
staggered.jpg (79.8 KiB)
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

virtuali avatar image
virtuali answered

I don't know Blender but, I think the animation mixing is a kind of Blender-specific abstraction, which other 3d programs also have but, when exporting any game engine, they aren't usually supported as they are, they must usually be "baked" into a single timeline with all the blending being done at the export level so, nothing of the original separate animations is left over in the exported file, just a single timeline. Does the Blender export has something like a "bake animations" option ?

10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

luicid avatar image
luicid answered

Hi,

I made a flag with multiple NLA track and I never had an issue. I think you should not play with the mix

What I'll do:

Add an armature, then add actions but before pushing them I will add a track like this and select the track


1626093142516.png



With this method, I will have an armature with NLA tracks and all the tracks. And inside each track, my animations


1626093142516.png (56.2 KiB)
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

tonypezz avatar image
tonypezz answered

hi guys, thanks for the suggestions.

The pose bake for all NLAs is partially decreasing the mixing issue between NLAs.

The issue is not solve though, NLAs are still get mixed up even if they all are baked resulting into a wrong animation behaviour.

As an example, imagine you push the joystick and the and the yoke moves but also the pedals because they have a bone in common (NLA add up the values to each other).
this is just an example and not the real case.

I expect some simple blending parameter to limit those NLA to mix in game but i did not find any, probably the Gltf2 exporter from Blender does not export such info correctly for the game.

Any other idea?

10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

tonypezz avatar image
tonypezz answered karlo922 commented

Hello everyone,

I need this issue to be solved, it is still not clear to me if it is a game limitation, a blender / exporter limitation or I am simply doing something wrong.

Whenever there is an armature which has one or more meshes parented to it (skinned or rigid) I end up having mixing animations in game.

I created a fake scene to show you an issue on a generic model:

https://youtu.be/cyyRgR7zh3U
You can see in red, all input pieces (joystck, throttle and pedals)
In blue, there is a human with full body armature, this means the bones will move the same mesh with every action but differently depending on the called action.
you can notice that while i move the pedals, the arms are moving, or if i move the joystick. the throttle will move.
Separating this in 3 armatures would help but it is not the solution I am looking for.

In Blender all animations seem right (I also baked them so there is no free interpolation).
if you export animations one at time, they will look correct in game.
If you export animations all at once, this will look mixed up in game (moving 1 arm will influence the other).
I am sure the issue is not the skinned/cloth mesh, becuase i am having the same issue with simulated rigid parts (like engine) where some mesh is shared between multiple bones.

I also added a default state nla in the last attempt, the issue is the same also without it

I am uploading the blender file + the in game package.
mixing_issue.zip
If any of you could please help, it would be awesome.
Thank you.


mixing-issue.zip (925.6 KiB)
1 comment
10 |10000 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.