Make arm appear in front of hair?

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
PillarAngel
Posts: 8
Joined: Sun Jul 23, 2017 4:27 am

Make arm appear in front of hair?

Post by PillarAngel »

Hello!

So I got a simple character rigged up, but due to the way the vectors are layered, the "Left Arm" layer of the character is appearing behind the hair. The hair comes in two parts with the "Front Hair" being one of the top most layers.

Here is how its set up along with how the layers are ordered. I assume you can do this with masking, but I've been having difficulties figuring out how exactly masking works, so if you can tell me how to do it, that would be awesome.

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

Re: Make arm appear in front of hair?

Post by slowtiger »

Stuff like this is tackled much easier. Just duplicate one part (in this case, the hair would do), put one version in front and one behind that other object (arm), then switch visibility on/off when needed.
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
PillarAngel
Posts: 8
Joined: Sun Jul 23, 2017 4:27 am

Re: Make arm appear in front of hair?

Post by PillarAngel »

slowtiger wrote:Stuff like this is tackled much easier. Just duplicate one part (in this case, the hair would do), put one version in front and one behind that other object (arm), then switch visibility on/off when needed.
Unfortunately, that wont really work cause the arm is behind the body, which also makes it behind the head. If I put the duplicate behind the arm, it would make it behind the head. I need the hair to be in front of the head. A similar issue would arise if I duplicated the arm instead.
User avatar
dueyftw
Posts: 2174
Joined: Thu Sep 14, 2006 10:32 am
Location: kingston NY
Contact:

Re: Make arm appear in front of hair?

Post by dueyftw »

Use animated layer order linked to a smart bone.

Old video from Vern


Dale
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Make arm appear in front of hair?

Post by Greenlaw »

You can split the arm into two sections, upper and lower using the same full path. Just draw a segment at the elbow to split the path, kill the full arm shape, and then create two shapes from the split path. You can hide the stroke edge inside the elbow using the Hide Edge tool.

Now, make a duplicate or reference, and kill the 'lower' arm shape in one copy and the 'upper' arm shape in the other. Now, if you enable Animated Shape Order for the group containing the layers, you can move either shape above or below the head and torso as necessary, and the arm will appear continuous, even when it 'wraps' around the body. This works seamlessly since the two sections share the same 'full arm' path.

At work, I use a more advanced variation of this trick. I like to make a group containing a copy of the upper and lower arm layers, and duplicate the group so I have a 'Near' set (in front of head) and 'Far' set (behind body). Then I create a Smart Bone action that hides and reveals different layers for every combination. It's not bad as there are only four possibilities: UpFar/LoFar, UpFar/LoNear, UpNear/LoNear, UpNear/LoFar.

BTW, for the near set, even with the SBD, I still rely on manual animated layer order to move the 'near' arm from under the head to in front of the head. This extra step could technically be built into the Action but, IMO, it also complicates the rig for future editing and isn't worth the trouble. But I'll leave that up to you.

Another variation: I used to apply an animated stroke mask to smoothly hide and reveal the near/far arm sections along the entire length of the arm. That was pretty cool for the project I was working on at the time, but it is overkill in most situations.

If all this sounds too complicated, don't worry about it. Manually moving the arm segments using Animated Layer Order as described in the first two paragraphs is easier to understand for beginner users and, TBH, it generally produces the same result.

Hope this helps.

Note: in some cases, you might see a thin gap at the elbow, especially if you use the more complicated setup I described. You can solve this easily by adding another point in the 'splitter' path at the elbow and dragging the point to overlap the gap.

Note 2: The segmented shape method could get tricky with texture map fills because Image Texture can change position based on the shape size, and it may not line up between the Up/Lo sections. This was where the stroke mask technique I mentioned worked well because I could use a single shape for the full length of the arm, and use the stroke mask to hide and reveal the sections. However, a good workaround is to use the arm segment shapes as masks to mask a single image layer covering the full length of the arm. Or, if you use a custom mesh, you can just change the shading properties of the polygons to show or hide the texture in different regions of the arms.

This last note is probably way more info than you need right now (okay, it's possible that everything past the 2nd paragraph is) but I just wanted to show there are many ways to approach this problem, and some methods are better than others depending on the design of your character, image type (vector vs. bitmap, or hybrid,) and animation styles.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Make arm appear in front of hair?

Post by Greenlaw »

Quick note about using Animated Layer Order in an SBD: I generally avoid doing this because it can prevent you from using manual Animated Layer Order in the Mainline which, IMO, is way too useful an animation technique to give up for the sake of 'automation'. It's okay to use this method but just be aware of the pitfalls you may encounter down the line.
User avatar
hayasidist
Posts: 3492
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Make arm appear in front of hair?

Post by hayasidist »

a masking solution to this:

new group where "front hair" vector is -- Masking: Hide all
> copy by reference left arm: mask this layer -- Allow animated layer effects
> front hair: add to mask

to have the arm in front of the hair: make the left arm copy layer visible
to have the arm behind the hair: make it invisible
User avatar
neeters_guy
Posts: 1614
Joined: Mon Sep 14, 2009 7:33 pm
Contact:

Re: Make arm appear in front of hair?

Post by neeters_guy »

Greenlaw wrote:...
At work, I use a more advanced variation of this trick. I like to make a group containing a copy of the upper and lower arm layers, and duplicate the group so I have a 'Near' set (in front of head) and 'Far' set (behind body). Then I create a Smart Bone action that hides and reveals different layers for every combination. It's not bad as there are only four possibilities: UpFar/LoFar, UpFar/LoNear, UpNear/LoNear, UpNear/LoFar.
.

This is hard to visualize, so I made up a graphic to get it straight in my mind.
Image
Thanks for sharing this clever idea.
PillarAngel
Posts: 8
Joined: Sun Jul 23, 2017 4:27 am

Re: Make arm appear in front of hair?

Post by PillarAngel »

Sorry for the late reply, but thank you all for the suggestions! Also sorry for this being a trivial problem, still learning this program and solutions to seemingly simple problems. :D
User avatar
dueyftw
Posts: 2174
Joined: Thu Sep 14, 2006 10:32 am
Location: kingston NY
Contact:

Re: Make arm appear in front of hair?

Post by dueyftw »

PillarAngel wrote:Sorry for the late reply, but thank you all for the suggestions! Also sorry for this being a trivial problem, still learning this program and solutions to seemingly simple problems. :D
No problem, I learn some things that I didn't think of.

Dale
Post Reply