Masks to cropped layers
  • doesn't work with text or shape layers
  • doesn't work with text or shape layers
    No, the script works with masks.  Text layers and shape layers are not masks.  
    You can convert text to masks by right-clicking on the text layer, and selecting "Create Masks from Text".  You will need another script to convert shape layers to masks, but you should be able to find one with a Google search.
    Once you have converted your text layers or shape layers to masks then the script will work.
  • There's a story behind the development of this script, which is also a useful demonstration of what it's good for.  This script was written to solve a problem I had when working on a project for the Sydney Vivid Festival.  Using this script cut render times down from over 5 minutes per frame to a few seconds per frame.  Here's a link to part 2, where I jump right into the problem.  There's a link to part 1 on the same page if you'd prefer to start at the beginning.
  • Hey Chris,

    I'm posting this here initially as was with this script that I first observed the problem, but will link or copy to other forums with mentioned items.  Seem's like I encountered this years ago but couldn't find anything in my search.

    Anyway, I was running into a wall of sorts when creating multiple cropped layers from a source layers masks. By paste-importing from Illustrator, some complex masks can be created & used in AE.

    The issue is that when done on just a solid there's no problem, but when I try to replace the solid or use an image to begin with, I end up with just black pieces.

    I've encountered this with two different scripts:

    Chris Zwar's cz_MasksToCroppedLayers

    https://aescripts.com/masks-to-cropped-layers/

    and Mamoworld's CopyMask2Layer

    https://aescripts.com/copymask2layer/

    A video might be more telling what I'm talking about but for now here are some screen captures:


    image

    Single layer image with 100+ masks and one unlocked to be shown for illustration.

    image

    Same comp after running the cz_MasksToCroppedLayers script and hiding one layer just for illustration, but same thing happens using the Mamoworld script as well. The layers end up with just black, no imagery.

    However, an older plug-in (NOT a script) MasksToLayers.jsx

    https://aescripts.com/maskstolayers/

    behaves exactly as I'm wanting and I'm not sure why the difference and that's my question. It only has options to set the blend mode and whether to move the anchor point. It works fine with either anchor point options.

    Might there be some additional step or technique to get the script versions working correctly? I tried to manually figure it out but had no luck.  Somehtings happening during the layer cration that I've no control over.

    The issue would appear to be something pretty basic as the two "not" working items are scripts whereas the other is a plug-in.

    I am using AE CS6 on Win7 in case that is a factor.

    Thanks.


    M.
    MasksBefore.png
    1280 x 1024 - 800K
    LayersAfter.png
    1280 x 1024 - 615K
  • @Mark Whitney:
    Not sure I understand the problem. The product description of the "masks to cropped layers" script says that it "creates a new solid for each mask", so it is expected that you don't get the original image, but just a solid instead.
    For CopyMask2Layer you need to explain more detailed what steps you are doing to duplicate the layer (because copymask2layer does not duplicate the layers but only copies masks from one existing layer to another one.

    Also, I am pretty sure that MasksToLayers is a script (if it ends with .jsx it is definitely a script), so it is definitely not related to the script vs. plugin question.

  • Ah yes, so it does. The version that's working for me (MasksToLayers.jsx) has nearly the same description, so a bit of confusion from that I guess. And yes it is a script, just not one with a dockable UI which is why it took me awhile to find it.

    Guess I assumed that cz_MasksToCroppedLayers would use the selected layer to make the new cropped ones rather than create new solids. The Help window for it says it copies to new layers, no mention of new solid. Anyway, doesn't seem to be any (easy) way to swap out the image with the solid so that it all lines up again. Or is there Dr. Möhl? ;)

    As far as CopyMask2Layer, I was just using that to test a different route for getting masks into an image layer. I could use it to copy multiple masks at once then paste them into the image. That works as expected; didn't need to rescale or have animation, just get the masks into the image layer. Could have done that with simple copy & paste I suppose. But I still needed to break them out to separate, cropped layers and hadn't come across MasksToLayers.jsx yet. Knew there had to be a simple way & thought the tools I already had would do that

    I'll drop Chris Zwar a note if he dowsn't poke his head up here then & see if that's an option he might add in the future since his script has a couple niceties such as new layer name, etc.that the other doesn't.

    Thanks.

  • Hi Mark, sorry for not being able to reply earlier.  Thanks Mathias for jumping in and helping out.

    Masks to cropped layers only works with solids, as the purpose of the script is to speed up rendering by making large layers as small as they can be.  In my own workflows, I use it to animate vector artwork.

    I can understand that there would be cases where separating out multiple masks on a video or an image would be useful, but as the source image / video would still be the same size then there would be no increase in rendering speed.  As rendering speed was my focus, working with video / images is not something I have incorporated into the script.  It's why it only works with solids.

    Also, at the time I wrote my version of the masks to cropped layers script, there were other freely available scripts which did split out multiple masks to individual layers, but they were very slow.  They worked by duplicating the original layer and deleting all masks except one.  This was effective but slow - I had cases which took over an hour for the script to run!  My script does not work this way, it calculates the required size for each new layer and creates it from scratch.  This approach is much faster, but it also means that it won't work with images or source footage as those layers will always be their original size (hope this makes sense!).

    Please let me know if you have any other questions I can help out with.

    Just last week I had a colleague ask me what my script was actually good for, so I will try to put up another short video that explains why MasksToCroppedLayers is useful and not just what it does!
  • Ya it does.  Thanks Chris.

    Even so, perhaps keep it in mind as an option in the future. Post a link once you get the new vid finished.

  • Semi totally unrelated...

    Chris, what's the font you used in the Vegas Visits Vivid videos & where might one get it?  The one used for the notation screens.

  • Semi totally unrelated...

    Chris, what's the font you used in the Vegas Visits Vivid videos & where might one get it?  The one used for the notation screens.

    I just un-archived the project to check... apparently it's called "Neon80s", free from DaFont.  I don't remember exactly but I would have gone to one of the free font websites, such as dafont, and simply searched for "neon".  
  • No, I meant the text screens:

    Vegas Visits Vivid.png
    1280 x 720 - 428K
  • They are Estrya's Handwriting, by Jellyka Nerevan.  I have used a few of her freely available fonts over the years.  These days I prefer her Cutty Cupcakes font to the Estrya's Handwriting one, but you can see all of her work here:


    Thanks for watching the original tutorial!
  • Excellent.  Thanks for passing that on.  The site that can analyze an image of a font sample wasn't having much luck. www.fontspring.com/matcherator