Ridge Batty Posted November 8, 2017 Share Posted November 8, 2017 Hi, I'm trying to modify animations in real-time but it seems to be extremely difficult in practice. There are functions to modify bone rotations, positions, scaling and nice helpers like BoneLookController and BoneIKController... but all of them seem to break down when you change the animation (from walking to running for example). Every time I change animation, all the parameters are reset, causing terrible jerks and twitches when the system tries to blend the controller or rotation back into place. Is there a way to force animation blending off for single rotation or controller? I can't turn the blending off for the whole skeleton, because then the animations stop blending... obviously. Is this a known issue or is there any solution? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 8, 2017 Share Posted November 8, 2017 Hello! can you try to repro this behavior in the playground? I'm not sure to fully capture what you mean by "modify animations" Quote Link to comment Share on other sites More sharing options...
Ridge Batty Posted November 8, 2017 Author Share Posted November 8, 2017 I'll try to do that when I got time! It's not simple to create a pg with multiple animations... or maybe I just suck. Meanwhile I try to explain briefly: Imagine exported animated skeleton from Blender with say 2 animations. First animation is a guy walking and in second he is running and his head looks always forward. I add BoneLookController to make the guy turn his head 90 degrees right. When I change the animation from walking to running, the head tries to turn forward because that's how the animation is made. No matter how "quickly" I try to turn it 90 degrees right, the automatic blending is already twisting the head forward. It maybe be only 1-2 frames, but it looks very bad if the angle is large (like 90 degrees). Quote Link to comment Share on other sites More sharing options...
adam Posted November 8, 2017 Share Posted November 8, 2017 Are you calling the look controller's update function in beforeRender? https://doc.babylonjs.com/how_to/how_to_use_bones_and_skeletons#bonelookcontroller Quote Link to comment Share on other sites More sharing options...
Ridge Batty Posted November 9, 2017 Author Share Posted November 9, 2017 Yes, otherwise there would be no problems - since nothing would happen to the animation And rest assured, I have called it before rendering, after rendering, before starting animation, during animation, after starting animation and all these combinations, I did a for loop to call it 10 times... but the twitching doesn't go away. The update function works and it does it's job. But the animation blending is fighting against it. Sorry I'm venting now Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 14, 2017 Share Posted November 14, 2017 Hi again, RB! DK kindly repaired an issue with our simple animation blending (heretofore called 'AB'?) demo... https://www.babylonjs-playground.com/#2BLI9T#174 We're supposed-to click the fps tag in the upper right, and that causes the AB. I'm just now beginning to learn about AB, but... Ridge Batty... is there ANY WAY that you can create a simple playground... a couple of animations on some simple mesh... and somehow SHOW US ALL the issue? (thx, if possible). I like the way you have described the issue, so far. We need to TRY to smooth-out a "glitch" or jump. The blend activity is fighting-with the transition. A type of "reset" seems to happen. The turned-head description... perfect example, I think. You really need the 2nd animation... to check IF there is an active BoneLookController ANYWHERE on the mesh, and ignore all other animation attempts on that rig-portion... if there IS such. I don't think I am at-all qualified to advise on this, yet, or ever. But I still want to try stuff, and see it happen in a playground. Can you help us build a testing playground? If so, that would be great... and probably would become a tutorial. thx. And, you know, feel free to talk, too. Tell what you think, what you learn, etc. We'll take it. AB is an area needing all the info we can get. Hot topic, big future. Quote Link to comment Share on other sites More sharing options...
dunk Posted November 22, 2018 Share Posted November 22, 2018 Old topic but i'm experiencing this as well with my own scene. My character's head flips between the `BoneLookControl` position and the animation's position in quick succession. Interestingly i do not see it when i use one of the playground's provided scenes (The Dude): https://www.babylonjs-playground.com/#QY1WYT#43 (Click on the ground to have his head move.) This leads me to think the Dude probably doesn't have rotation data for his head in the animation like my model does... PM me if you want a link to my model demonstrating the issue. thanks, dunk. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.