Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Camera Moves When Moving Layers

  • Camera Moves When Moving Layers

    Posted by Andrew Ross on April 3, 2017 at 3:04 pm

    Hi there,

    I have a preview that has been approved by the client to a certain degree, I just need to tweak a few things and it’s good to render.

    However, I have the following expression on a Null Object, which has the camera linked to it:

    timeToStart = 0;
    frameToStart = 00;
    timeToStop = 1;
    frameToStop = 5;
    w=wiggle(6,60)

    d = thisComp.frameDuration;
    if ((time > (timeToStart + frameToStart*d)) && (time < (timeToStop + frameToStop*d))){
    [value[0],w[1]];
    }else{
    value;
    }

    Everytime I add a layer above the camera layer, or move the camera and null up the stack or delete a layer above the camera layer within the composition, the position of the camera moves, which I don’t want as the preview has virtually been signed off.

    I have even converted the expression to keyframes and even after that the camera moves when moving layers or deleting layers above the camera.

    Any ideas? Worst case, i’ll leave it as is but it’d be great to know how to get around it.

    Thanks in advance

    Andrew Ross replied 9 years, 1 month ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    April 3, 2017 at 3:57 pm

    I think you just need to add a seedRandom() statement at the top of the expression. Whatever the layer’s layer number is where you like the performance, use that number minus one as the seed. For example, if your null is layer 3 when it behaves the way you want, just add this:

    seedRandom(2,false);

    Dan

  • Andrew Ross

    April 4, 2017 at 8:54 pm

    Hi Dan

    Thanks for the reply.

    My Null is layer 5, so I put the following at the top of the expression.

    seedRandom(4,false);

    I then proceeded to delete the layer that I don’t want (to clean the project up) which is the 4th layer in the comp. When this is done, the camera jumps again.

    I should add that I have some position keyframes on the null as well as the expression.

    Thanks again.

  • Dan Ebberts

    April 4, 2017 at 11:42 pm

    Does the null move when you delete the layer, or just the camera? Does the camera have any expressions?

    Dan

  • Andrew Ross

    April 5, 2017 at 12:13 am

    Ahhh my bad.

    Yes the camera had the same expression, which i didn’t realise i had applied to it.

    I’ve just added the line you mentioned to the camera expression also, deleted the layer above and badda boom!

    You are a star.

    Many thanks. Happy customer : )

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