Layer order conflicts in multiple smart bones.

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
egypturnash
Posts: 18
Joined: Thu Jun 08, 2023 6:42 am
Location: New Orleans
Contact:

Layer order conflicts in multiple smart bones.

Post by egypturnash »

I have been working on rigging some stuff and getting somewhere. I've made some Smart Bones that move different parts of the character in pseudo-3d, and move the layers around - left/right legs moving in front of/behind the body as the character's lower body turns, and the left/right arms doing the same with the upper body. They all look great when I am editing the smart bone actions.

But when I try to key these Smart Bones separately, the layers don't change order as expected. The hip-rotation layer order changes seem to override the torso-rotation layer order changes. I can't go in and key layer order changes, ether, those get reverted after one frame.

I ended up getting it working by removing the upper body's smart bone's layer order keys, leaving the lower body's smart bone layer keys and adding some reference layers to the upper body that the torso-rotation smart bone turned on and off, but this feels like an ugly hack. Is there a better way to solve this problem? Slightly offset the parts in the Z axis and turn on "sort by depth"? Something involving sub-groups of layers? Upgrade to Moho 13 (I'm on 12.5 right now) and let the Virtruvian Bones solve this automagically?

...actually if it wasn't time to go home and have some dinner I'd have a shot at the "sort by depth" solution, now that I have thought of it, but instead I'll see what the experts here have to say while I'm on the road :)
old lady who might finally be recovering from having worked at Spumco at the turn of the century
User avatar
Greenlaw
Posts: 9368
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer order conflicts in multiple smart bones.

Post by Greenlaw »

Don't bother using a Smart Bone to animate layer order unless you don't intend to add/remove or manually change layers outside of what the Smart Bone does. In general, I avoid this approach because it can limit animation possibilities for the rig.

If you're going to use Animated Layer order, it works best when you manually drag the layers on the Mainline.

If you really need to use Smart Bones to control layer 'order', it's better use the smart bones to control layer visibility instead--this method offers more flexibility and with the same functional and visual result. To do this, make a Reference or Duplicate layer and position it where you want it to appear, and then use the Smart Bones to toggle the visibility between these layers. This method also also allows you insert or delete layers without disrupting the 'layer order' animation.

I like to use this method to make the arms 'wrap' around the torso, or to switch left/right forearms in front of each other.

But wait, there's more: when I really need to, I can still add manual Animated Layer Order keyframes on top of the Smart Bone keyframes. This can make sense if I rarely need to switch between three or more positions. If I need to animate between more positions routinely, then I'll just expand the number of visibility layers controlled by the Smart Bone.

Doing it this way opens more layer order possibilities, it's fairly easy to setup and animate, and it's less likely to break or introduce conflicts during animation.

Hope this helps.
User avatar
egypturnash
Posts: 18
Joined: Thu Jun 08, 2023 6:42 am
Location: New Orleans
Contact:

Re: Layer order conflicts in multiple smart bones.

Post by egypturnash »

Thanks! "less likely to break or introduce conflicts during animation" is definitely a point in favor of reference layers.

I do find myself wondering how you cope with all the extra clutter those reference layers create in the Layers window, I guess just throw them into a subfolder or two called something like "overlap" and forget about them? I'm still trying to figure out what feels like a good character layer structure for me and I probably won't get there until I have taken a couple more characters from sketch to animation, and asked a bunch more beginner questions along the way. :)

(thinking about things I need to investigate: hiding extra fiddly bones in sub-layers? ways to quickly clone the bone/point manipulation done to turn a mostly-symmetrical character to the l/r into the opposite smart bone action and flip all the bone references to the other side? that sure sounds like a script someone has to have written by now, and/or like something there's probably an essay about lurking in this forum if i can find the right search keywords.)
old lady who might finally be recovering from having worked at Spumco at the turn of the century
User avatar
Greenlaw
Posts: 9368
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer order conflicts in multiple smart bones.

Post by Greenlaw »

Hi egypturnash,
egypturnash wrote: Mon Jul 03, 2023 5:37 pm ...I do find myself wondering how you cope with all the extra clutter those reference layers create in the Layers window, I guess just throw them into a subfolder or two...
Yes, I make a lot of sub-groups.

I've built Moho puppets that literally have hundreds of layers and actions, and organizing the data in a sensible grouping structure means I can hide a lot of clutter. This helps keep a complicated puppet very manageable. Many of the Boss Baby puppets I made for the first series were set up that way. Keeping the setups clear and easy to follow was especially important because many of my puppets were handed off to other animators to work with. But even when I'm working solo, I can't possibly remember where everything goes or exactly how it works, so creating a clear structure benefits me too.

When selecting sub-layers, I don't bother searching or drilling down groups and layers. I just Alt+R Click on the art in the workspace to select the layer, or Shift+Alt+ R click to select it's parent group. The only place where this doesn't work is for Switch Layers that contain nested groups--in this case, Shift+Alt R Click will always select the sub-group and not the Switch layer. (Argh!) Hopefully, this limitation will get addressed in a future release.

Here's a tip I suggested in another thread yesterday and I'll repeat it here: it helps to keep all your bones in a single layer. This way, all or nearly all of your animation keyframes will appear in a single layer, making it easier and faster to animate with. I try to do all of my animation using bones and Smart Bones in a single layer as much as possible.

Sometimes I'll animate points directly (usually with the Magnet tool, which keyframes in a different layer but this is easy to manage when using the Alt+R Click technique to select the layer, and also use Timeline Visible channel to display the bones and animated vector layer channels at the time if I need to edit them both together. (Note: Layer Shortcuts and Layer Selection Buttons are two handy scripts that can help with direct layer selection, including Switch Layers. They each have some workflow limitations though, which I describe elsewhere.)

Hope this helps. 😸
Last edited by Greenlaw on Mon Jul 03, 2023 7:55 pm, edited 5 times in total.
User avatar
Greenlaw
Posts: 9368
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer order conflicts in multiple smart bones.

Post by Greenlaw »

Oh, one more tip:

When working with References (as opposed to Duplicates,) I like to indicate which layers are References by adding REF in front of its layer name. This alerts me to be careful about editing this layer, which I usually don't want to because its animation is usually (but not always) dependent on the original layer's keyframes. Color coding Reference layers a bright color helps too.

Alternatively, I'll use Synthsin75's Lock Layers script to lock the Reference layers so I can't accidentally edit it.
User avatar
egypturnash
Posts: 18
Joined: Thu Jun 08, 2023 6:42 am
Location: New Orleans
Contact:

Re: Layer order conflicts in multiple smart bones.

Post by egypturnash »

Greenlaw wrote: Mon Jul 03, 2023 7:37 pm I've built Moho puppets that literally have hundreds of layers and actions
Yipes! I hope those were mostly built up over the course of a production, as tweaks made to fix something that looked weird in one shot, and additions made to support other shots, piled up.

That list of approaches and tool choices is definitely going to be helpful when I have a chance to get back to Moho, thanks a ton for that. And for all the other posts you've made around here over the years, there's been a several other questions I haven't asked because a little searching turned up you answering the heck out of someone with the same problem. :)
old lady who might finally be recovering from having worked at Spumco at the turn of the century
User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: Layer order conflicts in multiple smart bones.

Post by Lukas »

If you really need multiple smartbones for layer order, you could give this technique a shot: https://www.lostmarble.com/forum/viewto ... 24#p190323
User avatar
egypturnash
Posts: 18
Joined: Thu Jun 08, 2023 6:42 am
Location: New Orleans
Contact:

Re: Layer order conflicts in multiple smart bones.

Post by egypturnash »

Oh that's interesting Lukas, I will have to look at that when I get a chance to spend a few days with Moho again! Which has still not happened quite yet, that's my reward for finally getting my @#$% Mastodon instance updated and back online.
old lady who might finally be recovering from having worked at Spumco at the turn of the century
Post Reply