Page 1 of 1

Masking works in viewport and preview, not in export.

Posted: Wed Mar 27, 2019 3:01 pm
by mrc
Hello, everyone,

as always I'm not sure whether this is a bug or a user error.

I got this background line that is masked so it doesn't intersect with the foreground object ('Reveal all' on the group, then 'Subtract' on the mask layer).

As you can see it works as it should in the viewport...

Image

... in the preview render (CTRL-R) ...

Image

... but not in the final, exported render (neither image sequence nor MP4):

Image

An idea why this is?

Thanks,
Marc

Re: Masking works in viewport and preview, not in export.

Posted: Wed Mar 27, 2019 5:11 pm
by Greenlaw
Hard to say without seeing your masking setup (layer order/grouping and settings.)

But here's what I would do:

carMaskTest.moho

The result looks like this:

Image

Basically, I'm using a duplicate of the truck as a mask, parented to the same bone. The vectors have been expanded in the duplicate to expand the width of the mask. Same Mask settings as you described (Reveal All and Subtract/Invisible.)

Re: Masking works in viewport and preview, not in export.

Posted: Wed Mar 27, 2019 11:22 pm
by mrc
Many thanks.
Greenlaw wrote: Basically, I'm using a duplicate of the truck as a mask, parented to the same bone. The vectors have been expanded in the duplicate to expand the width of the mask. Same Mask settings as you described (Reveal All and Subtract/Invisible.)
That's pretty much what I did. Used a reference layer for the duplicate, though, because the truck itself is already a group. I will check out your file at work tomorrow.

Weird though that it is only the export that doesn't work...

Marc

Re: Masking works in viewport and preview, not in export.

Posted: Thu Mar 28, 2019 12:13 am
by synthsin75
Ctrl+R and exported sequence or movie should be the same, so I'd have to see a file that shows the problem to dissect it.

Re: Masking works in viewport and preview, not in export.

Posted: Thu Mar 28, 2019 12:50 am
by Greenlaw
mrc wrote:...sed a reference layer for the duplicate, though...
There might be something there.

I can't remember the exact details but there was a past situation where I wasn't able to use a Reference because the property I was changing was not a keyframeable property, and I wound up using a Duplicate instead of a Reference to solve it. It might have been masking but probably with groups not layers, so I don't really think it applies in your case but you might look into that. Depending on your setup, that could be it.

I probably have the situation documented somewhere...will look it up when I get a chance.

Re: Masking works in viewport and preview, not in export.

Posted: Thu Mar 28, 2019 1:00 am
by Greenlaw
mrc wrote:Weird though that it is only the export that doesn't work...
I've seen that happen when I've nested masks in a complicated (to Moho) way. There are certain masking combinations that might be okay with OpenGL but not with Rendering, and vice versa.

I've found that it best practice to minimize or avoid nesting mask groups where I can. There's usually more than one way to get the desired result.

Anyway, good luck and let us know how it goes.

Re: Masking works in viewport and preview, not in export.

Posted: Thu Mar 28, 2019 9:32 am
by mrc
OK, simplification did the trick: I broke the reference and consolidated the vector layers into one. Now the masking shows up in the rendered video, all good.

Interestingly, when I opened my file this morning the proper masking didn't show up in the viewport either. Only after the changes.

Marc

Re: Masking works in viewport and preview, not in export.

Posted: Thu Mar 28, 2019 12:42 pm
by Greenlaw
mrc wrote:Interestingly, when I opened my file this morning the proper masking didn't show up in the viewport either...
Yeah, that sounds familiar. If your Reference layer was a group (as in the past example I mentioned,) I'm guessing you tried different masking properties on the Reference? In this case Moho will appear to allow the change but when you quit the scene and reopen, you may find that it really hasn't. I think this is because the group masking mode is not a keyframeable property so it really can't be different from the original. When you render the project, that's essentially the same as closing and reopening the project, so you wind up rendering whatever the original group was set at. (Or something like that.)