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 741 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 737 times
    B Projector Space - Syphon put through.jpg
    B Projector Space - Syphon put through.jpg (201.72 KiB) Viewed 737 times
    A Quad Space.jpg
    A Quad Space.jpg (197.77 KiB) Viewed 737 times
  • franz
    madMapper master
    Posts: 737
    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: 737
    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 33 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: 737
    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 477 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.

Who is online

Users browsing this forum: No registered users and 2 guests