Layer bind a switch layer to a bone outside it's folder

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Marbelous
Posts: 25
Joined: Mon Aug 13, 2018 4:52 pm

Layer bind a switch layer to a bone outside it's folder

Post by Marbelous »

Hello,

I'm currently looking for the "layer bind button" but it's not there, probably because my set up is wrong?!

WHAT I HAVE:
--FOLDER-"Character"
----FOLDER-"front turn"
----SWITCH-"body"
--------BONERIG-"front"
--------BONERIG-"side"

I actually want to layer bind the "FOLDER-head turn" to the headbone of the body, but the bodies exist multiple times because I want to switch different bodies.
Is this possible?
I have the head seperately because I thought it's easier so I create the head turn ONCE and then just switch the bodies.
(OR can I easily copy a head turn to the bodies? I think it will break??)
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by synthsin75 »

The easiest way would probably be to reference the head group for each BONERIG. You would want to put the original somewhere convenient to animate (like off to the side of the character) and set it to not render. This would save you from having to match up head animation every time you switch body angle.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by Greenlaw »

The issue is that you can only bind a layer to a bone if it's under a bone layer. It appears you have all your bone layers on the same level as "front turn" (which I assume is the 'head' layer?) so it cannot be bound using the Layer Binding method. (Unless you make another bone layer above it of course, but you don't want to do that here.)

I see you want to use multiple versions of rigs for a single character. This is a valid approach and I'll sometimes take it myself when I have a lot of characters to create in a very short time. The advantage with multiple rigs is that each rig can be much simpler than a single 'all-in-one' rig because in this case I'm not so concerned about turning the character from view-to-view smoothly. (There are tricks you can do with this type of rig to make the turns look smoother but that's a topic for another thread.) The downside to this approach is that you will probably end up with a lot more groups and layers (and many duplicates) to manage, which can potentially make it more tedious to edit/animate later in the process. (For example, you will need to manually match poses every time you switch views.)

Anyway, to get to the point, you'll want to put the head group inside a body group, and create a reference copy of that head group inside each of the other body rig groups. This way, if you need to edit head artwork, you only need to edit the original layers and the references will update automatically. Now each head group can use Layer Bind to the head bone, if that's what you want to do.

Just be aware that when you use Layer Bind with a group, that will prevent you from using bones from the main body rig with any individual layers inside that group. When I want to use bones for items inside the head group (like for the eyes and other elements,) I won't use Layer Bind for the Head group, instead, I'll bind the contents individually as needed. For example, Layer Bind the Mouth group and eyes groups to a shared Face bone, which is then parented to the head bone, with no binding for the head group layer itself. To move the face, you can then just move the face bone.

Hope this helps.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by Greenlaw »

Kind of a side note for later: Some artists will create a separate bone layer for the face and nest that under the main body rig. I personally don't like doing this because I feel nested rigs are a pain to animate with, but it might be an option to consider if you really want to layer bind the head group.
User avatar
slowtiger
Posts: 6067
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by slowtiger »

Greenlaw wrote:Some artists will create a separate bone layer for the face and nest that under the main body rig. I personally don't like doing this because I feel nested rigs are a pain to animate with
I prefer it this way for longer commercial work, and found it being done in all series I worked with. It makes it so much easier to separate general body movement, especially walking, from dialogue and expressions. Easier to animate and adjust.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by Greenlaw »

Yes, I can see that.

I just prefer to keep all the key frames on one bone layer when possible. It's just faster for me to work this way. Of course, keeping everything on a single layer is not as important nowadays since we got the ability to display key frames for multiple layers simultaneously.
User avatar
hayasidist
Posts: 3493
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Layer bind a switch layer to a bone outside it's folder

Post by hayasidist »

Greenlaw wrote:.. keeping everything on a single layer is not as important nowadays since we got the ability to display key frames for multiple layers simultaneously.
indeed - that plus just clicking the layer name in the timeline window to activate the target layer makes it, for me at least, a better option than trying to load all the bones, including switch variants, into one layer. If I had a wish on that topic it'd be to have a way to have only the active child automagically set itself to "show in timeline" with the others not -- actually now I've said that out loud that's probably a not-too-hard layerscript ...
Marbelous
Posts: 25
Joined: Mon Aug 13, 2018 4:52 pm

Re: Layer bind a switch layer to a bone outside it's folder

Post by Marbelous »

Hello, thank you very much for all the replies.

I realised I named the head folder wrong in my first post, it is:
--FOLDER-"Character"
----FOLDER-"head turn"
----SWITCH-"body"
--------BONERIG-"front"
--------BONERIG-"side"

I will try to create that recommended set up.
But is there also somewhere a tutorial on this? Or can you please write the layer order, like I did above?
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by Greenlaw »

I think what you have should except for the head group. You just need to move the head group inside one of the body groups (front view suggested) and make copies or references of that head group for the other body groups. The head group should then be bound to the head bone of each rig.

The catch with using references of a Switch layer for the head, as in this example, is that, so long as you animate the original they will all stay in sync, but once you animate a reference directly you break the sync. There are a few sane ways to deal with this: use Timeline Visibility to keep the original on the timeline, use an SB Action at the top-most group so you can have global control, or just use duplicates for the Switch instead references so you can have independent timelines for each one (the contents of the switch can still be reference layers.)

A while back, I had to make a bunch of rigs using a similar setup for the opening of a TV show. Other artists on our team animated the rigs and I think it worked fine for them. (I didn't get any complaints anyway. :D ) I don't recall exactly how I handled the head switching but, if I have time today, I'll dig those up and let you know it was set up.
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by synthsin75 »

Marbelous wrote:Hello, thank you very much for all the replies.

I realised I named the head folder wrong in my first post, it is:
--FOLDER-"Character"
----FOLDER-"head turn"
----SWITCH-"body"
--------BONERIG-"front"
--------BONERIG-"side"

I will try to create that recommended set up.
But is there also somewhere a tutorial on this? Or can you please write the layer order, like I did above?
I would suggest:
--FOLDER-"Character"
----FOLDER-"head turn" (original, animate this one)
----SWITCH-"body"
--------BONERIG-"front"
-------------FOLDER-"head turn" (reference)
--------BONERIG-"side"
-------------FOLDER-"head turn" (reference)

This way you don't have to dig into one switch group to animate the heads of the others, and the heads stay in sync when switching body angles.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by Greenlaw »

I checked those old rigs I described and I was wrong, I didn't rig the final characters with multiple bodies at all. I had started that way at an earlier stage thinking it would be faster to draw and rig, but then I abandoned it for the usual 'all-in-one' rig approach--probably because I thought the 'multi-rig' rig was a PIA to animate with. (This is why the other animators here didn't complain; they never saw that version.) :)

Anyway, there's nothing wrong with rigging a character this way...it's essentially how Character Wizard does its rigs. But I don't really recommend this approach except for really simple 'turnaround' rigs that you can't spend a lot of time setting up SB Actions for. (This should really be determined by the designs and style of animation your going for--use whatever is easier and works for your production.)

@Wes, smart trick having a 'controller-only' head on top.
User avatar
hayasidist
Posts: 3493
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Layer bind a switch layer to a bone outside it's folder

Post by hayasidist »

hayasidist wrote:
Greenlaw wrote:.. keeping everything on a single layer is not as important nowadays since we got the ability to display key frames for multiple layers simultaneously.
indeed - that plus just clicking the layer name in the timeline window to activate the target layer makes it, for me at least, a better option than trying to load all the bones, including switch variants, into one layer. If I had a wish on that topic it'd be to have a way to have only the active child automagically set itself to "show in timeline" with the others not -- actually now I've said that out loud that's probably a not-too-hard layerscript ...
yeah - was pretty easy … just in case any one else wants it:

Code: Select all

function LayerScript(moho)
	local layer = moho.layer
	layer = moho:LayerAsSwitch(layer)
	if not layer then
		return false
	end
	local show = layer:IsAncestorSelected() or layer:SecondarySelection()
	local active
	if show then 
		active = layer:GetValue(moho.frame)
	else
		active = -1
	end
	if active == HS_TimelineVis then
		return true
	end
	local j = 0
	local c = layer:CountLayers()
	for j = 0, c-1 do
		layer:Layer(j):SetShownOnTimeline(show and active == layer:Layer(j):Name())
	end
	moho:UpdateUI()
	HS_TimelineVis = layer:GetValue(moho.frame)
end
to use: copy the above and make a .lua file; then make that file the embedded script for any switch layer where you want to see the active child in the timeline if that switch layer or its ancestor is selected. (the bit to do with the global HS_TimelineVis is to cut down on rebuilding the UI too often)
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by Greenlaw »

Thanks for sharing that. I'll try to check it out this week.

I often use Timeline Visibility just so I can use the layer name in the timeline as a clickable button to select a nested layer (like a Switch Layer). That can lead to a lot of timeline clutter though.

I wish there was a list panel where we can store the names of layers we may want to select. I know we can sort of do that with the current Layers window with filters but I want this to be separate from the Layers windows.

Or, alternatively, it might be cool to be able to draw clickable buttons in the workspace that target other layers for selection. I know we can select layers by Alt-clicking and parent groups by Shift-Alt-clicking but that doesn't work for Switch layers that contain artwork inside Groups inside a Switch layer, which is how I usually have Switch layers set up.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Layer bind a switch layer to a bone outside it's folder

Post by Greenlaw »

For that matter, I'd like to be able to draw clickable buttons to do any number of binary things. Currently, I use Smart Bones for that but a clickable button might make better GUI sense.

(Just thinking out loud again.)
User avatar
hayasidist
Posts: 3493
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Layer bind a switch layer to a bone outside it's folder

Post by hayasidist »

Greenlaw wrote:I wish there was a list panel where we can store the names of layers we may want to select. I know we can sort of do that with the current Layers window with filters but I want this to be separate from the Layers windows.


does the Layer Selector tool (actually called LM_Shape_Picker) help at all here? The one where you click on an item and you get the relevant layer selected.. adapt that to be a toggle to make the layer show up in / disappear from the timeline window rather than actually selecting the layer? That would be trivial!
Post Reply