Page 1 of 1

animating layers problem

Posted: Mon Sep 26, 2016 1:29 pm
by nils
Hi,

I have a issue with animating layers; i made a bodyturn action (the body turns from frontview to leftsideview with a smart dial bone)
Halfway this turn i moved/animated the armlayer below the bodylayer to move it out of sight. So far so good. The thing here is, is that now in frontview i can't do any layer animation in the main-timeline anymore. For instance when i want the character to reach for its wallet in his back pocket i have to move (and so animate the arm below the bodylayer) but it can't be done because in the bodyturn action the armlayer is above the bodylayer in frontview. Is there a way to have both layer animations in actions and in the maintimeline?
:D :?:
Any help is welcome,

regards,
Nils

Re: animating layers problem

Posted: Tue Sep 27, 2016 7:15 pm
by neeters_guy
There is a conflict when layer ordering is keyed in both the smart bone action and the main timeline action. I think this is because layer ordering is stepped, that is to say, they aren't additive like point or bone motions. You can work around this by isolating layer ordering within a group, upper body and lower body for example, but I admit this isn't workable in all cases. For me, I typically do not layer order in smart bone actions at all and do it in the main timeline only.

Re: animating layers problem

Posted: Tue Sep 27, 2016 10:04 pm
by Greenlaw
I agree with neeters_guy totally on this subject. You should only consider keyframing layer order if you don't intend to do any layer order changes on the Mainline...you'll probably regret that though once you start animating.

Manually animating layer order gives you a lot more flexibility for timing and stacking choices. It's also so easy, it's just not a big deal in Moho. Most other animation and compositing programs won't allow you to keyframe layer orders at all.

Re: animating layers problem

Posted: Wed Sep 28, 2016 10:37 am
by nils
Thanks for your reply's,

A lot of examples in tutorials about bodyturn actions use layer animation within the bodyturn action,
you can also see it in the free library rigs that come with animestudio like the lovely 'Scarlett rigs' character.
I'm curious though how you guys animate repeated bodyturns in the maintimeline; there must be a lot of copiing and pasting going on i presume!

anyway thanks for the help!

regards,

Nils

Re: animating layers problem

Posted: Wed Sep 28, 2016 3:27 pm
by neeters_guy
I was playing around with Scarlett rig (and I agree, it's lovely rig :) ) and I noticed that you can layer sort on the mainline when the "Body" smart bone is right, but you can't when it's on the left. So apparently you can override the layer sort on main timeline if the smart bone is in default or unkeyed position.

Just to piggyback on what Greenlaw said, sometimes you need to fine tune the timing of the layer sort to prevent "popping" and doing it manually rather than with smart bone actions gives you the most control.

Re: animating layers problem

Posted: Wed Sep 28, 2016 4:38 pm
by Greenlaw
There are many ways to have a character's 'limbs' and other layers appear to change order without actually changing the layer order. The most direct way is to simply duplicate the layers above and below the torso and control the visibility of the limb. In more complex setups, you can use masks that hide and reveal different regions of the limb, which can make a single piece of art appear to be both in front of and behind another layer--for example, placing the shoulder and upper region of an arm behind the body but the forearm and hand in front of the torso. These tricks can be added to a Smart Bone Actions without conflicting with layer order animation you may need for other things.

My preferred method is to use an animated stroke mask that deforms with the skeleton. I'm currently using the stroke mask method at work for a character that needs to have 720 degrees of motion (360 in either direction.) This works very well for full body turns because it can be controlled smoothly along the length of the limb in either direction. This method can be incorporated within a turning Smart Bone Dial and, since it doesn't use layer order animation, it doesn't conflict with layer order keyframing you may need to use during animation. (Although, for the most flexibility during animation, I prefer to attach this effect to its own SBD so I can animate it independently.)

Note: If you're going to use masks for splitting and wrapping artwork layers, you'll want to use reference layers for the 'near' and 'far' layers, and disable anti-aliasing in these mask layers to prevent a thin matte-line from appearing at the dividing edges of the mask. That was a big problem for us last year until the developers added independent AA as a layer option.

If there's enough interest in these 'wrapping' techniques, I'll see if I can whip together some demonstrations this weekend.

Re: animating layers problem

Posted: Wed Sep 28, 2016 5:28 pm
by neeters_guy
Greenlaw wrote:...use an animated stroke mask...
Well, this sounds intriguing. Whenever you have chance, I'd be curious to hear the details. :shock:

Re: animating layers problem

Posted: Wed Sep 28, 2016 5:34 pm
by synthsin75
Greenlaw wrote:Note: If you're going to use masks for splitting and wrapping artwork layers, you'll want to use reference layers for the 'near' and 'far' layers, and disable anti-aliasing in these mask layers to prevent a thin matte-line from appearing at the dividing edges of the mask. That was a big problem for us last year until the developers added independent AA as a layer option.

If there's enough interest in these 'wrapping' techniques, I'll see if I can whip together some demonstrations this weekend.
I *think* I understand what you're describing, but an example never hurts. By "animated stroke mask" do you mean using stroke exposure to control where the mask cuts between near and far?

Re: animating layers problem

Posted: Wed Sep 28, 2016 11:22 pm
by Greenlaw
Yes, exactly. You set the stroke layer to mask the near arm one way, and invert it for the far arm. Then you link the stroke animation to a SBD so you can slide it completely up and completely down to show different parts of the arm 'behind' (far layer) or 'in front' (near layer) of the torso. It works really well if you need the depth transitions to happen smoothly, especially when the animation has to be slower and not so snappy.

Some tips:

1. Strokes have a width limitation of 256 units, which may not be high enough if you're working with very high res characters. To work around this, scale the Stroke Mask layer up and adjust the width as needed.

2. Since a Stroke can have varying widths, you can use a constant width for the length of the arm and 'inflate' the stroke into a larger circular shape for the hand and maybe the shoulder.

3. Disable AA for the stroke mask layer, otherwise you will get a thin white matte line.

4. Oh, and contrary to what I think I wrote earlier (sorry, too busy to check right now,) you probably don't want to use a Reference Layer for this because I don't think it will let you permanently change the Masking settings (probably because it's not a keyframeable property.) However, if it's a Duplicate you can invert the mask settings just fine.

This trick works well if the character has a fairly 'normal' proportioned arms, but it might not work so well if the proportions are extreme (like super huge biceps and skinny forearm, for example.) In such cases, there are other masking tricks you can apply.

BTW, this works well for legs too but in practice I've found it more practical for arms and I don' t normally bother applying it to the legs. It will probably depend on the character design and what the character is meant to do.

Re: animating layers problem

Posted: Wed Sep 28, 2016 11:46 pm
by synthsin75
Nice technique. Sounds easier to animate with. I'll have to try it out. Thanks Greenlaw.

Re: animating layers problem

Posted: Fri Oct 07, 2016 9:31 am
by neeters_guy
I had to try a quick experiment:



The figure on the right has the masking layers set to "Clear the mask, add this layer to it" in order to see stroke. The default is of course "Clear the mask, add this layer invisibly to it".

The stroke is controlled by smart bones and, in addition, the "near" hands, foot, etc. are references of "far" ones.

I love this idea. Thanks for sharing your expertise, Greenlaw. 8)

Re: animating layers problem

Posted: Tue Oct 24, 2017 7:02 pm
by Barry Baker
Thank you neeters_guy for providing this demo, the technique has really come in useful in my current job! I'm afraid I didn't understand before I saw this.

Re: animating layers problem

Posted: Tue Oct 24, 2017 8:57 pm
by slowtiger
1. Strokes have a width limitation of 256 units, which may not be high enough if you're working with very high res characters. To work around this, scale the Stroke Mask layer up and adjust the width as needed.
Additional tip: do upscaling like this always by numerical input with exact numbers, and write them down! This way you can calculate anything inside more easily, and repeat the result as well.

Re: animating layers problem

Posted: Sun Oct 29, 2017 12:57 pm
by exile
After you solved my elementary problem with layer ordering, I checked this out and saved for future reference. This really expands the possibilities for sophisticated shape ordering, thanks for sharing.

Re: animating layers problem

Posted: Sun May 09, 2021 4:02 pm
by striker2311
neeters_guy wrote: Fri Oct 07, 2016 9:31 am I had to try a quick experiment:



The figure on the right has the masking layers set to "Clear the mask, add this layer to it" in order to see stroke. The default is of course "Clear the mask, add this layer invisibly to it".

The stroke is controlled by smart bones and, in addition, the "near" hands, foot, etc. are references of "far" ones.

I love this idea. Thanks for sharing your expertise, Greenlaw. 8)
I didn't understand.
Arm layer was all the way back of every layer so just how did you use stroke mask to bring it up in front ????

Please tell me