Forum Replies Created

Page 2 of 8
  • Xinlai Ni

    November 14, 2009 at 4:24 pm in reply to: Read the speed of pixel / second

    I can understand only half of your question, but seems like you are looking for the
    thisLayer.position.speed

    property

    Xinlai Ni
    Software Engineer, Google Inc.

  • Xinlai Ni

    November 13, 2009 at 7:13 pm in reply to: AE Delay Expression

    I guess I didn’t understand how you want to specify the movement. Are you trying to manually move the slider around hoping to see your layers move their Z-coordinates accordingly? Are you going to control your slider by key-frames at the end? If all you need is a delay of the layer’s movement with respective the corresponding z-slider’s value, you can simply move valueAtTime as below (for each layer’s position property).

    x = yourX;
    y = yourY;
    z = thisComp.layer("Control").effect("Slider")(1).valueAtTime(time - yourDelay);
    [x, y, z]

    This works only when your slider is animated somehow, e.g., via keyframing.

    Xinlai Ni
    Software Engineer, Google Inc.

  • Xinlai Ni

    November 13, 2009 at 4:30 pm in reply to: AE Delay Expression

    your expression was truncated, can you please paste again?
    Thanks.

    Xinlai Ni
    Software Engineer, Google Inc.

  • Xinlai Ni

    November 12, 2009 at 5:45 am in reply to: lighting up layers through a slider?

    use this expression for the opacity:
    selectedIndex = Math.floor(thisComp.layer(“Contorl”).effect(“Slider Control”)(1));
    selectedIndex == index ? 100 : 0

    Xinlai Ni
    Software Engineer, Google Inc.

  • Xinlai Ni

    November 11, 2009 at 12:28 am in reply to: How to achieve gradual acceleration w/ a CC Cylinder

    This should be easy, for example you want to animate the rotation property with uniform angular acceleration ‘a’ until time ‘t’, after which it stays with the constant speed. Just apply this expression to your rotation property:

    if (time < t) { 0.5 * time * time * a; } else { 0.5 * t * t * a + a * t * (time - t) }

    Xinlai Ni
    Software Engineer, Google Inc.

  • Xinlai Ni

    November 10, 2009 at 11:40 pm in reply to: How to achieve gradual acceleration w/ a CC Cylinder

    I didn’t quite understand the relationship between the rotation of the cylinder to the falling of the object, can you explain more?
    But for uniform acceleration from still, the formula is
    displacement = acceleration * time * time / 2
    you can apply that to either angular displacement or positional displacement.

    Xinlai Ni
    Software Engineer, Google Inc.

  • Xinlai Ni

    November 10, 2009 at 4:52 pm in reply to: Keyframed wiggle frequency problem

    It’s not natural to me to control how violent the camera shakes by controlling its wiggle frequency, I would use the wiggle amplitude for this purpose. Frequency is a subtle thing, it says for one second how many random wiggles are generated, so a frequency of 0.2 means one wiggle per 5 seconds, and it’s quite hard to have a definitive expectation out of this.

    Anyway, have you tried to link the wiggle frequency with the camera’s ‘position.speed’ property? Something like
    wiggle(freq, position.speed * 100)

    Or at least, you can control the amplitude TOGETHER with the frequency to achieve what you want.

    Hope this helps.

    Xinlai Ni
    Software Engineer, Google Inc.

  • Xinlai Ni

    November 10, 2009 at 4:22 pm in reply to: Photoshop layers to 3D, scaled to look 2D…

    It’s as simple as linear scale:
    Assuming your topmost text layer is at z=0 plane, and your camera is sitting at some negative z coordinate looking toward z+ direction (this is important!), apply this to the scale property of each text layer:
    cameraZ = thisComp.layer(“Camera 1”).position[2];
    s = 100 * (cameraZ – position[2]) / cameraZ;
    [s, s, s]

    Xinlai Ni
    Software Engineer, Google Inc.

  • Xinlai Ni

    November 10, 2009 at 4:09 pm in reply to: HELP! I think this expression is crashing CS4

    The only thing is you are using the bitwise AND operator ‘&’ instead of logical AND operator ‘&&’, but in effect it should be the same given the way you use it.

    Xinlai Ni
    Software Engineer, Google Inc.

  • Xinlai Ni

    November 10, 2009 at 1:30 am in reply to: 3D Layers attached to string: physics of a drop?

    It’s totally possible to simulate this using expressions:
    The physics of rigid-body free-falling is pretty simple, you can get the formula from the high-school physics texts. It involves solving a quadratic equation. But the hard part is the collision detection, i.e. when the irregularly-shaped letter object bounces off the floor because the formula works for point-like objects. That makes it even more complex if you want the dropped object to rotate around its center of mass. It’s totally doable given some manual parameter-tweaking, and it’s guaranteed to be realistic because of the precision of the math.

    Xinlai Ni
    Software Engineer, Google Inc.

Page 2 of 8

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