Page 2 of 3
Re: Nested bone layers
Posted: Thu Mar 17, 2022 3:36 am
by synthsin75
Here's how you'd want to do a modular rig of this:
https://www.mediafire.com/file/o2alg69c ... .moho/file
What I did was this:
1. Copy your two non-working SBs to the eye bone layer. They will paste with their existing actions, to control point and layer transforms.
2. Rename those two SBs in the head bone layer.
3. Create a new SBA for each one, with the new names.
4. With each new SBA opened, right-click the bone's old SBA and Insert Copy.
5. Now just remove the keyframes from the original SBAs in the head bone layer.
Starting from scratch, you'd want all these SB controls in the modular eye bone layer. Then you'd copy/paste them to your head bone layer, rename them there, create new SBAs for the new names, and remove the original SBAs keyframes from the head bone layer.
This might be what the merge skeletons script is doing. I haven't tried it myself. If not, a script could certainly automate all of that. It ends up being an ungodly amount of SBAs though. The price for modularity, I imagine.
Re: Nested bone layers
Posted: Thu Mar 17, 2022 5:51 pm
by ggoblin
Thank you Wes for looking into this.
I only created the two non-working SB in the head layer to demonstrate that I couldn't directly animate points or layers in a nested bone layer from the main bone layer as I think Greenlaw had a different experience of this. But yes your point is very pertinent - if we want this modularity we need to create tons of smart bones in the nested bone layer which can then be animated from smart bones we create in the main bone layer for all animations in the nested layer that need to be controlled from the main bone layer.. a head ache! Even if this is automated by a script, depending on the project, it could create such a messy rig.
Re: Nested bone layers
Posted: Thu Mar 17, 2022 10:06 pm
by Greenlaw
ggoblin wrote: ↑Thu Mar 17, 2022 5:51 pm
I only created the two non-working SB in the head layer to demonstrate that I couldn't directly animate points or layers in a nested bone layer from the main bone layer as I think Greenlaw had a different experience of this.
I don't know if this helps but here's an example of what I'm talking about...
blinkNested_01.moho
In the parent bone layer, you'll find a blink SBD that blinks the eyes art that exists in a vector layer nested under a child bone layer. The blinking animation is a point animation driven by the SBD, but it can just as easily drive layer transform animations.
This is a basic example, but in more complicated situations I found I need to create a second SBD in the child bone layer which does the actual animation, and the SBD in the parent bone layer is simply turning the second bone in the nested bone group. In this situation, you'll want to be sure the bone names are different. Typically, I'd call the one in the parent bone group blink and the one in the child bone group blinkA. If you don't do that, Moho will just ignore the SBD in the parent group.
There are rare situations where I need to keep a bone 'active' by using bone targeting...but I think that's when I'm daisy-chaining a bunch of SBDs and I have point animation nested somewhere along the way. (I ran into this years ago when I was sliding some points in a head turn. I initially fixed this using the targeting trick, but I later revised this to just transforming the layer instead of animating the points.)
Hope this helps.
Re: Nested bone layers
Posted: Fri Mar 18, 2022 1:24 am
by synthsin75
Greenlaw wrote: ↑Thu Mar 17, 2022 10:06 pm
I don't know if this helps but here's an example of what I'm talking about...
blinkNested.moho
In the parent bone layer, you'll find a blink SBD that blinks the eyes art that exists in a vector layer nested under a child bone layer. The blinking animation is a point animation driven by the SBD, but it can just as easily drive layer transform animations.
That only works because you have no bones in the childBones layer. If the eyes were meant to be modular, I'm sure you'd want premade SBAs to import with it. But if you use your method, of moving all the modular bones to the main skeleton, you end up with no bones on the modular bone layer.
So there's many ways to skin the cat.
Re: Nested bone layers
Posted: Fri Mar 18, 2022 1:47 am
by Greenlaw
synthsin75 wrote: ↑Fri Mar 18, 2022 1:24 am
So there's many ways to skin the cat.
That's true...so here's another one with bones in the child layer...
nestedBlink_02.moho
I added four bones for 'ears' and a root bone to the child bone layer, and this version can still animate the point animation blink using the SBD in the parent layer.
This uses the second method I described in my previous post. The trick is to create a second SBD in the child bones that drives the point animation and have the SBD in the parent bones layer simply drive the SBD in the child bones layer.
I probably should have posted this variation first since it represents a more practical way to do this sort of thing.

Re: Nested bone layers
Posted: Fri Mar 18, 2022 1:55 am
by synthsin75
Greenlaw wrote: ↑Fri Mar 18, 2022 1:47 am
This uses the second method I described in my previous post. The trick is to create a second SBD in the child bones that drives the point animation and have the SBD in the parent bones layer simply drive the SBD in the child bones layer.
That's what my example is doing too. The only other idea I had was using a warp mesh, which can bypass sublayer bones blocking main bone layer influence.
Re: Nested bone layers
Posted: Fri Mar 18, 2022 1:56 am
by Greenlaw
BTW, this also works fine for layer transforms, not just point animations. It also works for Switch Layers, which is how it was used in that Nachos Demo project I posted a week ago...
Nachos Demo Project
Hope this helps.
Re: Nested bone layers
Posted: Fri Mar 18, 2022 2:00 am
by Greenlaw
synthsin75 wrote: ↑Fri Mar 18, 2022 1:55 am
That's what my example is doing too....
Ah, ok! I responded because I saw my name in a post and thought I should back up what I wrote with an example. I probably should have read the other posts more carefully.

Re: Nested bone layers
Posted: Fri Mar 18, 2022 2:12 am
by synthsin75
Greenlaw wrote: ↑Fri Mar 18, 2022 2:00 am
Ah, ok! I responded because I saw my name in a post and thought I should back up what I wrote with an example. I probably should have read the other posts more carefully.
That's fine. I often don't have time to read too carefully either.

Re: Nested bone layers
Posted: Fri Mar 18, 2022 7:35 am
by ggoblin
Thank you for the examples Greenlaw.
Probably a very silly question but when I opened the smart bone action 'blink' timeline in your example file I couldn't see the Point Motion keyframes on the timeline when the eyes blinks (even when I changed the layer from parentBones to eyeball), why is that? In my projects I can always see it.

smart bone rotation keyframe show

but point motion keyframe for eyeball points transform don't show
Re: Nested bone layers
Posted: Fri Mar 18, 2022 7:49 am
by Greenlaw
If this is
nestedBlink_01, I don't think you're looking at the
blink Smart Bone Action for the vector layer. Here's what it should look like.
If you're looking at
nestedBlink_02, the one with the additional bones in the child bone layer, you need to look at
blinkA, not
blink. This is because the point animation is in
blinkA's Smart Bone Action as described earlier. The
blink SBD only drives the
blinkA SBD, it doesn't do anything directly to the
eyeball vector layer.
BTW, I noticed you swapped the order of the eyes layer in your file. This shouldn't affect the Smart Bone Action but it does affect the masking.
Just to be sure you're working in unaltered versions, I would download the files again.
Re: Nested bone layers
Posted: Fri Mar 18, 2022 8:13 am
by ggoblin
Ooops! Let me download it again.. things are jumping all over the place using the pen and tablet.. back to the mouse I think

Re: Nested bone layers
Posted: Fri Mar 18, 2022 8:29 am
by ggoblin
I am still not seeing any point motion in the blink timeline. The version I downloaded is called nestedBlink.moho , is that the same as nestedBlink_01.moho ?

Re: Nested bone layers
Posted: Fri Mar 18, 2022 8:51 am
by ggoblin
I think in the version I have ( nestedBlink.moho ) the blink smart bone in the parentBones layer is calling the blinkA smart action in the childBones layer to perform the eye blink. The timeline for the blinkA does show what your screen capture shows - Point motion and Point curvature keyframes. But as a general question how can we know what the blink bone (or any smart bone) is doing if we can't see what smart actions it calls or the key frames that call initiates?
In case I'm not clear, what I'm asking is is there a way to see on the smart bone timeline that on a certain frame it has called another smart action? How can I be sure that blink smart bone has called blinkA smart action?

Re: Nested bone layers
Posted: Fri Mar 18, 2022 4:09 pm
by Greenlaw
Ah, ok...let me check that. I might have goofed up and linked to a WIP and not the final version. If so, my bad, and thanks for letting me know!
Update: Yup, that was it! Fixed now. Sorry about that!
Just to be clear, you probably want to look at the second one,
nestedBlink_02.moho because this one has the extra bone SBD in the child bones layer.
nestedBlink_01 works but it's not as useful in practice.