Page 1 of 1

Another day, another problem...(masking malfunction)

Posted: Fri Dec 29, 2017 9:44 pm
by breedrill
Been working on an animation and ran into an interesting problem.

Let me explain this best I can;
I'm working on an animation of an anime character. For the rig, I have a separate folder for the eye(it's a side view)that has a masked folding for the eyewhite, and then another folder containing the iris/pupil which is also masked(so that the iris won't escape the eyewhite when moved around). Now, I did this successfully on my last animation with no problems whatsoever--and I copied my previous settings down to a T. But for some odd reason, in this new project, even though when rendered the masks look fine, while I'm editing the animation none of the masks for the iris are shown to work. The shading goes outside of the iris, and the iris itself doesn't even stay in the eyewhite. Any tips? This is actually pretty frustrating to work with.

Re: Another day, another problem...(masking malfunction)

Posted: Fri Dec 29, 2017 10:48 pm
by Greenlaw
It sounds like you're nesting your masks. That's a good technique but you should be aware that, in certain setups, Moho's display cannot show masking correctly when you do this. Rendering should work fine though, and the display error should not normally be an issue for animation. If you can ignore them while animating, just do that. (It's what we usually do at my workplace.)

Where making display errors can be an issue is when they prevent you from animating accurately. In these situations, there are a number of things you can try.

First, try disabling GPU Acceleration in the Workspace Display options. GPU Acceleration cannot display nested masking properly and disabling it may allow Moho to display it more correctly. (It probably still won't be exactly what you see in render but it might be good enough for animation.)

If that doesn't work, I would look at the masking hierarchy and check if there's another way to set this up that will give you the desired results. In many cases, you'll find there's more than one way to do the same thing. For example, instead of making one mask layer to nest an entire group, try making copies or references of the mask and inserting one inside each group for separate masking groups. This is more complex but it may display in Moho more correctly.

Another trick I sometimes do is to create two versions of the art, one for display and one for rendering. The display layers are designed to show properly in the workspace but have 'Do Not Render This Layer' enabled because this setup might not render correctly. Then, for the render version, I'll enable 'Hide In Editing' to prevent it from showing while I"m animating the rig; with this setting enabled, this layers will still render of course.

One cool trick Victor Paredes came up with is to create a single shape out of large face shape with eye hole layers. This technique creates a 'mask' for the eyes without actually using a mask. Then you can mask the large face shape with a head shape. Since you're only using one mask, this display correctly in OpenGL and it renders correctly.

There are many other tricks you can try. A search in these forums should turn up some useful stuff.

Hope this helps.

Re: Another day, another problem...(masking malfunction)

Posted: Sat Dec 30, 2017 4:12 pm
by uncle808us
@D.R. Greenlaw:
One cool trick Victor Paredes came up with is to create a single shape out of large face shape with eye hole layers. This technique creates a 'mask' for the eyes without actually using a mask. Then you can mask the large face shape with a head shape. Since you're only using one mask, this display correctly in OpenGL and it renders correctly.
Could you and would you visualize this for me?
I can't get my head around it.
Thank you.

Re: Another day, another problem...(masking malfunction)

Posted: Sat Dec 30, 2017 6:29 pm
by Greenlaw
Sure. I actually got to work with Victor on a job last summer and learned about this technique from dissecting one of the rigs he built for us. The setup baffled me at first but Victor answered my questions and it turned out to be very easy to create and understand.

Note that there are many way you can vary this technique. Here's a simple version to get you started...

Image

Another post is coming soon to complete this lesson.

Re: Another day, another problem...(masking malfunction)

Posted: Sat Dec 30, 2017 9:04 pm
by Greenlaw
Part 2, Rigging...

Image

Whoops! I forgot to mention a couple of things: I also used Layer Bind for the Head (Mask) layer to bind it to the Head bone. This is the only item that is actually bound to this bone. Layer binding, BTW, is a quick way to lock any item to a selected bone. Just be aware that if you use it with a group, anything inside the group will share this binding, meaning the group binding will override any binding used for individual layers inside the group. If that's what you actually want, it's all good. If not, use a different binding method.

I also enabled Shy Bone for the Face bone. This will 'hide' the bone because this bone will be controlled by a Head Turn SBD and a Head Tilt SBD, and I don't want to accidentally animate this bone manually.

Next, I added Actions to the SBD bones and animated them. (I'm not going to detail this stage because this lesson is only about how to use the 'faux masking' technique.) I also added a Head Tilt SBD, which isn't shown in the early screen cap above. The Action for this SBD simply moves the Face bone up and down over the head layer.

And here's the final result...

Image

As you can see, we appear to have used nested masking in this group that also displays correctly in OpenGL. This is because we're actually using only one mask layer in the group and cheating the face masking with the Face layer.

If we had used actual masking for all the elements, we will probably see something weird in the display preview, like the eyes floating outside the head when it turns. As mentioned earlier, this kind of display error doesn't affect final render quality, so you can usually just ignore it. But when it's really important to get an accurate display preview, this is an easy and very effective way to work around the problem.

Re: Another day, another problem...(masking malfunction)

Posted: Sat Dec 30, 2017 9:12 pm
by Greenlaw
I hope this helps. If you need more info or ideas, I did a search and found this thread about the technique:

viewtopic.php?f=13&t=30350&hilit=masking+technique

In Victor's version, he put all the face elements in a single layer. Either way works fine. For editing purposes, I just find it easier to work with multiple layers.

I think there are other threads on the topic. A quick search might turn them up.

Re: Another day, another problem...(masking malfunction)

Posted: Sat Dec 30, 2017 10:40 pm
by uncle808us
@D.R. Greenlaw: Wow thank you so much for going to the trouble and taking the time. This is fantastic saved it to a pdf for later study. Again thank you so very much.

Re: Another day, another problem...(masking malfunction)

Posted: Sat Dec 30, 2017 11:26 pm
by Greenlaw
Sure, I'm glad that helps.

Besides, it was fun to do and good practice for me because I'm planning a couple of animation production courses for 2018. Will post details when I figure out exactly what I'll be teaching in them. :wink:

Re: Another day, another problem...(masking malfunction)

Posted: Sun Dec 31, 2017 12:54 am
by Greenlaw
If anybody wants to play around with my demo project, here it is:

FauxMasking_04.zip

Meant to post this earlier but there was a weird bug in the file I had to squash first. It should be fine now.

P.S., you might want to capture another PDF. No major changes, just some spelling/grammar stuff, and a little more clarity.