Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Automatic Picture Switch for 360° camera movement

  • Automatic Picture Switch for 360° camera movement

    Posted by Sebastian Tomczak on December 7, 2008 at 2:36 pm

    Hey there,

    sorry for the bad subject – i hope to describe my problem in detail now.

    Id like to create a 360° camera movement around a hand-drawn character. I have drawn pictures for every 45° angle. Now i want to animate the camera and want the picture to change automatically when the camera reaches a certain view angle on the drawn picture. Hope you get my point…
    I know i can to it without that much effort by hand. But when i want to make a more complex camera movement through 3D space itll be much work to tweak the pictures manually.

    Thank you for your help…
    Best regards from Germany,
    Sebastian

    Darby Edelen replied 17 years, 9 months ago 4 Members · 6 Replies
  • 6 Replies
  • David Bogie

    December 7, 2008 at 5:55 pm

    Four views? Is this a stylistic decision? Why not simply set the layer to orient toward the camera?

    You will be able to switch out the layers from a precomp using an expression that includes if-then arguments. It will look at the orientation or rotation values of the camera and turn transparency on or off for three of your four layers depending on the quadrant the camera is in.

    That’s just one way to approach it. Give us a day or two for some of the expressions wonks to check in and give you a more reasonable solution.

    bogiesan

  • Steve Roberts

    December 8, 2008 at 3:34 pm

    Mock-wonk here … you might start with a four-frame movie containing your four views, then tie the displayed frame of that movie (a layer in the main comp) to the Y-rotation value of the camera, divided by 90 and rounded off.

    Now as for specifics … maybe a true wonk will weigh in.

  • David Bogie

    December 8, 2008 at 4:16 pm

    > Mock-wonk here < You've coined a new word for our new age, Steve. You own it or can I use it? bogiesan

  • Steve Roberts

    December 8, 2008 at 7:11 pm

    Oh, please do, bogiesan. It’s royalty-free. 🙂

  • Steve Roberts

    December 8, 2008 at 7:30 pm

    I forgot to mention time-remapping.
    This seems to work:

    1. make a four-frame comp that includes the four images, one per frame
    2. drop that into the main comp
    3. apply time remapping to the four-frame comp, and extend it to the end of the main comp
    4. make sure you have a camera (“Camera 1” in this example) in the main comp
    5. apply this expression to the main comp:

    thisComp.layer(“Camera 1”).transform.yRotation/2700

    6. animate your camera

    2700 is 90×30 to account for four images per 360, and 30 frames per second. A different number of images and different frame rate would require different numbers.
    The Y rotation can go anywhere between 0 and 360. Haven’t tried anything else.

    Hope that helps …

  • Darby Edelen

    December 8, 2008 at 8:45 pm

    This technique requires that you pre-compose your 8 frames and give them each a consistent duration. So, for example, create an 8 second composition and place frame 1 from 0-1 seconds, frame 2 from 1-2 seconds, etc.

    Next you’ll need to bring your pre-comp into another composition and enable time remapping (under Layer > Time > Enable Time Remapping or cmd-opt-t/ctrl-alt-t). Also enable the 3D layer switch on this layer.

    Then apply this expression to the layer’s time remap property:


    frames = 25; //the duration of each angle in frames
    n = 8; //the number of angles you have

    cam = thisComp.activeCamera;
    p = toWorld(anchorPoint);
    c = cam.toWorld([0,0,0]);
    v = p - c;
    deg = radiansToDegrees(Math.atan2(v[0],v[2])) % 360;
    linear(deg, -180, 180, 0, n * framesToTime(frames));

    Now, since you’ve built the y-rotation into the images you have from each angle we want this 3D layer to auto-orient to the camera on the y-axis only. Apply Dan Ebberts’ auto-orient y expression to the y-rotation of the layer:

    delta = toWorld(anchorPoint) - thisComp.activeCamera.toWorld([0,0,0]);
    radiansToDegrees(Math.atan2(delta[0],delta[2]))

    Darby Edelen

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