Animation blending not working

I’ve tried all the ways given in documentation and all the files but it doesn’t support blending with all animation types. Is there any alternative ways to provide blending for walking,running, and idle pose in babylonjs.

@roland, I tried it but it is not working.

What do you mean by not working? I’ve played with the PG a bit and it works. :stuck_out_tongue:


like this i added all the necessary functions into it but not blending properly

I am sorry, but I can’t help you without a (not)working playground example. How could I (or anyone else) based on a screenshot of unformatted code absolutely out of context… :see_no_evil: :stuck_out_tongue:

Check this one, this is a simpler example of animation blending:

2 Likes

I think some people believe we are psychics instead of developers :rofl:

1 Like

@carolhmj As a developer, you can provide alternative solutions because I’m new to this. don’t kindle or criticize.

It’s extremely hard to provide any solutions when the question asked doesn’t provide nearly enough context to go on. Saying you tried “everything”, and “nothing works” doesn’t help us solve your problem, we can’t possibly know all the code you wrote and what are you expecting to see on your screen. We ask for EVERYONE to provide a Playground example of their code so we can have an idea of what they did. Roland has provided you with examples, but you haven’t explained what are you seeing wrong with them. We want to help people, but it’s hard when they make helping hard. I was joking with Roland on that message before, but it’s actually frustrating, at least for me, when people expect great answers from limited information. :confused:

1 Like

Through, please don’t take this as “you can’t ask questions”. Asking questions is ESSENTIAL. Asking questions is a skill that also can be developed. And it’s one of the most important skills to learn as a developer, more than mastering a specific language, imo.

I’ll leave some links that summarize it:
How do I ask a good question? - Help Center - Stack Overflow
The Beginner’s Guide to Asking Coding Questions Online (codewithandrea.com)
4 Ways to Ask Better Questions as a Software Engineer | by Devin Soni | Better Programming

2 Likes

https://www.babylonjs-playground.com/#BDAEG7

This is the file I’ve been working and I didn’t attach any files in the asset if needed I’ve resend my asset.

after adding all the assets it will look like this.

We need to see your assets with it. Using External Assets In the Playground | Babylon.js Documentation (babylonjs.com)

You as a developer can understand what do other developers need to help you. I’ve provided you two working Playgrounds that proves that animation bleding works. Your answer that it doesn’t work without any explanation would raise an alert in anyone that you’ll be a hard nut to crack and to help. Just imagine that I’ll tell you that my app doesn’t work and I’ll send you a screenshot with 15 lines of code. Will you be able to help?

@carolhmj is not critizing you, I believe she just wanted to be funny. Honestly I am pretty dissapointed how you reacted to her. It’s you who must improve your communication. We are helping your for free, in our free time so please watch your attitude and be nice to everyone on the forum.

Thanks!

@roland I didn’t shout or use any words to her, I just said, don’t kindle people Nothing more i said.
and as you said, if I’m familiar with some software I can also help people with small lines of code.

No worries @roland, I was out of turn to joke like that, so let’s move on and wait for an updated Playground.

1 Like

Let’s get back to the point.
Which of the following outcomes do you mean?

  1. do you want the blend of all animations to start and stop with the start when transitioning from walking to running?
  2. Or do you want the blend weights to change as you move?

My project implemented both and can help you with the movement process to some extent.
The method in 1. works if you already have the blend weights in when you load the model and control them with start stop.
The method in 2 only changes the weight on each move.

Looking at your PG, I’m guessing it’s closer to method 1.
Can you apply the following blend to each animation group and run it?
(YOUR_ANIMATION_GROUP is meaning: walkAnim, run … each other )

for (let index = 0; index < YOUR_ANIMATION_GROUP.targetedAnimations.length; index++) {
let animation = YOUR_ANIMATION_GROUP.targetedAnimations[index].animation
animation.enableBlending = true;
animation.blendingSpeed = 0.05;
}

@11128 Hi, I want to blend animation when the key is down.
From idle to walk, then walk to run, and again the same…

hi @GOKUL_S
https://forum.babylonjs.com/t/chatgpt-3d-talking-models/39801/4?u=11128
This can be solved in this way
However, the answer is up to you, as the transition to the move logic can vary greatly depending on the individual.