Multiple Masks per layer (while not affecting other layers)
  • buckobeam
    junior Member
    Posts: 2
    Joined: Wed Jan 23, 2019 6:44 am

    Multiple Masks per layer (while not affecting other layers)

    by buckobeam » Wed Jan 23, 2019 7:03 am

    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?
    Attachments
    madmapper.jpg
    madmapper.jpg (197.61 KiB) Viewed 7056 times
  • buckobeam
    junior Member
    Posts: 2
    Joined: Wed Jan 23, 2019 6:44 am

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

    by buckobeam » Wed Jan 23, 2019 9:05 am

    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.
    Attachments
    C Output.jpg
    C Output.jpg (190.79 KiB) Viewed 7052 times
    B Projector Space - Syphon put through.jpg
    B Projector Space - Syphon put through.jpg (201.72 KiB) Viewed 7052 times
    A Quad Space.jpg
    A Quad Space.jpg (197.77 KiB) Viewed 7052 times
  • franz
    madMapper master
    Posts: 1033
    Joined: Fri Feb 18, 2005 7:05 pm
    Location: Paris, France
    Contact:

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

    by franz » Mon Jan 28, 2019 6:30 pm

    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.
  • franz
    madMapper master
    Posts: 1033
    Joined: Fri Feb 18, 2005 7:05 pm
    Location: Paris, France
    Contact:

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

    by franz » Mon Jan 28, 2019 6:49 pm

    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
    Attachments
    masker_fx.zip
    (108.25 KiB) Downloaded 401 times
  • yirehmail
    junior Member
    Posts: 6
    Joined: Mon Dec 03, 2018 4:45 pm

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

    by yirehmail » Wed Feb 13, 2019 4:48 am

    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
  • franz
    madMapper master
    Posts: 1033
    Joined: Fri Feb 18, 2005 7:05 pm
    Location: Paris, France
    Contact:

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

    by franz » Wed Feb 13, 2019 10:21 pm

    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)
    Attachments
    Screen Shot 2019-02-13 at 21.21.58.png
    Screen Shot 2019-02-13 at 21.21.58.png (70.43 KiB) Viewed 6792 times
  • yirehmail
    junior Member
    Posts: 6
    Joined: Mon Dec 03, 2018 4:45 pm

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

    by yirehmail » Thu Feb 14, 2019 10:22 am

    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)
  • halfmooncottage
    junior Member
    Posts: 5
    Joined: Sun Mar 24, 2019 8:54 pm

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

    by halfmooncottage » Mon Mar 25, 2019 2:59 am

    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.
  • halfmooncottage
    junior Member
    Posts: 5
    Joined: Sun Mar 24, 2019 8:54 pm

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

    by halfmooncottage » Mon Mar 25, 2019 5:14 am

    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.
  • halfmooncottage
    junior Member
    Posts: 5
    Joined: Sun Mar 24, 2019 8:54 pm

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

    by halfmooncottage » Mon Mar 25, 2019 9:26 pm

    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.
  • Deltaprocess
    junior Member
    Posts: 2
    Joined: Tue Oct 10, 2017 12:08 pm

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

    by Deltaprocess » Tue Apr 21, 2020 6:30 pm

    WOOOOW

    This is just AWESOME!
    I wish I knew about this post before :lol:
    It would have saved me a lot of time and extra-work,
    passing tens of alpha image-masked syphon layers from VDMX or Resolume!

    I wonder if it'll soon work in the new MADMAPPER 4 Release, built-in or not.
    As of now it doesn't work in the Beta.

    Thanks again for sharing this!
    F









    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
  • franz
    madMapper master
    Posts: 1033
    Joined: Fri Feb 18, 2005 7:05 pm
    Location: Paris, France
    Contact:

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

    by franz » Tue Apr 21, 2020 7:49 pm

    FYI multi masks per surface is fully supported in MadMapper 4. why not try the beta ?
  • deltaprocess.it
    junior Member
    Posts: 1
    Joined: Fri Sep 03, 2021 7:07 pm

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

    by deltaprocess.it » Fri Sep 03, 2021 9:54 pm

    FYI multi masks per surface is fully supported in MadMapper 4. why not try the beta ?
    Hi Franz,

    been off the topic for some time but i'm back into it now as I desperately need it..: i've tried to use this MASKER.FS on MAD4 in all possible ways but still doesnt work.. the whole point is to MASK with an IMAGE (I call it Layermasking or Imagemasking), and have alpha around the masked quad. Is there any way it can be done in MAD4 or is it possible to update the "masker.fs" to make it run in the latest version too?

    Thanks heaps!
    F
  • mad-matt
    garageCube team
    Posts: 1476
    Joined: Mon Sep 09, 2013 5:50 pm

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

    by mad-matt » Wed Sep 08, 2021 9:57 am

    I just published an FX in the online library (for MM 4.1) called "Media Luma Mask", it has the same parameters than the "luma key" + a media parameter where you can select the media to be used as a luma mask.
    Le me know if it solves your situation.
  • User avatar
    caneron
    activ8 member
    Posts: 94
    Joined: Tue May 28, 2019 9:01 pm

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

    by caneron » Tue Sep 21, 2021 11:30 pm

    I just published an FX in the online library (for MM 4.1) called "Media Luma Mask", it has the same parameters than the "luma key" + a media parameter where you can select the media to be used as a luma mask.
    Le me know if it solves your situation.
    This is great - but, trying to do the same thing with Alpha! I realize I can convert my files to Luma Mattes but I have the alphas to work with.

    Also wondering what happened to multi-fx!
    creative technology producer, designer
    🫠 https://www.vacationland.club

Who is online

Users browsing this forum: No registered users and 12 guests