Mask behaving like a patch?

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
TheMinahBird
Posts: 263
Joined: Sat Jul 27, 2013 11:10 pm

Mask behaving like a patch?

Post by TheMinahBird »

https://www.youtube.com/watch?v=icEbGDDxiwE

Sigh every time I get into the groove of animating stuff like this happens. :?

Excluding strokes is just not working.. well it is but not for overlapping strokes?
"Now hatred is by far the longest pleasure; men love in haste but they detest at leisure" - Lord Byron
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Mask behaving like a patch?

Post by synthsin75 »

Video is unavailable.
User avatar
TheMinahBird
Posts: 263
Joined: Sat Jul 27, 2013 11:10 pm

Re: Mask behaving like a patch?

Post by TheMinahBird »

Sorry! It’s been fixed thanks for letting me know!
"Now hatred is by far the longest pleasure; men love in haste but they detest at leisure" - Lord Byron
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Mask behaving like a patch?

Post by synthsin75 »

I can see why that would be confusing. Here's what's happening there.

The bottom layer (add to mask, exclude stroke) is adding the part of the above layer that overlaps it to the mask. That overlap is now "added to the mask" as is, because only layers that add to the mask can exclude strokes. Now when the layer above it adds to the mask, it's only adding what isn't already part of the mask. So it's non-overlapping part shows the excluded stroke. This looks fine by itself, because the stroke you expect to be excluded for the second layer is actually added by the bottom layer.

Now when both these mask the layer above them, that overlap is still just added by the bottom layer, instead of adding (with excluded stroke) by the second layer. If that doesn't make any sense, just try this masking setup:

- group (hide all)
- - layer 1 (mask this layer)
- - layer 2 (clear the mask, then add this layer to it, exclude strokes)
- - duplicate or reference of layer 1 (mask this layer)
- - layer 3 (add to mask, exclude strokes)


"Clear the mask" makes sure the bottom add to mask does not affect the upper add to mask. But because this operation cuts off the bottom layer from affecting the top layer, we need to give the bottom layer its own layer to mask.
User avatar
TheMinahBird
Posts: 263
Joined: Sat Jul 27, 2013 11:10 pm

Re: Mask behaving like a patch?

Post by TheMinahBird »

Ahh! Okay thanks so much it works!
"Now hatred is by far the longest pleasure; men love in haste but they detest at leisure" - Lord Byron
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Is that what the Patch layer is doing 'under the hood'?

I've always wondered if it was possible to replicate the Patch layer effect with masking because in the past I'd been stumped by the layer targeting limitations with Patch layer. I never got around to trying anything but now I want to take a closer look at the above setup and see if it addresses some of those roadblocks I ran into.

Thanks to both of you for this interesting thread.
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Mask behaving like a patch?

Post by synthsin75 »

Yeah, as far as I know, patch layers just use vanilla masking operations under the hood.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Here's an example of one of the Patch Layer limitations I'm talking about:

Image

One of the 'features' of Patch layer that I liked is how I can have that neat 'overlap' line as seen inside the elbow. The problem occurs when I want to switch the 'perspective angle' of the overlap, i.e, making the arm look like it's pointing toward the camera instead of away from it. I can't just swap layer positions of the two arm layers because the Patch layer's target layer can't be animated to point to the new 'bottom' arm layer.

Hmm, I think I just thought of a way to make this work with Patch layers...but even so, I still might have more flexibility with using regular layers and masks instead.

This thread has given me to some new ideas to think about, so thanks! :)
Last edited by Greenlaw on Mon Aug 27, 2018 8:23 pm, edited 2 times in total.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Another limitation is that the Patch layer doesn't play well with groups.

(Weirdly, I just now got it to work with groups but then it broke. To do this, I started with regular layers, applied a Patch layer, and then moved those layers to groups. This worked until I messed with it. Anyway, I don't think this is was supposed to work at all because, technically, a Patch layer can't target a group layer. I'm guessing this setup will also break if I close and re-open the project file.)

I think I can overcome that grouping limitation with regular layers and masks.

BTW, the trick I thought of earlier with that Patch layer and switching the 'perspective direction' of the overlap line is to use two Patch layers, each one pointing to a different arm segment layer, and then keyframe off the visibility of one of the patches. Then, when the layer order of the arm segments is switched, you can switch the visibility of the Patch layers. I just tried this and it works fine.

Example setup:

Image

I think I can do the same thing with groups if I use regular layers and masking for the 'Patch' effect. The trick is to make a copy of upper group that has the same Mask setting as the lower group (because mask settings are not keyframeable,) and switch the visibility of the groups as needed.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

um...except I don't think Groups have Exclude Strokes as an option. Rats.

Will have to play with this when I have more time. There's gotta be a solution for this.

Edit: Yeah, it took me just a second to set this up, and without this option for groups here's the result:

Image

I'm still going to play with this when I have time but this doesn't look promising. I guess I need to find a way to replicate Exclude Strokes but for Groups.

Edit: I'm actually more interested in making this 'patch' trick work for shoulders, which usually involves two arm groups and a torso group. I can sometimes fake this effect in the shoulder with a simple overlaid shape but I think a patch might work better...if it worked. :)
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Mask behaving like a patch?

Post by synthsin75 »

Easy masking solution for single layers: http://www.filedropper.com/maskingexample

For groups, you may need to reference the vector layers, place them outside of the groups (all direct siblings) with fills disabled, and just mask the strokes.
http://www.filedropper.com/groupmaskingexample_1
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Oh, yeah, that's right! I actually used a referenced 'stroke layer' as an overlay before, not for groups but for faking Exclude Strokes in a different situation where Exclude Strokes didn't work the way I needed. Thanks for the reminder, Wes. That should do the trick here too.

I'll check out the files tonight. I'm sure there's more I can learn from your examples. :)
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Mask behaving like a patch?

Post by synthsin75 »

They're very basic examples. You sound like you have the gist, Dennis.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Hi Wes,

I'm finally getting back to looking into the manually constructed patch technique, and I'm having trouble with using a group as the bottom part of the setup. (For ecample, a 'foot' switch layer beneath a leg layer, and I want to use a 'patchoid' at the ankle joint.)

Could you check your links above? I'm not able to download either of them--the links take me to the File Dropper home page. I wanted to take a look at the second file in particlar, but will probably want to look at both to satisfy my curiosity. Thanks. :)

If my above example is unclear, I'll whip up an example file and post it.
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Mask behaving like a patch?

Post by synthsin75 »

Greenlaw wrote:Hi Wes,

I'm finally getting back to looking into the manually constructed patch technique, and I'm having trouble with using a group as the bottom part of the setup. (For ecample, a 'foot' switch layer beneath a leg layer, and I want to use a 'patchoid' at the ankle joint.)

Could you check your links above? I'm not able to download either of them--the links take me to the File Dropper home page. I wanted to take a look at the second file in particlar, but will probably want to look at both to satisfy my curiosity. Thanks. :)

If my above example is unclear, I'll whip up an example file and post it.
Sorry, Dennis, but I didn't keep those files and the links have probably expired from lack of use.

An example file would probably serve both purposes...to illustrate the other files and try to solve your particular situation. But if I have time, I'll see if I can recreate those examples.
Post Reply