Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why changing average to cumulative in .skeleton breaks my animations #149

Open
vido89 opened this issue Oct 8, 2022 · 8 comments
Open
Labels

Comments

@vido89
Copy link

vido89 commented Oct 8, 2022

So basically I splitted my animation to upper body and lower body and I want to play them simultaneously aka "cumulative" in ogre-meshviewer but when I convert .skeleton to .skeleton.xml and change

<skeleton blendmode="average"> to <skeleton blendmode="cumulative"> it breaks my animations

BreakAnim

RoR_bot-2022-10-09_13.41.47.mp4

I tried same thing on OGRE mascot Simbad and it plays animations just fine

@sercero
Copy link
Collaborator

sercero commented Jan 2, 2023

Can you share the Blender model?

@vido89
Copy link
Author

vido89 commented Jan 3, 2023

@sercero https://mega.nz/file/ZMgXFS6C#VI2fFlZ4SEfizRb9_tfxv1CrjuKRChKoCCsn0F0rBjc

@sercero
Copy link
Collaborator

sercero commented Jan 5, 2023

First of all, nice model!

Pretty handsome:
image

@sercero
Copy link
Collaborator

sercero commented Jan 5, 2023

I think the problem might be here:
image

You have keyed all these bones in the Run_lower animation and they belong to the upper torso.

So, when you play both the Run_lower and Run_upper animations at the same thime, the bones are going to be fighting to set the transform on the vertexes.

You have to delete these keyings from the Run_lower action and then do the same for the Run_upper action but deleting the bones that belong to the legs.

In order to delete these keyings, press the ▷ next to the bone name and you will see the transforms. You can use box select to select al the transforms and delete the keying.

Just in case after doing this process delete the NLA Tracks you created and create them again, I think this might not be necessary but ¯_(ツ)_/¯

@sercero
Copy link
Collaborator

sercero commented Jan 6, 2023

@vido89 I did the changes indicated here and exported the model again.

Now with ANIMBLEND_CUMULATIVE and both animations Run_lower and Run_upper active at the same time the character moves properly.

So this is not an issue with blender2ogre.

But I think that some documentation about this would be nice since it is a common thing to want to separate upper and lower body animations.

@vido89
Copy link
Author

vido89 commented Jan 6, 2023

@sercero tnx for your help I will test in next few days

@sercero
Copy link
Collaborator

sercero commented Jan 7, 2023

I was checking out the differences between your model and that of Sinbad.blend to try to understand what is the issue.

The Sinbad.blend model has all the bones in both animations and that to me did not make sense.

But now I understand what happened with your model.

In your Run_upper animation you can have keyframes for the lower bones, but their transforms have to be zero (which is not the case in your model).

So another fix for your issue is selecting the bones which should not move in the Run_upper animation, going to the first frame and do an Alt-G and Alt-R to reset their transforms and insert the key frame. Then do the same for the last frame of the animation. Then repeat for Run_lower.

@vido89
Copy link
Author

vido89 commented Jan 7, 2023

Aha I see, I could swear that I removed all key frames on opposite animations, thank you @sercero for helping me out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants