10 Replies Latest reply on Aug 14, 2017 5:15 PM by Kevin-Monahan

    Requesting a most used expression example.

    jonf90430076

      Assume an eyeball element.  A circle (iris) inside of another circle (eyeball).

       

      Now assume this inner iris circle moves from the left side of the larger circle to the right side, Beginning and end keyframe only.

       

      How would you link that animation, proportionally - such that dragging (or keyframing) the larger circle from the right side of the composition to the left and the inner circle's move would be slave to the outer circle move?

       

      Understanding how to do this, would open the door to understanding and using expressions.

       

      Kind regards and thank you in advance for your time.

       

      j.

        • 1. Re: Requesting a most used expression example.
          Mike_Abbott Level 4

          An expression is not needed for this.

          Simply make your iris a child of the eyeball. The position animation of the iris will then be relative to the eyeball.

           

          To do this:

          1. If you can't see the parent column in the timeline : right click in the lighter grey header area immediately above your top layer.

          Columns > parent.

          2. Make sure the iris and eyeball are in the correct starting relationship before you do step 3.

          3. In the parent column menu for the child layer (iris), select the eyeball to be it's parent.

           

          The iris will now follow any animation you make for the eyeball, but the iris can also have animation itself.

          • 2. Re: Requesting a most used expression example.
            jonf90430076 Level 1

            This is not a reply to the question.  The iris has it's own internal animation within it's own bounds.  Meaning it moves along a path in an opposite direction of the parent.

             

            Of course the internal iris is parented to the external.  That's basic and I'm not an idiot.  The reason for and EXPRESSION is that I need the internal animation to be triggered 'proportionally' to the external 'position' of the parent object across the composition extents.

             

            Maybe this will help you.

            Say for instance the iris opens and closes, (instead of just moves within it's extents) and holds it's position in the outer eyeball.   I would want the moving of parent object to trigger the iris 'expand and contraction' proportional to the move.

             

            I am adding this further example of growth, rather than movement because it's clear you're getting hung up on two movements. 

             

            Lastly, isn't it up to the Poster, to determine whether a CORRECT ANSWER is to be listed, based on the result?

             

            Can we try to answer this again?

             

            Kind regards

             

            j.

            • 3. Re: Requesting a most used expression example.
              jonf90430076 Level 1

              And... If you're going to say that it still doesn't need an expression, (since your last sentence said the internal object can have it's own internal animation) then consider this...

               

              If the outer parent object were to move 'back and forth across the frame' then, by virtue of slaving the internal keyframes to the position of the object across the frame, 'back and forth' then the internal animation should travel forward and back.

               

              Again, in definition of the term 'proportional to..."

              • 4. Re: Requesting a most used expression example.
                Mike_Abbott Level 4

                jonf90430076  wrote

                That's basic and I'm not an idiot.

                 

                I didn't say you were, although you do sound a little ungracious seeing that I'm volunteering my time and expertise for your assistance. There are many questions posted here by complete beginners to Ae. You question gave me no indication of your level of knowledge so I interpreted your question as best as I could.

                 

                jonf90430076  wrote

                Lastly, isn't it up to the Poster, to determine whether a CORRECT ANSWER is to be listed, based on the result?

                 

                All responses are listed, but you can mark an answer as correct. There is a button for you to click : )

                 

                 

                So, to answer your question in summary:

                 

                You need to look at the 'linear expression' which has the form:

                 

                variable = linear (subject, subject min, subject max, output min, output max)

                and apply it to your iris.

                 

                in other words : as the subject (eyeball) goes from a min value to a max value, the output (iris) should go from a min value to a max value.

                 

                Goodnight.

                1 person found this helpful
                • 5. Re: Requesting a most used expression example.
                  Gutter-Fish Level 4

                  jonf90430076  wrote

                  Understanding how to do this, would open the door to understanding and using expressions.

                   

                  You know what else would open the door to understanding expressions?  Following an introductory tutorial to using expressions.

                  Most learning sites like Pluralsight or Lynda.com offer free 1 month trials

                  After Effects Guru: Expressions

                  It never occurred to you that there were learning sites for this type of thing?

                  Or is it that you just can't be bothered with learning how to walk before learning how to run?

                  jonf90430076  wrote

                  That's basic and I'm not an idiot.

                  As Mike said, many questions get posted here by absolute beginners and it's not that they're stupid.

                  In my opinion their problem is two fold:

                   

                  1) their approach to learning is incorrect.   They want to run before they can walk.  So when shows them how to take step they get impatient and say "I don't want to walk, I want to run"

                   

                  2) Because their approach to learning is incorrect they lack the basic vocabulary and knowledge to ask a coherent question.

                   

                  For example:  If you had the basic understand of expressions you would get in an introductory book or video you would have known that you could have asked you question very quickly and clearly by saying something like:

                   

                  "how can get the position of one object to drive the scale of another?"

                   

                  rather than rambling on for 10 paragraphs trying to describe your problem.

                  You would have understood the intrinsic problem in trying to tie an array (x,y) to a percentage (X).

                  You might have asked:

                  How do you take position (2 numbers) and have it control scale (1 number)?

                  These are basic concepts that are covered in introductory courses that can be found online and in books.

                  This is the problem with trying run before you've learned how to walk.

                  Your question was not clear. Mike misunderstood it.

                  And you attacked him for it.

                   

                  Of course you had no way of knowing how to ask this simple question because you had no basic understanding.

                  In other words you were/are ignorant to the basic language and foundations of scripting.

                   

                  So you're not an idiot (at least I assume you're not) but you are ignorant.

                  And as Mike pointed out, a little ungracious as well.

                   

                  So follow that link I gave you.  Sign up for a free one month membership to Lynda and learn the basics of scripting and how to write an expression that executes a linear interpolation.  And stop bulldogging through life as an ignorant ingrate.    Good luck

                   

                  PS..   You owe Mike an apology.

                  • 6. Re: Requesting a most used expression example.
                    jonf90430076 Level 1

                    Oh cut the crap.  If you read the first question, it was concise and accurate.    The problem is that you all assume everyone is a beginner.  Study the question, rather than dumb-down your response.    That my friend, is talking down to someone and treating them like and idiot. 

                     

                    (sound of mic dropping to the floor)

                    • 7. Re: Requesting a most used expression example.
                      Gutter-Fish Level 4

                      jonf90430076  wrote

                       

                      (sound of mic dropping to the floor)

                      Wow,  you're a real piece of work.

                      It's not up to you to decide how concise and clear your question was.  That's up to the people who read and try to interpret it.

                      I really wish people like you were instantly banned from the community.

                      I'll have to leave it there as I can't risk getting in trouble myself.

                      • 8. Re: Requesting a most used expression example.
                        Mylenium Most Valuable Participant

                        You got the answer you need from Mike - a simple linear() interpolator will do, though probably you would need to include some cosine function somewhere if you were to cater for the spheroid nature of the eye...

                         

                        Mylenium

                        • 9. Re: Requesting a most used expression example.
                          Rick Gerard Adobe Community Professional & MVP

                          Assume an eyeball element.  A circle (iris) inside of another circle (eyeball).

                           

                          Now assume this inner iris circle moves from the left side of the larger circle to the right side, Beginning and end keyframe only.

                           

                          Nothing magical here, one circle moving from the left to the right using 2 keyframes. We know you understand basic key framing.

                           

                          How would you link that animation, proportionally - such that dragging (or keyframing) the larger circle from the right side of the composition to the left and the inner circle's move would be slave to the outer circle move?

                           

                          Again, this is a basic problem that anyone with a little basic knowledge would solve by making the larger circle the parent of the smaller circle would solve this problem. Children can have their own animation. All of that animation will be tied to the movement of the parent but the inner circle, the iris, would move from the left to the right side of the bigger circle, the eye, no matter how you moved the outer circle. Your question as asked was answered by Mike Abbot. No expression needed to do exactly what you wanted to do — sorry, your "I'm not an idiot" is an arrogant and rude reply to a concisely and clearly worded reply to the original question you asked.

                           

                          A better way to ask your question would be to think about what you really wanted to accomplish. If you want to automate some of the basic principals of animation like "anticipation" or "squeeze and stretch" using an expression you should have said something like this:

                           

                          "I would like to animate an eyeball quickly moving across the screen using keyframes. I want the iris of the eye to stay put for a couple of frames, then squeeze a little into an oval as the edge of the eye gets close to the iris, then stay squeezed as the eye moves from one side to the other, then squeeze a little more when the eye stops, return to a circle, then move to the center of the eye with a little recoil and return to a round shape using the basic principals from "The illusion of life" To automate this process I would like to use expressions on the iris that are tied to the movement of the eye. How would I do that?"

                           

                          Understanding how to do this, would open the door to understanding and using expressions.

                           

                          Kind regards and thank you in advance for your time.

                           

                          Your last two sentences fool us into thinking you have some respect for others time and effort. Your other responses to  folks trying to understand your poorly worded question reveal that you have no respect for anyones time and effort to help you.

                           

                          I have expressions I have saved as animation presets that do exactly what I assume you wanted to ask, but I'm not going to share them for free. I will tell you that then involve speedAtTime from the Property methods, length(point1, point2) from the Vector Math methods, Math.min(value1, value2) and Math.max(value1, value2) and Math.sin from the Javascript Math methods along with some other Javascript methods not listed in the Expression language menu in the timeline. The expressions are more than 10 lines long and involved a bunch of research and work on my part. If you really want to understand expressions you'll have to do some research and figure it out on your own.

                           

                          If you expect to make a living in a creative field like this one you need to grow a thicker skin, develop a load of patience, and be respectful. I've seen a couple dozen technicians, at least 4 first AD's, and one person working craft services on the sets of major studio productions be politely handed a note by the director to take to the production manager in the middle of the day never to be seen on the set again for behavior more civil than yours. I've never seen anyone thrown off a set for making an honest mistake, but disrespect and arrogance is never tolerated.

                           

                          Ask another question in another thread and most folks will not remember this thread and try and try and help so you still have a chance to learn something from this forum. Being respectful and putting a little more effort into explaining what you are trying to do could have given you a solution to what I think is your question. I took the time to write this response not only for your benefit, but for others that are trying to learn not only how to do but how to learn.

                          • 10. Re: Requesting a most used expression example.
                            Kevin-Monahan Adobe Employee

                            Hi JonF,

                            Did you get the info you require? Please let us know if you still need help.

                             

                            Thanks,
                            Kevin