Page 1 of 2

MR Bake Bone Dynamics

Posted: Mon Jan 30, 2023 2:53 am
by KuzKuz
This script allows you to bake the movement of the bones created by bone dynamics.



Download link: https://mohoscripts.com/script/mr_bake_bone_dynamics

Re: MR Bake Bone Dynamics

Posted: Mon Jan 30, 2023 3:20 am
by Greenlaw
This sounds excellent Eugene! I can't wait to download and try it out this evening.

Thank you for sharing this! :D

Re: MR Bake Bone Dynamics

Posted: Mon Jan 30, 2023 12:59 pm
by Daxel
Wow this is so cool! Thank you for sharing and explaining (:

Re: MR Bake Bone Dynamics

Posted: Sun Feb 12, 2023 6:26 pm
by KuzKuz
Thanks!

Re: MR Bake Bone Dynamics

Posted: Mon Apr 01, 2024 11:14 am
by Daxel
I tried this today after watching your youtube video tutorial but didn't manage to make it work. The script is creating keyframes for the selected bone, but these keyframes don't add any movement. Maybe the script is not compatible with Moho 14.1?

Re: MR Bake Bone Dynamics

Posted: Mon Apr 01, 2024 5:00 pm
by KuzKuz
Daxel wrote: Mon Apr 01, 2024 11:14 am I tried this today after watching your youtube video tutorial but didn't manage to make it work. The script is creating keyframes for the selected bone, but these keyframes don't add any movement. Maybe the script is not compatible with Moho 14.1?
Yes, you're right. The bone dynamics in version 14 work differently, so my algorithm doesn't fit the new behavior.
Version 14 does not update the dynamics when the script changes the frame. I tried to work around this, but I wasn't successful.

Re: MR Bake Bone Dynamics

Posted: Mon Apr 01, 2024 5:53 pm
by Daxel
Oh, that's unfortunate. It was a cool script. Thank you anyway!

Re: MR Bake Bone Dynamics

Posted: Mon Apr 01, 2024 6:05 pm
by Greenlaw
Oh, shoot, that's too bad. It's been a while since I had to use it, but MR Bake Bone Dynamics was exactly what I needed at the time.

A minute ago, I had an idea to try Copy Deep Frame Range as a workaround since the result is baked keys in the range. Unfortunately, the command ignored the Bone Dynamics motion.

FWIW, if the goal is to reduce CPU usage and lock the animation, what I did a long time ago was use Layer Comps to pre-render the bone dynamics, import the image sequence to replace the animated element, disable bone dynamics, and hide the original art. It's not an ideal workaround, but it saved me a lot of time back when I was on my not-so-powerful laptop.

Re: MR Bake Bone Dynamics

Posted: Mon Apr 01, 2024 6:30 pm
by Daxel
Greenlaw wrote: Mon Apr 01, 2024 6:05 pm
FWIW, if the goal is to reduce CPU usage and lock the animation, what I did a long time ago was use Layer Comps to pre-render the bone dynamics, import the image sequence to replace the animated element, disable bone dynamics, and hide the original art. It's not an ideal workaround, but it saved me a lot of time back when I was on my not-so-powerful laptop.
That's a nice idea but my problem is not the performance but the need for manual tweaking of the result. In this case I am animating a lot of loops so I need these dynamic bones to return to their first frame pose at the end of the loop.

I guess if I just make a loop loop for a while in the timeline, the bone dynamics should stabilise and start having the same pose at the first and last frame, but I have a timeline full of different loops one right after the other (which is very convenient to make changes, exporting, reusing keyframes etc) so I would have to split this file into a lot of files each with one of the loops looping for a while and my brain doesn't like that.

Re: MR Bake Bone Dynamics

Posted: Mon Apr 01, 2024 8:39 pm
by Greenlaw
Do you still have Moho 13.5 installed? Maybe you can open the project there, bake the dynamics, and then bring the project back into 14.1 for editing.

(It's for situations like this that I keep 12.5 and 13.5 on my computer.)

Re: MR Bake Bone Dynamics

Posted: Mon Apr 01, 2024 10:20 pm
by Daxel
Greenlaw wrote: Mon Apr 01, 2024 8:39 pm Do you still have Moho 13.5 installed? Maybe you can open the project there, bake the dynamics, and then bring the project back into 14.1 for editing.

(It's for situations like this that I keep 12.5 and 13.5 on my computer.)
I'm worried about the version switching causing bugs but I may try that, thank you.

Re: MR Bake Bone Dynamics

Posted: Mon Apr 01, 2024 11:02 pm
by Greenlaw
Make a copy of the original project and open the copy in 13.5.

After baking the bone dynamics in 13.5, open the original project in 14.1. Then use Import Project to import the 13.5 project, and select only the relevant item. Import lists items by top layers and groups, so pick only the one containing the baked bone dynamics.

Bonus tip: It's okay to delete the original unbaked version from the 14.1 project, but I would keep it along with the baked version, but hide it and disable dynamics. This version would be my backup in case I mess up something later or need to reanimate the root object and have to rebake it.

Re: MR Bake Bone Dynamics

Posted: Tue Apr 02, 2024 9:40 am
by Daxel
Greenlaw wrote: Mon Apr 01, 2024 11:02 pm Make a copy of the original project and open the copy in 13.5.

After baking the bone dynamics in 13.5, open the original project in 14.1. Then use Import Project to import the 13.5 project, and select only the relevant item. Import lists items by top layers and groups, so pick only the one containing the baked bone dynamics.

Bonus tip: It's okay to delete the original unbaked version from the 14.1 project, but I would keep it along with the baked version, but hide it and disable dynamics. This version would be my backup in case I mess up something later or need to reanimate the root object and have to rebake it.
Now that I think about it, maybe I only need to copy these baked keyframes from the 13.5 copy to the original and disable bone dynamics.

Re: MR Bake Bone Dynamics

Posted: Tue Apr 02, 2024 4:20 pm
by Greenlaw
Oh, duh, you maybe be right! Simpler is better, I say.

Thanks for sharing the extra bonus tip. :D

Re: MR Bake Bone Dynamics

Posted: Tue Apr 02, 2024 4:27 pm
by Greenlaw
Shoot...I just tried it, and it doesn't work that way.

It seems I can copy keyframes between projects within one instance of Moho but not between two instances of Moho, whether they are the same or different versions.