Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Stop and start parenting to object at a given time?

  • Stop and start parenting to object at a given time?

    Posted by Chris Arnold on January 22, 2009 at 8:37 pm
      timeToStart = 2; 
      if (time > timeToStart){ 
          wiggle(3,25); 
      }else{ 
          value; 
      }
    
      timeToStart = 2; 
      if (time > timeToStart){ 
         thisComp.layer("Null 1").effect("Separate XYZ Position")("Y Position")
      }else{ 
          value; 
      }
    

    I am trying to achieve something similar to the attached expression. But instead of stopping or starting a wiggle expression, how to you start and stop the parenting of another object. I tried just placing in thisComp.layer as you can see below, but thats not quite the look I am going for, as the position jumps to the exact value at a specific time. I am placing this expression in the y position value.

    The animation I am trying to achieve is a girl bobbing in the world who picks up an object in the water. The the object is floating and animating by itself but as soon as her hands pick it up I want the position to be parented to the position of her body movement/position, so that they can then bob together…and save keyframes.

    Any thoughts?

    Adam Greenberg
    replied 11 months, 1 week ago
    4 Members · 6 Replies
  • 6 Replies
  • Dan Ebberts

    January 22, 2009 at 8:54 pm

    If you’re using a wiggle expression on the object, I would set it up like this:

    seedRandom(1,true);
    wiggle(1,25);

    Then split the layer, parent the second part, and use an expression like this for the second part:

    seedRandom(1,true);
    wiggle(1,25,1,.5,inPoint)

    Something like that…

    Dan

  • Chris Arnold

    January 22, 2009 at 9:39 pm

    Hi Dan,

    The object doesn’t have a wiggle to it. The girl in the water has a wiggle expression though. When I parent the split layer at the point I want it to move with the girl the object moves far out of the scene.

    I have the split layer (object floating in the water) parented to the position and rotation values of the first object so that I have control in my scene in case I want to adjust the animation, both object will be positioned correctly, although when I now parent the entire object to the girls body layer, it at this point jumps to a different part in the scene. Which confuses me.

  • Chris Arnold

    January 22, 2009 at 10:47 pm
    pickuptime = 2.5;
    dropofftime = 6.0;
    layertofollow = "parent_layer_name";
    
    ticker = Math.min(Math.max(pickuptime, time), dropofftime);
    this_comp.layer(layertofollow).rotation.value_at_time(ticker)

    I found some expression on this website: https://dev.xscriptorium.com/node/149

    this is pretty much what I am trying to achieve, although I can’t get this expression to work.

  • Filip Vandueren

    January 23, 2009 at 12:26 am

    The way those expression work is: you need to apply them to a Null layer.

    Then the Null layer should follow the leader between the pik-up and drop-off time, but remain stationary before and after.

    You then Parent your layer(s) to that Null.

    It works very well.

  • Chris Arnold

    January 23, 2009 at 12:44 am

    Yes, that does work really now. Thanks Dan and Filip for the help.

    Is this expression often used in the animator’s world? I can see so many uses for it, not only in my current project.

  • Adam Greenberg

    May 9, 2023 at 5:37 pm

    this is great !!!!!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy