Bake Bones Script
Moderators: Víctor Paredes, Belgarath, slowtiger
Bake Bones Script
WHAT DOES THIS SCRIPT DO?
This script will bake the point motion from a bone layer onto a mesh. This allows the user to create motions and blends of motions using bones and then bake those alterations to keyframes on the vector layer.
HOW DO I USE IT?
Simply activate the script from the script menu and choose the interval you wish to bake to. The script will do the rest. Be aware that the script can take a while if there is a lot of point motion to bake.
DOWNLOAD: n/a
EDIT:
I greatly improved the speed of the script.
This script will bake the point motion from a bone layer onto a mesh. This allows the user to create motions and blends of motions using bones and then bake those alterations to keyframes on the vector layer.
HOW DO I USE IT?
Simply activate the script from the script menu and choose the interval you wish to bake to. The script will do the rest. Be aware that the script can take a while if there is a lot of point motion to bake.
DOWNLOAD: n/a
EDIT:
I greatly improved the speed of the script.
Last edited by dkwroot on Sat Oct 02, 2021 1:40 pm, edited 1 time in total.
- funksmaname
- Posts: 3174
- Joined: Tue May 29, 2007 11:31 am
- Location: New Zealand
Re: Bake Bones Script
COol! thanks as always
I've not tried yet - is there an option to just 'bake current frame'? that could be useful too!
Keep up the good work mate.
I've not tried yet - is there an option to just 'bake current frame'? that could be useful too!
Keep up the good work mate.
Re: Bake Bones Script
No, it bakes all frames. Keyframes that aren't needed can be deleted manually.
- funksmaname
- Posts: 3174
- Joined: Tue May 29, 2007 11:31 am
- Location: New Zealand
- synthsin75
- Posts: 9972
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Bake Bones Script
Hayasidist has one to bake current frame only.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
- hayasidist
- Posts: 3519
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Bake Bones Script
it's here ... http://www.mediafire.com/file/374qob23a ... s_bake.lua It does all (well most!) transforms on vector layers - bone motion / layer motion / shape order ...
It's been around since 11.1 - read about it here: http://www.kelleytown.com/forum/animato ... hichpage=2
and here http://lostmarble.com/forum/viewtopic.p ... 6&p=170901
It's been around since 11.1 - read about it here: http://www.kelleytown.com/forum/animato ... hichpage=2
and here http://lostmarble.com/forum/viewtopic.p ... 6&p=170901
Re: Bake Bones Script
Pretty, pretty, pretty cool.
-
- Posts: 3
- Joined: Wed Jun 14, 2017 6:34 am
Re: Bake Bones Script
I've tried out and really likef both the dr_bake bones & hs_bake, but it would be better if they had shared one another's features. It would be a real time saver if the dr_bake_bone stored layer translation information, which the hs_bake does; but none the less hs_bake would be better with the option to bake all frames rather than only the one frame.hayasidist wrote:it's here ... http://www.mediafire.com/file/374qob23a ... s_bake.lua It does all (well most!) transforms on vector layers - bone motion / layer motion / shape order ...
It's been around since 11.1 - read about it here: http://www.kelleytown.com/forum/animato ... hichpage=2
and here http://lostmarble.com/forum/viewtopic.p ... 6&p=170901
I'll keep watch if there are any future updates on these scripts. Thanks again for the time saving scripts.
Re: Bake Bones Script
OK, at the risk of sounding like a complete idiot....what does "baking" mean? How is that different from freezing? What does it actually do? Thanks!
-
- Posts: 3
- Joined: Wed Jun 14, 2017 6:34 am
Re: Bake Bones Script
It's all good, I didn't know what the term meant in terms of 2D animation; until I checked out these cool scripts.
In terms of these scripts, baking means to transfer all the position, rotation, and scale points from a parent layer such as a folder or bone and combine the frames into the vector layer itself. Meaning the vector layer can now become independent of the bone or folder layer it was once stored in while still inheriting the properties of movement it had while it was still within the folder or bone layer.
Here is an example, just for further clarification. A vector layer is within a folder, you move the folder layer's position. This automatically moves the vector layer's position. If you bake the vector layer, using the hs_bake script it will store the folder layer's movement info into the vector layer. If you don't bake it, but move the vector layer out of the folder layer; your vector layer would not keep the folder layer's movement changes.
Hope that helps you understand what the scripts do. These scripts have really made Moho 12.2 a better and more reliable program for me to use. It has made me more interested in scripting, so hopefully I can find out how they did this and share it.
In terms of these scripts, baking means to transfer all the position, rotation, and scale points from a parent layer such as a folder or bone and combine the frames into the vector layer itself. Meaning the vector layer can now become independent of the bone or folder layer it was once stored in while still inheriting the properties of movement it had while it was still within the folder or bone layer.
Here is an example, just for further clarification. A vector layer is within a folder, you move the folder layer's position. This automatically moves the vector layer's position. If you bake the vector layer, using the hs_bake script it will store the folder layer's movement info into the vector layer. If you don't bake it, but move the vector layer out of the folder layer; your vector layer would not keep the folder layer's movement changes.
Hope that helps you understand what the scripts do. These scripts have really made Moho 12.2 a better and more reliable program for me to use. It has made me more interested in scripting, so hopefully I can find out how they did this and share it.
- hayasidist
- Posts: 3519
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Bake Bones Script
freeze = add keyframes for all the movable things so, when you move them later in the timeline, they start moving from the "freeze" position not some previous key frame.Ahroo wrote:OK, at the risk of sounding like a complete idiot....what does "baking" mean? How is that different from freezing? What does it actually do? Thanks!
(e.g. you have a shape with four points -- on frame 5 you move 2 of them; on frame 10 you move the other 2. If you haven't done anything else all the points start moving from frame 1. But if at frame 5 you "freeze" all the points, the second two points start moving at frame 5)
(my) bake = create a copy with no keyframes and with all the motion captured in a "frame 0" design.
The basis of my idea is to create a handoff between "traditional" moho animation (bones etc) and frame by frame -- IOW rig your character - move it using bones etc; then you need some motion where doing it fbf is "easier" (e.g. you need to change the view from face-on to looking down on the top of their head) so bake the vectors at the end of the "traditional" action to create the starting layers for an fbf sequence ...
... interesting idea -- in effect turn traditional into an fbf sequence?!.. I'll keep it in mind...Broughtvulture wrote:hs_bake would be better with the option to bake all frames rather than only the one frame
But if you're heading into the realms of scripting, you might like to try a script that does something along the lines of:
for frame = 1 to MohoDoc:AnimDuration() do
> set timeline to frame (see http://www.mohoscripting.com/index.php? ... face&id=47)
> call bv_bake_noUI
end
and create bv_bake_noUI from hs_bake taking out the UI and defaulting to (say) current camera...
-
- Posts: 3
- Joined: Wed Jun 14, 2017 6:34 am
Re: Bake Bones Script
Fbf sequence, yeah; Also I'm assuming all the frames will be within the same layer.hayasidist wrote: ... interesting idea -- in effect turn traditional into an fbf sequence?!.. I'll keep it in mind...
Although this isn't really an issue for me; I think this would improving Moho. It would make things more organized, since after finishing an animation you can reduce the file size by minimizing the amount of layers within the file down to just vectors. But in all honesty, I'm using it as a method of masking(hiding overlapping layers) so I don't have to trace what I need to not show or duplicate an entire folder with bones and stuff just to hide parts that overlap.
This is technically my 3rd day and I'm kind of getting the hang of scripting, but things like UIs, Matrix, Dialog boxes, as well as some other stuff not concerning layers or meshes are still beyond me. I wish I could, but I can't even break down your code and figure out how your able to select the folder/bone layer based on the vector layers position.hayasidist wrote:But if you're heading into the realms of scripting, you might like to try a script that does something along the lines of:
for frame = 1 to MohoDoc:AnimDuration() do
> set timeline to frame (see http://www.mohoscripting.com/index.php? ... face&id=47)
> call bv_bake_noUI
end
and create bv_bake_noUI from hs_bake taking out the UI and defaulting to (say) current camera...
I'm kind of nervous about messing with the script, so I decided to create a whole new script. I'm currently trying to find out how to select the vector's parent layer, so far the LayerByAbsoluteID keeps selecting the wrong layer and type. But I'll stop here, since this thread is more about the scripts and not really how to make them.
Either way, it's pretty cool to get your input on it. Should I make a new thread for this type of help?
- hayasidist
- Posts: 3519
- Joined: Wed Feb 16, 2011 8:12 pm
- Location: Kent, England
Re: Bake Bones Script
yeah! and maybe do a search of scripting and/or the unofficial (but better than the stuff that comes with the s/ware) scripting docs: http://www.mohoscripting.com/index.php to see about parent layers -- e.g. http://www.mohoscripting.com/index.php? ... ent&id=499 -- before you post the next question !Broughtvulture wrote:Either way, it's pretty cool to get your input on it. Should I make a new thread for this type of help
Re: Bake Bones Script
If you're new to scripting with Moho, I'd suggest checking out the scripts recipes thread. Users have shared solutions to a lot of redundant tasks that often appear in coding.
viewtopic.php?f=12&t=30605
viewtopic.php?f=12&t=30605