3 Replies Latest reply on Apr 24, 2013 6:53 AM by Mylenium

    Cant move puppet to new position in comp?

    Arrakis Level 1

      I'm animating a character in After Effects. I'm using a technique I learned from Daniel Gies. When I'm animating limbs this is what i do, I take the limb layer (e.g. arm layer) I place some puppet pins, then I create null objects and connect them to the pins via  an expression then I parent each null to the one above.


      In his tutorial he uses this code -


      n=thisComp.layer("name of null")




      But this doesnt work for me. It deforms my illsutrator and shape layers beyond repair. The comments under the tut also reveal that many people get errors with this code however, I received no errors.


      So i used this instead -

      L=thisComp.layer("name of null");



      and it works.


      The problem is after I have done this I wanted to move my leg somewhere wlese in the composition and scale it but when I do it goes all weird and the null object becomes out of place.


      What am I doing wrong?



        • 1. Re: Cant move puppet to new position in comp?
          Mylenium Most Valuable Participant

          Probably something with your AI file vs. continuous rasterization vs. the expression coordinates. Generally .toWorld() would only be required with 3D layers. also, according to your pasted code, there's a second conversion back to the layer coordinates using .fromComp(), which would be missing from your modified version...



          • 2. Re: Cant move puppet to new position in comp?
            Arrakis Level 1

            Its just a normal AI file, nothing special.  Its one layer.     Why would the first code that Daniel uses make my shape deform though?    And why so many people have an error with it?

            • 3. Re: Cant move puppet to new position in comp?
              Mylenium Most Valuable Participant

              The long and short of it that the code simply assumes theat the layers don't exceed the comp size or leave the comp. Depending on where you apply the code, that may not be true. You would have to add extra stuff to make it more safe and things like specific shape layer modifications or the anchor point coordinates on shape layers being based on the middle of the layer, thus regularly producing negative values, would further complicate the matter. The code is simply too simplistic to cover such scenarios and the internal calculations in your case probably produce these aforementioned negative vlaues that the Puppet effect can't handle since in its world they don't exist. Anyway, without seeing what's actualyl going on, nobody can provide the ultimate solution. I could write an endlessly complex expression and it may still not solve your dilemma. as a start, you might consider pre-composing everything to comps of the same size and using these comps instead of the native AI file. This would also eliminate all the hocuspocus with the layer space transforms and greatly simplify things (and help performance).