Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions One dimensional property to 3-dimensional

  • One dimensional property to 3-dimensional

  • Espen Jakobsen

    June 4, 2008 at 11:04 am

    Hi!

    I’ve really been trying at this, but can’t figure it out even though I’ve looked at sites like Dan Ebberts’ expressions lab, Creativecow and AE enhancers.

    I have a text logo containing 7 letters in separate 3D layers, where I want all of them to follow the above layers’ scale, rotation and position, based on valueAtTime. To achieve this was easy, I used this example from AE help:
    thisComp.layer(thisLayer, -1).position.valueAtTime(time – .5)

    But I want an increase in certain values, so that each layer moves 50px closer to the camera in Z-space than the one above, but no increase in X and Y values. I want to do this with null object slider controls so that I later on easily can change the increase. My problem is that the slider controls’ value is one-dimensional while the layers’ position values are 3D. So how can I translate the value from the slider to increase only the Z-position of the layers?

    The same problem occurs if I need to control the scale with a slider control, because I dont understand how to use a one-dimensional value to control 3D values. The slider only scales the xScale of the layer, when I want it to scale in all 3 dimensions.

    Thanks,
    Espen

  • Dan Ebberts

    June 4, 2008 at 12:59 pm

    Like this for z position:

    z = thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
    [value[0], value[1], z]

    Like this for scale:

    s= thisComp.layer(“Null 1”).effect(“Slider Control”)(“Slider”);
    [s,s,s]

    Dan

  • tom edwards

    September 13, 2021 at 3:11 pm

    Hi Dan,

     

    I have a similar issue. I’m trying to create a delay of movement in z space with the following expression:

     

    z = thisComp.layer(“cntrl”).effect(“start layer”)(1);

    myOffset = effect(“myOffset”)(1).value * thisComp.frameDuration;

    masterDelay = thisComp.layer(“cntrl”).effect(“Delay”)(1).value * thisComp.frameDuration;

    sampleP = time – myOffset – masterDelay;

    z.position.valueAtTime(sampleP)

     

    how can i prevent the layers that are being delayed from reading the x+y position of the main layer? I tried using your expression above but had no luck.

  • Dan Ebberts

    September 13, 2021 at 4:07 pm

    Change the last line to this maybe?

    [value[0],value[1],z.position.valueAtTime(sampleP)[2]]
  • tom edwards

    September 13, 2021 at 10:05 pm

    That worked a treat, thanks very much Dan!

Viewing 1 - 5 of 5 posts

Log in to reply.

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