Importing a pre-rigged limb

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
exile
Posts: 359
Joined: Mon Jul 30, 2012 10:25 pm
Location: Brandenburg, Germany
Contact:

Importing a pre-rigged limb

Post by exile »

https://youtu.be/CdN_E8LibNQ
Tutorial finished, an old style arm made of two rectangles with ends rounded into perfect half circles and covered by a pseudo patch (circle with no lines) bends well with bones placed perfectly. I tried importing the rigged limb into another Moho 12 file to attach the limb to a torso. It was possible to cut-copy the bones and paste them into the skeleton of the torso and reparent them, put the vector layer into that skeleton, re-connect the arm bones to the arm using point binding, and then to move the arm bones using the bone transform tool into place on Frame 1. Trying to reposition arm and arm bones separately on Frame 0 messed up the smooth action of the joint, it's too fiddly.
Is there a better, easier way to connect this type of arm to a character?
***********************
Steve

***********************
http://www.youtube.com/user/toonlyrics
Music Website: http://www.singadream.com
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Importing a pre-rigged limb

Post by Daxel »

Is this what you are trying to achieve? https://www.lostmarble.com/forum/viewto ... er#p198786

Edit: Not exactly the same case. That was more about the smart actions but your problem seems to be more about the point binding (that is lost when you paste the bone on a different bone layer) and the relocation of the bone, that doesn't carry the points with it so even if you try to move the points where the bones are, they won't be perfectly positioned the same way they were designed to be. I will look into it, I think I had a solution for that.

Edit2:

Well for the pasted bone loosing the point binding I don't see a solution other than rebind the points manually. Luckily al least the points remain colored in different colors that you can see when you select the point binding tool, so at least you won't bind the wrong points beacuse you have the colors as a guide.

For the relocation of the bone: always after binding the points, reparent the root bone of the limb to its new skeleton, and then you can relocate the bones carrying their points using the bone offset tool, that will put the limb on the right place only when you are on a different frame than 0. Here you can see the tool in action: https://www.youtube.com/watch?v=g-OHX1sUWYo

Those are the easy or official answers, but as always happens with Moho, you can take advantage of some techniques and scripts to solve problems in a more specific and advanced fashion (for example, to have the bones and drawings placed right even on frame 0). I will update this answer with those when I have the time if nobody mentions them.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Importing a pre-rigged limb

Post by Daxel »

The way I do that (having both the bones and the points relocated and on frame 0) is using one of my favourite scripts, by hayasidist, bake frame: https://www.lostmarble.com/forum/viewto ... 173732#top
Note that the post is about Dkwroot's bake bones script, that is meant to bake a whole bone animation, but I'm talking about hayasidist's bake frame script that is also shared there. It's for just one frame and takes into account a lot of properties that could be affecting that one frame, like layer properties, or even meshes (I use it often to bake those two things too).

If you are not familiar with the subject, baking means to keep something as it looks like in a certain moment but without the modifiers that are affecting it. In this case, baking removes the influence that bones, layer scaling, meshes etc could have over the points but it keeps the points as they looked like with those influences. If you don't know how to install a script and the different kind of scripts there are, see: https://www.youtube.com/watch?v=TUw1dhpBNEs&t=1s

And the process would be:

1. At frame 1 (or any other frame different than 0) put the limb where you want it to be moving its root bone.

2. Being at that frame, select the vector layer influenced by the bones and apply the script using the menu: Scripts - Drawing - Bake frame (your location may be different). That will create a new vector layer that is a bake of the layer you had selected as it looked like on the frame you were at. That means that the new layer is not affected by anything and you can create a keyframe on frame 1 for example and copy that keyframe 1 to the frame 0 of the original vector layer. You can delete the baked layer now. Do this for as many vector layers you need.

3. Finally just copy the bone keyframe you created relocating the bones on frame 1 and paste it on frame 0.
Post Reply