9 Replies Latest reply on Sep 19, 2016 2:25 PM by sillybomb

    Complex Shape - merge paths: intersect. Possible without colour merge?

    sillybomb Level 1

      I have a complex shape with lots of groupings.

      Its a house that uses lots of expressions to generate random colours and features.

      --

      There are 3 Major groups placed perfectly above eachother.

      • Outside of the house (the bricks, windows, door, doorknob and roof)
      • Inside the house (walls, furniture)
      • The scaffolding

       

       

      Screen Shot 2016-09-18 at 11.28.14 PM.png -- > wipe --> Screen Shot 2016-09-18 at 11.28.38 PM.png 

       

       

       

      As you can imagine each group is filled with many smaller groupings

       

      E.g. just in the outer group

      • Outer group
        • Doors
          • Doorknobs
          • Patterns
          • Repeater (for double door)
        • Roof
        • Facade
          • Windows
          • Features
          • Bricks
          • Colour behind bricks

       

      What I am trying to add in is a merge paths operator to act as a mask for

      -the  'outer group' so when the path position is altered it reveals the inside of the house

      - and below the 'inner group' so I can pull back this mask and reveal the scaffolding.

      Sort of like a wipe on each 'level' that I can control. I thought I could do this with Intersect as it works on individual paths however...

       

      If I add one it seems to merge the first Fill color over the rest of the shapes turning all shapes one colour.

      To realistically do this would I have to add a shape with merge paths within each subgroup and link it back to a 'master' control?? Seems very memory intensive and I feel like it ought to be simpler. Am I missing something? Can a mask be assigned to only a group within a shape?

       

      Please help me

       

      Essentially how can I mask an individual complex group  (containing subgroups) within a single shape? (Must be single layer for the random and other expressions to work)

        • 1. Re: Complex Shape - merge paths: intersect. Possible without colour merge?
          Roei Tzoref Adobe Community Professional
          Essentially how can I mask an individual complex group  (containing subgroups) within a single shape? (Must be single layer for the random and other expressions to work)

          separating your shape groups into different layers will make this much more manageable. is using a simple layer mask for your shape a problem? I often find that using masks on a shape layer saves me a huge headache. it obviously means you have to set the desired shape group to a separate layer. maybe you will find this script handy: Explode Shape Layers 3 - aescripts + aeplugins - aescripts.com it supports the workflow of using different layers for shapes and not all in one.

          • 2. Re: Complex Shape - merge paths: intersect. Possible without colour merge?
            Mylenium Most Valuable Participant

            Short and to the point: Your workflow makes no sense. Clearly things would be a lot easier and more manageable if you used separate layers and pre-comps.

             

            Mylenium

            • 3. Re: Complex Shape - merge paths: intersect. Possible without colour merge?
              sillybomb Level 1

              Yes I agree to both posts - it would be easier with separate layers under any normal circumstance - however this would ruin the ability of my random expressions to operate. Layer mask would be fine if the expressions could work or if say AE had an ability to group layers (not precomp)

              I.e. workflow operation ->

              1. generate a random building, duplicating layer generates another completely new building

              2. Therefore I can no longer mask this above a separate 'scaffolding' layer as the shape of the building would be incorrect each time..

              The overall workflow would be more efficient if such a thing were possible as I could easily duplicate my shape that already contains my house + its scaffolding at the right dimensions. All I need is a workaround to wipe between two groups in a shape

               

              So -  such a thing is not possible in AE?

               

              I that case I can see a workaround in which I create a scaffolding shape layer (and inside house layer) that takes its dimensions from the random house 'outer' layer then pre-comping those possibly adding a thisComp.name.split to modify the random-seed at each duplicate... Then I could quickly duplicate the precomps to get my different houses add to my timeline

              then enabling Collapse Transformations..

              That would be acceptable

               

              But is it not possible to do it my way? I think it would be nicer if I could just duplicate the shape layer and modify the position of a MergePaths-clipping-mask and have it all done in one spot. Then I could map the clipping-mask to an expression/control and have dynamic wipe transitions on my houses all in one module.

              • 4. Re: Complex Shape - merge paths: intersect. Possible without colour merge?
                Rick Gerard Adobe Community Professional & MVP

                I am going to try and understand your design idea from your two posts. Let's start with a single building. As I understand from your first post the top layer of the illustration is the outside of the building - assuming from your illustration a simple 2D drawing of what the house would look like when you were viewing the outside of the house. Let's call this group House.

                 

                The second component of the illustration would be what you would see if you took away the outside walls exposing the rooms inside the house and all the trimmings. Lets call this group Rooms.

                 

                The last component of the house, which you call the scaffolding is actually the frame of the house, what you would see if you took everything out of the house and peeled away the wall coverings. Let's call this group Frame (scaffolding is not structural - it is put up to build the house then hauled away)

                 

                Your approach was to add a merge paths function to move the Walls to the side revealing the Rooms and then pull the Rooms away to reveal the Frame.  Is that right?

                 

                Then you throw in (Must be single layer for the random and other expressions to work) right at the end which makes me believe you are populating the screen with a bunch of these buildings and you want to reveal the rooms and the frame in random order.

                 

                If I have that right then let me address the random and other expressions problem first. There is nothing preventing you from writing a random expression and setting the random seed on an individual animatable part of any element in any shape layer and making using that same expression in a similar part of another shape and using the same seed to make the events happen at the same time. For example, you have 20 different lamps as part of 20 different shape layers that and each of those shape layers contain dozens of other shape elements but you want to simulate an earth quake that makes all 20 lamps wobble at the same time while everything else in the 20 different rooms stands still. This is entirely doable with the expressions. You could even add two parts to the randomness of the expression so that the timing of the wiggle was the same but the amount and characteristics of each wiggle was different and based on the shape of the lamp with tall ones wiggling more than short ones. The short answer is that there should be no problem with the expressions if they are properly written.

                 

                Now let's talk about revealing Room and the Frame groups. Merge paths takes every path or shape above the operator and picks a new fill and stroke based on what the first stroke and fill it finds in the group and essentially creates a new shape from all the paths that can be animated as one. That is not what you want.

                 

                Group keeps all of the elements inside the group together but does not change the appearance of any of them. Group also adds a Group transform control so everything can be moved, transformed together. This is how you want to arrange your shape layers. to slide the groups to the side and reveal the group below your timeline would look like this:

                Screen Shot 2016-09-18 at 3.48.56 PM.png

                There is nothing keeping you from using expressions to randomly drive the reveals.

                 

                Personally, it would make a lot more sense for me to create the Illustration as layered illustrator documents putting everything I want to animate on a separate layer and importing as a comp. I would put every house in it's own hero position so there was less work to do in AE.  If you wanted to use something like trim paths to reveal lines being drawn then those would be on their own layer and converted to shapes inside AE so you could use the trim paths operation.

                 

                One thing that I almost missed. You want to use random expressions to generate random colors. I'm assuming these colors do not change over time. I'm not sure how you generate random features unless it's just the size of the shape layers or maybe you are using some of the shape layer operations like Pucker and Bloat. If this is the case I'd probably still start with Illustrator and convert only the layers that I needed to randomize into shape layers. I probably would do all of my coloring in AI because it has great tools for generating different color looks for incredibly complicated artwork with a single click or two.

                 

                So if this doesn't help let me know. Try and give us a better description of exactly what you are trying to accomplish. 

                • 5. Re: Complex Shape - merge paths: intersect. Possible without colour merge?
                  sillybomb Level 1

                  Hey Rick

                  Thanks for the response and for trying to understand my terrible explanation! And great detail in your answer Sorry my explanation is pretty confusing. I can't think of a better way to relate it though.

                   

                  You do understand mostly what I am creating however not the effect I am trying to create which is masking/wiping the groups rather than moving their position/opacity.

                  Your screen shot of the shape layer is pretty identical to the structure I have made yes.

                   

                  All of my expressions are finished and the random generation of colours and shapes etc. are already finished so there's nothing that needs a solution there. Heres some random houses all in a row I whacked together:

                  Houses2.png

                  Each of the houses here was created on a single layer w expressions. Just  duplicate and theres a new house which all contain their 'inside' and the 'frame'. I'm pretty happy with the result so far but the idea of adding the frame / inside came to me I wanted to see how far I could take it.  The colours, roof shape and size, bricks, windows size quantity pattern, doors quantity type (even the doorknob), clocks, and the house size are all random. I don't know if its the 'right' way to do it but it was the easiest for me personally and it gets the result I like.

                   

                  So if you imagine, taking your screenshot as an example, I was trying to find a way to animate any type of mask-type feature over 'Group House' so that when it works, the result looks more like a wipe effect revealing the Group Room.

                  And then I would also do this on Group Room to wipe-reveal 'Group Frame'

                  If you picture that, also picture being able to do the reverse so that I could create an animation where

                   

                  1. the frame appears

                  2. (wipe) the Group Room appears over the frame

                  3. (wipe) the Group House appears over the rooms to make the building appear.

                   

                  If that were possible I could also expression/link these wipes to a null master to animate them all together. The sky is the limit from there on.

                   

                  Every time I duplicate my shape I have a completely new house so I could have my rand-generated 'house' elements being 'wipe'-built all over my animation landscape. This is why I was hoping I could keep it within a single layer. So that the expressions could all be self-contained. If I had to create 3 layers I would have to link the Group Frame size equations to the randomly generated size of the new house, and likewise with the Group Room. Duplicating again would mean relinking each time. So to maintain the best efficiency for the 'random' I would need it to work the way I'm dreaming about in a single layer or precomping. I'd still prefer the single-layer method because then I can modify values, random seed for each building in a single timeline. I'm just trying to make it simpler and easier but probably asking for the impossible and also doing it the 'wrong' way.

                   

                  heres a a mockup of the desired effect by using 3 layers instead:

                  Screen Shot 2016-09-19 at 10.52.20 PM.png

                   

                  I think you have answered my question however when you described the merge paths as 'making a new shape'. Which means it isn't possible to 'mask' a shape group separately from the fill data. :/

                  Although it would be a lot easier if I could create the effect within the single layer so I could just duplicate as above and have it all work - it seems to be impossible.  Seems I'll have to modify it a little so that there are 3 individual layers I can add a mask to in a precomp the way I describe in my second post unless you know of a creative solution to wipe on the shape you've created between Group House/GroupRoom/GroupFrame.

                   

                  Thanks again for trying to understand my confusing explanations

                  • 6. Re: Complex Shape - merge paths: intersect. Possible without colour merge?
                    Mylenium Most Valuable Participant

                    Although it would be a lot easier if I could create the effect within the single layer so I could just duplicate as above and have it all work - it seems to be impossible.

                     

                    It's not at all impossible, but it seems you are clinging on too much to keeping your expressions on a simpleton level (no offense). Since you haven't cared to reveal them we can only guess, but it's my impression that they really are only simple random() things which of course will get you in all sorts of trouble. The way I see it, you need to work on the expressions more than anything else. The basic drill would be like that:

                     

                    • one comp per building
                    • each comp has an auxiliary "Controller" layer that holds expression controls
                    • one of the controls could generate a global random seed and output range
                    • everything else feeds off the generated random value

                     

                    With a bit of string magic it would even be possible to automatically generate new random seeds every time you duplicate a comp and rename it and you could even parse properties such as number of levels and width of the building this way. Likewise, your reveal wipe is not an issue at all. That's a simple valueAtTime() thing that filters and remaps a range through linear() expressions. Again, I firmly believe more than anything else the issue is with your expression rigging, not so much the limitations of individual features 'cos once you break out everything into separate comps, it doesn't really matter what happens inside each comp. It could contain hundreds of layers, it could use only one. You just need to invest the time to set it up this way and then you can easily build cities way larger than in your wildest dreams (until of course AE breaks down eventually).

                     

                    Mylenium

                    • 7. Re: Complex Shape - merge paths: intersect. Possible without colour merge?
                      sillybomb Level 1

                      Hi Mylenium 

                      thanks for your input. Its seeming that I will have to go this way in the end.

                      I don't really know how to respond to what you're saying - about it being simpletonian. The expressions are just as complex as they need to be to validly achieve what they need to do and not just simple random() things as far as I can tell?

                       

                      The issue really is not with the expressions so I didn't think I needed to fill the page with the coding. The problem is just with the ability to mask within a shape and just to know if thats possible or not - so far it does seem impossible to do it with the theoretical method I'd like to use.

                       

                      In any which way - I do already have a version set up in the way you've suggested with precomps and a master control/global seeds and it uses some 'string magic' to make each precomp modify its random seed only. I guess I am trying to cling like a tantrum child to my single-layer version. It gives me the feeling that it has more easy-access control rather than opening each precomp I want to modify each time.

                      I didn't go so far as to use string magic to control every other aspect of the house it seemed a little excessive. Especially when the single layer version actually lets me if need be access all the controls from all houses one timeline without string magic with my expression controls. As it were there was only just one little  thing that wasn't possible on the single layer version which is the masking/wiping so I had to ask here to see

                      if (it was possible through some creative workaround)

                      {

                      result = to satisfy my inner-tantrum-child

                      }

                      else

                      {

                      result = I move on.

                      }

                      • 8. Re: Complex Shape - merge paths: intersect. Possible without colour merge?
                        Rick Gerard Adobe Community Professional & MVP

                        As I stated before I would have started this project in Illustrator with each house, room and frame on a separate layer and all of the shapes on a separate layer, imported the whole thing as a comp and not messed with shape layers at all. A wipe or any other kind of animation would have been added to each layer and controlled by an expression looking at the in and out point of each layer, then I would have trimmed the layers as a group, sequenced them and adjusted the in and out points to get the animation that I wanted. I probably could have created 20 buildings with rooms and frames in a couple of hours and done the animation in 15 or 20 minutes. If you are talking hundreds of different buildings then maybe the random shape layers would have been easier, but I probably would have still started in Illustrator.

                         

                        Since you have all of the artwork created using your expressions and the the artwork is assembled and each house with it's separate pieces is on a separate layer the easiest approach to developing the random wipes that reveal the rooms and frame would be to move the three groups, house, room and frame to a separate layer. If you have 50 layers you'll end up with 150.

                         

                        I see three options here. The first is to offset the anchor point and the position of each group in the shape layer and animate the scale of x from 100 to zero like this:

                        Screen Shot 2016-09-19 at 7.27.44 AM.png

                        This will give you a squeeze wipe for each group.

                         

                        The second option would be to separate the House 1 shape layer into 3 separate layers, House 1 - House, House 1 - Room, House 1 frame and then do a wipe on each of the House 1 layers controlling the timing of the wipe with either a combination of the in point or out point of the layer and the index of the layers.

                         

                        The third option involves performing the second option and then pre-composing the 3 layers you have created by separating the groups to layers. You can then write an expression that looks back at the main comp for the in and out point of the nested layer and either randomizes the wipes or controls them by layer index.

                        • 9. Re: Complex Shape - merge paths: intersect. Possible without colour merge?
                          sillybomb Level 1

                          Okay thanks for the input everyone. So conclusion / its only possible with individual layers.

                          Thanks folks!