Mask behaving like a patch?

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

Moderators: Víctor Paredes, Belgarath, slowtiger

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

Re: Mask behaving like a patch?

Post by Greenlaw »

Oh, no need. I'll upload a specific example later. I think that would be better. Thanks. :)
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Ok, here you go:

patchoidTest.zip

This setup is all messed up but the parts are there. I tried a few variations but didn't have much luck. I think this version follows the description you gave earlier but minus the referenced and masked 'strokes only' layers that should go on top.

Basically, if I was using a regular patch layer here, I want it to target the 'foot' Switch layer at the bottom. If I switch the positions of the 'leg' vector layer and 'foot' group, I can do this with a patch layer, but not the way it's layered here because the patch doesn't recognize a group as a viable target.

I'm hoping I can do this with a 'patchoid' without making the setup too complicated. (I'm calling it a 'patchoid' unless somebody has a better name for this technique.) :)

Thanks for looking at this, and no hurry.
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Little more info:

You might be wondering, well, why then don't I just put the leg at the bottom since that works with a Patch layer?

I should have given the foot a slightly different color to illustrate this better. If I put the leg layer at the bottom, and color the foot 'blue', for example, it looks like the foot art is behind the leg art; I want the foot art to look like it's on top of the leg art. I thought reversing this layer order might fix that but then I ran into the group issue.

I know I'm looking at this wrong but--ugh!--no time to look at this properly right now. Will try again at home tonight.

Edit: Actually, I'm pretty sure I'm looking at this wrong. The masking wouldn't actually 'flip' the layer order, and I'm sure it just appeared that way because of the masking. I probably misread the result I was getting.
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Had an idea that I could test quickly and got something closer:

Image

Not sure why the joint has the tiny breaks on each side though. I'll need to revisit this tonight.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Mask behaving like a patch?

Post by synthsin75 »

Here's a solution without any crease when the foot bends (not sure if that's what you had in mind): http://www.filedropper.com/patchoidtestedit


For reference:
Here's what patches are doing internally: https://sites.google.com/site/synthsin/ ... ects=0&d=1

And here's a swappable patch masking solution: https://sites.google.com/site/synthsin/ ... ects=0&d=1
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Thanks for figuring this out, Wes, and thanks for taking the time to explain how it all works! At a glance, your setup is exactly like what I was going for. I'm taking a closer look now to see if this works along with other stuff I might put in a rig. (It should!)

I'm glad this can be done using a 'patchoid' but I hope the new dev team can take a look into improving the current Patch layer. Not being able to target a group with a Patch layer and use Exclude Strokes with a group is kind of a big deal. Not to diminish the use of 'patchoids' but working with fewer layers in a rig will always be preferable. I'll put in a request for this. (If I haven't already done that.) :)
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Wes, your swappable example is amazing! I can't believe how simple it is.

I think this one is going to be very useful to me, and I'm going to try it in a rig setup tomorrow.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Mask behaving like a patch?

Post by synthsin75 »

Glad they're helpful, Dennis.

I assume they could make patches target groups, since I think you can use groups in my deconstructed patch layer example. Exclude stroke could be a real problem though...as it would probably involve serious changes to the rendering compositor (and that always seems to open a new can of worms).
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

synthsin75 wrote:Exclude stroke could be a real problem though...as it would probably involve serious changes to the rendering compositor (and that always seems to open a new can of worms).
Yeah, I think you're right. I found a 'Patch Layer And Groups' request I had submitted to the devs a couple of years ago and, in revising my request, it occurred to me how complicated Exclude Strokes for Groups might be since Moho will need to figure out the combined 'stroke' image of multiple layers and groups in that group, some of which might contain nested groups with other masking. I'm not a programmer but even I can see how figuring out how to sort that to get a 'strokes only' element can get hairy.

That makes me think of another feature requested I asked for a while back. Sometimes I want a Strokes-only version of a render in a Layer Comp to composite over lighting effects that need to be sandwiched between the strokes and fills layer in a compositing program. I guess that would require a similar method to produce the render. If they can figure that out for rendered output, maybe they can re-purpose that code to make an 'Exclude Strokes' option for groups? Even if was a render-time only feature, that would be very useful. (Currently, I have to use a custom style for the Strokes that I can key out to produced a strokes matte...it works but it's a not simple process when I have differently colored strokes in the character.)

Anyway, just thinking out loud. I included a link to this thread in my revised request so hopefully, the devs will look at what's being discussed here and see these examples.
User avatar
Greenlaw
Posts: 9191
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Mask behaving like a patch?

Post by Greenlaw »

Just a quick update since I've sent a few users to this thread recently and unfortunately many of the files and images in the posts are broken.

I don't think this example project file was ever posted so here it is (finally)...

patchoidTest(fixed).moho

This is the ankle example I posted earlier but now, thanks to Wes, with the 'patchoid' working on a Switch layer. This method works with any group type, not just Switch layers. Feel free to pick apart this example project to see how it works

In a nutshell...

1. Leg Group has Masking enabled and is set to Reveal All
2. Leg Stroke is set to mask this layer
3. Foot Mask (Switch Ref of Foot) is a mask set to Subtract From Mask (Invisible)
4. Leg Fill is not masked
5. Foot (Switch) is set to don't mask this layer Note: This might seem counter-intuitive since the bottom layer in a mask group is often a mask.

I noticed this version of the project has the notches I mentioned in a follow up post. If I have time today, I'll look into applying the fix and re-upload in another post later.

Hope this helps.
Post Reply