Bone dynamics across layers

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
slowtiger
Posts: 6255
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

You made one common mistake: bone binding only works between a bone layer and any layer which is directly inside it - but not between a bone layer and a layer which is in another layer within a bone layer. In your case you could bind the switch layer to one bone, but you cannot bind any of the different switches inside the switch layer to any bone.

A more common setup would be to build a body layer inside the bone layer, and only put the different mouth shapes inside the switch layer.

The movement of the head for different phonemes is quite uncommon, as all speaking normally is done with the lower jaw. It even might lead to a confusing effect when animated. But if you want to do that it would be a better solution to just make the top part of the head a separate shape (with 4 spikes) completely with the mouth, and duplicate this for each phoneme. To get the impression of one continuous outline you need to adjust things carefully.
sproutling
Posts: 12
Joined: Tue Aug 12, 2008 2:06 pm
Contact:

Post by sproutling »

I'm quite keen to get a seamless, stretchy line from body to head and found detaching the head did not achieve the desired effect.

I realize that bone binding does not normally work within switch layers but it was my understanding that the method described above in this thread provided a workaround for this. Namely, that the bone layer controls the master body shapes directly beneath it in the hierarchy (these don't get rendered), which in turn, thanks to the mesh instance script, control the duplicated layers placed inside the switch layer.

Am I understanding this wrong? It's making my head hurt :)
User avatar
slowtiger
Posts: 6255
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

It is maybe just a personal preference of mine, but I use simple methods as long as possible instead of relying on scripts I don't really understand. I suggest you give it a try - many small glitches are not visible in the final render.
User avatar
synthsin75
Posts: 10276
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

First, you need to right-click the switch layer and select a switch to 'show' before you'll see the instanced layers working with you bone motion. But you can simplify this quite a bit.

If you plan on using a Papagayo dat file for the lip-sync, it won't work. The '.dup' names won't be recognized unless you customize the phoneme names in Papagayo. So far no one's modified meshinstance to allow for no extensions on the names.

But never fear. It looks like you'd be better off just putting your skeleton in the switch layer ( you can add bones to a switch layer just like you can a bone layer). If you do all of your point binding before duplicating, all you have to do is form your phonemes and you're ready to go.

I'm a big fan of meshinstance, but in this case I'd have to agree with Slowtiger. This can be done easier without it.
sproutling
Posts: 12
Joined: Tue Aug 12, 2008 2:06 pm
Contact:

Post by sproutling »

Thanks synthsin, I'll try it. I'm not too bothered about Papagayo as I find manual lipsync gives better results, and I can always edit the dat file to add the .dup extension in a pinch.

I'm not sure I understand your suggestion about putting the skeleton in the switch layer. Would I not need a skeleton for each phoneme? This would make it pretty complex; the beauty of this method to me is the ability to control all the movement with one bone layer, regardless of which phoneme is selected, which makes retiming etc. much simpler.
User avatar
slowtiger
Posts: 6255
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Ah, I forgot about that, synthsin is right: a switch layer works just as a bone layer!

So that's what I tested here: created a single shape with mouth and tentacles, put it into a switch layer, created bones in the switch layer and attached the shape to it (partly flexible, partly bone binding), duplicated the vector layer and changed the mouths in each. Animation was done with switch keys, some tentacle waving bones, and a bone scaling for the beat.

Movie: http://www.slowtiger.de/examples/mollusk.html

File: http://www.slowtiger.de/examples/mollusk.anme.zip
sproutling
Posts: 12
Joined: Tue Aug 12, 2008 2:06 pm
Contact:

Post by sproutling »

Ah, fantastic!
This will work well and is indeed much simpler.
Many thanks to both of you for your help!
sproutling
Posts: 12
Joined: Tue Aug 12, 2008 2:06 pm
Contact:

Post by sproutling »

I think I might have spoken too fast... Having the skeleton on the switch layer works very well for the body but it becomes a problem when I start to attach other elements that also require switch layers (like arms with different hand shapes for instance).
Is there any other way to get around this?
User avatar
slowtiger
Posts: 6255
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

Welcome to the wonderful world of Complex Character Rigging.

It is quite rare that I use just one bone layer or one switch layer for a (human) character. A typical setup I use would be:

general character bone layer
- torso vector
- head switch layer
- - frontal head view switch layer
- - - mouth #1
- - - mouth #2
- - side head view switch layer
- - - mouth #1
- - - mouth #2
- right arm bone layer
- - arm vector layer
- left arm bone layer
- - arm vector layer
- leg bone layer
- - right leg vector layer
- - left leg vector layer

This is by no means complete, but you'll get the general idea. It can get even more elaborated, or simplified, depending on the character design and which movements are required. For a TV series I had characters with 5 general body views, each with 4 different head views, several different arms and so on ... I never really counted the layers, but each character had more than 200. This happens when you try to create an all-purpose character, it blows up file size and sometimes made animation very labourous, since I had to select layers quite often. OTOH I was quite flexible in my movements.

A general rule would be: do a different bone layer for anything you want to control on a separate timeline. Two legs in one bone layer usually works quite well. Arms I like to have in separate bone layers because acting gets easier that way. Having it separately means I can have different cycles and different timings. Example: I could have a walk cycle in the leg bone layer, while my character waves and gesticulates with the arms, points with one arm while the other is in a cycle, and so on.

For your dinosaur a layer stack like this might work:
general character bone layer
- legs vector
- tail vector
- torso vector
- head switch layer
- - mouth #1
- - mouth #2
- right arm bone layer
- - arm vector layer
- - hand switch layer
- - - hand #1
- - - hand #2
- left arm bone layer
- - arm vector layer
- - hand switch layer
- - - hand #1
- - - hand #2

You will need a "shoulder bone" to attach the arms to, and a "neck bone" for the head switch layer.
sproutling
Posts: 12
Joined: Tue Aug 12, 2008 2:06 pm
Contact:

Post by sproutling »

Thanks slowtiger, that's very interesting.
I would love to see a centralized resource that outlines archetypal ways of rigging, depending on the overall design and desired effect, with pros and cons for each.

For the moment I have gone back to the meshinstance method, as I want to keep the control mechanism as simple as possible. The animation is very stylized anyway, so I think (hope!) this will be the right compromise between control and ease of use.

The apparent problem I had was fixed by ensuring that ALL the points in the master layers were bound to their respective bones, and that these bones in turn had their strength set to 0 so as not to interfere (I'm assuming) with the script.

Thanks all again for taking the time to reply, I hope this helps someone else!
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I like to think of having things like hands and heads in their own bone layer this way... When you animate it is easy to break it up into sections. You do the broad body motion in one or more passes. Then you go back and focus on facial animation, then if you have hands to be in different positions you do that as a separate "pass".

I just finished a project where I HAD to work that way. I was using layer ordering extensively and it was slowing me down trying to animate the layer order at the same time as doing all the body motions (arms and legs passing in front and behind the body). So I stopped animating layer order completely. I did all the IMPORTANT animation then went back and animated the layer order. This worked great because I didn't have to hunt around looking for the keys if I made changes to the main body motion.

So having hands and heads on different bone layers makes sense if you think about it that way.

I would never put the hands and the arm in one switch layer if it can be avoided. I like to keep all the main skeletal elements in the main bone layer and then the "detail" stuff (hands, fingers, face) in a sub bone layer. The hands can still be rotated, "broad stroke" in the main bone layer, but then if you want to change the hand positions with switches that can be done separately.

-vern
sproutling
Posts: 12
Joined: Tue Aug 12, 2008 2:06 pm
Contact:

Post by sproutling »

Just wanted to follow up on the topic to show the results of the rigs I used...
You can watch the clip here:

http://www.4mations.tv/clip.aspx?key=C936029765F90190

The characters don't have a huge range of motion, but it was extremely easy, fast (and fun!) to animate, which suited the job perfectly.
I'll probably have another look at the rigs soon to see where I can make improvements now that I've gone through a whole episode... let me know what you think!
Post Reply