Page 1 of 1

Multiple Masks per layer (while not affecting other layers)

Posted: Wed Jan 23, 2019 7:03 am
by buckobeam
Dear all,

I'm working now on location and I'm a bit stuck with the masking part of the mapping.
My input will be spout based generated particles.
I've mapped these on the tower, warped them so they fit the rounded shape of the tower.
The next step is to mask out the parts that don't hit the tower.

Different parts of the tower will have different particles, so per spout input I need different masks.
In the attachments you see the different designated areas.
You will see that some parts will be placed in front of the others.

And that is where my problem starts.

I created masks for the tower part, so it's just on the tower, and not on the support beams.
Next I want to create masks for the support beams.
But those masks also affect the areas of the tower parts.

I can't use alpha in my input, since I need to warp the content to match the rounding of the tower.
So I can only use alpha in my output.

If this was After Effects, I would have used track matte.
So I would create all the masks that I need, and put those into a folder.
That folder would have the alpha information for my spout layer.
And then through track matte the spout layer would be cut out according to the masks from that folder.
No other layer would be affected.

So how can I do something like this in Mad Mapper?

Re: Multiple Masks per layer (while not affecting other layers)

Posted: Wed Jan 23, 2019 9:05 am
by buckobeam
I think I've found a way.
But just in idle mode without any footage it is already really heavy for my laptop
So I hope there are more elegant solutions than that I've come up with.

Please see the attachments.

I've created 3 separate spaces, so that the masks don't affect the layers that I don't want to.
All those 3 spaces are sent through Syphon. And I brought them back in Space 4, where I can simply use ADD to stack them.

Like I said, not really elegant and my laptop (MBP mid 2015) is already slowing down and making a lot of noise.
The laptop is now only for testing purposes, the playback will be done on a much better pc.
But I hope there are other solutions than this work around.

Re: Multiple Masks per layer (while not affecting other layers)

Posted: Mon Jan 28, 2019 6:30 pm
by franz
multiple masks per surface are planned for the future.
meanwhile you could hack a FX to support RGBA masking from an external image file, but that's an advanced undocumented technique, sorry.

Re: Multiple Masks per layer (while not affecting other layers)

Posted: Mon Jan 28, 2019 6:49 pm
by franz
ok, load the file, uncompress,
copy masker.fs in ~/Library/Documents/MadMapper/SurfaceShaders/Quad/

launch madmapper,
create a surface
import the included file mask.jpg in your project
apply FX; "Masker"
select "mask.jpg" as the mask image
select the channel you want to use as a mask

hope this helps,
frZ

Re: Multiple Masks per layer (while not affecting other layers)

Posted: Wed Feb 13, 2019 4:48 am
by yirehmail
Franz thank you for your reply!

After trying your instruction, unfortunately I get following error:

Code: Select all

error::/Users/oaic/Documents/MadMapper/SurfaceShaders/quad/Masker.fs:40: Invalid call of undeclared identifier 'MM_SHADER_NORM_PIXEL' ERROR: 0:205: Use of undeclared identifier 'O'
Image

I also tried to hit the "restart" button in the preview window without success.
Maybe you can help me figure out what I am doing wrong? Any help would be appreciated :D
ok, load the file, uncompress,
copy masker.fs in ~/Library/Documents/MadMapper/SurfaceShaders/Quad/

launch madmapper,
create a surface
import the included file mask.jpg in your project
apply FX; "Masker"
select "mask.jpg" as the mask image
select the channel you want to use as a mask

hope this helps,
frZ

Re: Multiple Masks per layer (while not affecting other layers)

Posted: Wed Feb 13, 2019 10:21 pm
by franz
you have to copy the file Masker.fs in /Users/oaic/Documents/MadMapper/SurfaceShaders/quad/
then it will be available as a FX for any surface.

(don't import it as a media ISF)

Re: Multiple Masks per layer (while not affecting other layers)

Posted: Thu Feb 14, 2019 10:22 am
by yirehmail
This worked! Thank you so much Franz!
you have to copy the file Masker.fs in /Users/oaic/Documents/MadMapper/SurfaceShaders/quad/
then it will be available as a FX for any surface.

(don't import it as a media ISF)

Re: Multiple Masks per layer (while not affecting other layers)

Posted: Mon Mar 25, 2019 2:59 am
by halfmooncottage
Thank you for this post, this is exactly what I need as well. I think it's a bit odd that a feature like this isn't part of the original program design, it seems like an obvious need and an easy fix.

Re: Multiple Masks per layer (while not affecting other layers)

Posted: Mon Mar 25, 2019 5:14 am
by halfmooncottage
Nevermind this isn't really the best approach. It breaks the HUE coloring ability. Everything stays black & white. Any chance you could look into fixing that? Or, is there a more elegant solution? This seems like there must be a better way.

Re: Multiple Masks per layer (while not affecting other layers)

Posted: Mon Mar 25, 2019 9:26 pm
by halfmooncottage
Many hours later, I think the best thing to do is create an "Overlay" mask per layer from your individual masks. So in this case you would have 3 overlay images (Black and white, where Black = off and white = on).

The project would look like this:

Group 1
Overlay 1
Quad 1

Group 2
Overlay 2
Quad 2

Group 3
Overlay 3
Quad 3

By grouping them this way and using overlay masks, you can still use all of your effects and coloring, including opacity. This seems the right way to do it.