5 Replies Latest reply on Aug 23, 2013 6:42 AM by Rick Gerard

    Can I apply multiple masks (each generating a stroke) to a single Illustrator layer?

    wideEyedPupil Level 1

      I would like to use generated stroke effects from Illustrator Artwork have linework 'drawn' over time on screen.

       

      I've studied the tutorial Adobe links to in the user guide for animated swirls. Rather than paste a unstroked path as a mask for each and every line, I would like to apply mutliple generated strokes as masks for each layer of artwork. (Even better I'd like to have AE bring all the mask paths in rather than me having to cut and paste 180 odd paths).

       

      I've tried apply two masks to one layer in the swirl tutorial exercise and as soon as I change the Paint Style setting from On Original Image to Reveal Original Image on the second mask it re fuses to revela either the first or second mask.

       

      EDIT> It seems that AE is applying the binary AND rule to the masks when I want AE to apply the binary OR rule to the masks applied to one layer. No Blending mode for Generated Strokes so not how to get an OR mode going

       

      I have put the file in my DB Public Folder if anyone cares to DL and examine. There is a CS6 AE file CS5.5 and XML plus the AI file with artwork which will need to be relinked for layer 6.

       

      https://dl.dropboxusercontent.com/u/1585739/Double-Mask-problem.zip

       

      The problem stems from the fact that I have about 200 paths I wish to generate strokes from to 'draw' this ID/logo with as part of a film title sequence. Rather thatn having a layer for each stroke I'd rather have say ten layers each with approx 20 masks generating fronm strokes. Possible?

       

      Below is a construction drawing of the stroke paths ID: (each colour represents a different AE layer which might have up to 30 masking paths associated with it, the layers would appear in sequence each mask in each layer being drawn simulaneously). I'll probably want to run multiple stroke widths. So this is a mass of manual work unless I can get a script to do it… ummm. There's maybe a much better way to do this but as I'm new to AE, I'm reliant at this stage on methods/constructs I can find in tutorials.

       

      Screen Shot 2013-08-23 at 3.57.00 PM.png 

      the ID iself looks like this: https://dl.dropboxusercontent.com/u/1585739/Screen%20Shot%202013-08-23%20at%204.00.02%20PM.png

        • 1. Re: Can I apply multiple masks (each generating a stroke) to a single Illustrator layer?
          Mylenium Most Valuable Participant

          AE can import and expand AI paths ever since CS6 using the respective function in the Layer menu. and since it already produces shape layers, therE's also already a partial answer to your second problem: Shape layer strokes can be sequentially animated using a single Trim Paths modifier. Otherwise you'll just have to bite your lip and get to work. This stuff is simply tedious, repetitive work with not too many shortcuts to happiness.

           

          Mylenium

          • 2. Re: Can I apply multiple masks (each generating a stroke) to a single Illustrator layer?
            wideEyedPupil Level 1

            Hi Mylenium

             

            Thanks for the responce. Even if I have to do this manually I'm still looking for efficiences ;-)

             

            Could you please expand on your brief comment.

            i) AE can import and expand AI paths ever since CS6 using the respective function in the Layer menu

            Specifically which menu item in Layers Menu? I know I can import AI files as either footage or Composition which can split or merge layers, is this what you are refering to? I can't seem to select an element (layer) from my imported AI file, copy it and then select the art layer I want revealed and select paste to create a mask (as I can copying from AI as per the tutorial exercise).

             

            ii)  Shape layer strokes can be sequentially animated using a single Trim Paths modifier

            I got no idea what this is saying. Reading the User Guide on shape layers ATM but if you couldexpand please?

             

             

            Theoretically, I think a JS script could grab an array of paths in AI, then iterate around duplicating the reveal AE Layer and apply each path as a mask and generate a stroke for it. I can code JS but I have no idea about the AE DOM so it would probably take me same number of hours to do either way, although if I could Master the code I could iterate my code more easily than changing 180 layers by hand :-) Been a few years since I wrote a Script for AI and I'm on a deadline so a bit reticent to start now. Did find a great series of videos introducing AE scripting though linked to in the User Guide,

            • 3. Re: Can I apply multiple masks (each generating a stroke) to a single Illustrator layer?
              Mylenium Most Valuable Participant

              Specifically which menu item in Layers Menu?

               

              Create Shapes from Vector Layer

               

              Reading the User Guide on shape layers ATM but if you couldexpand please?

               

              Shape Layer --> Add flyout --> Trim Paths --> Trim Multiple Shapes

              I have no idea about the AE DOM

               

              AE has no DOM; JS/ ExtendScript functions are only available for select functions and features and do not have a consistent inheritence for classes, object prototypes and so on. You can't even query most objects and functions unless you know their name and only reading the scripting guide can tell you that.

               

              Mylenium

              1 person found this helpful
              • 4. Re: Can I apply multiple masks (each generating a stroke) to a single Illustrator layer?
                wideEyedPupil Level 1

                I just noticed a couple of check boxes in the Generate Stroke Effect Controls Panels: All Masks & Stroke Sequentually. These are what I was looking for but not seeing ;-) Allows me to apply multiple mask either simulataneously or sequenced.

                 

                Thanks for the Shape Layer hints will check them out too.

                 

                Hmm no DOM; I guess what I meant is the object heirachy & naming conventions for objects. Seems to be all there in the Scripting User Guide but heavy reading…

                • 5. Re: Can I apply multiple masks (each generating a stroke) to a single Illustrator layer?
                  Rick Gerard Adobe Community Professional & MVP

                  I would highly recommend that you set your masks to cycle colors in the preferences. I took one of your sample projects and simply re-ordered the masks and set them to sequence. The second stroke path was removed. You'll find the project here.

                  1 person found this helpful