Skip to main content
jonk74258691
Participant
October 22, 2022
Question

3D rotation to 90 degrees

  • October 22, 2022
  • 3 replies
  • 470 views

Here's the issue: I've got a set of six panels, each converted to a 3D layer, which I'm rotating 90 degrees along hinges on the right-hand edges - pretty simple, right? And it works: I've looked at in top-down view, and they're all lining up perfectly parallel. However, the effect I'm looking for (all 6 panels end up edge-on and are no longer visible) simply isn't happening. Here's what it looks like in-comp:

The one on the far left looks the way I want, as far as I can tell, but - perhaps due to the way the 3D output works - the others are visible at a more and more slanted angle; which rather has the effect of ruining what I'm going for. How exactly do I get all 6 to conform to a consistent visual perspective?  I also want to link panels 1 thru 3 and 4 thru 6 and do a split-down-the-middle-concertina-fold in a seperate animation, but if they don't also go properly edge-on (and compress into a single vertical line) when folded up, then it's not going to look right, either.... 

This topic has been closed for replies.

3 replies

Community Expert
October 23, 2022

You are just dealing with parallax and perspective. AE does not have an orthographic camera except in the Custom views. The only problem with that is that Custom Views like Front won't render. They will preview, but they will not render.

 

If you already have the keyframes set up to rotate the layers from 0º to 90º, all you have to do is press Alt/Option + Ctrl/Cmnd + 0 and set the layers to Auto Orient towards the camera. Then go back to the starting position and set the Y rotation to the value that gives you a straight-on view of each layer. 

jonk74258691
Participant
October 23, 2022

Thank you very much, everyone! I figured there'd be a simple solution, and there it is! I shall try those out, and that shall be sorted....

Dan Ebberts
Community Expert
Community Expert
October 22, 2022

Assuming you're just talking about y rotation, and the camera and the 6 layers aren't parented to anything, this y rotation expression should put the layer edge-on to the camera. So you could propably use this as your target y rotation in however you're animating the rotaiton depending on how you have things set up:

c = thisComp.layer("Camera 1");
v1 = c.position - position;
v2 = toWorldVec([1,0,0]);
a = Math.acos(dot(normalize(v1),v2));
radiansToDegrees(a)

 

Mylenium
Legend
October 22, 2022

AE only has a spherical perspective camera. The boards will never perfectly line up even if you use tricks like an extremely long focal length to minimize the curvature. As such you may want to use other methods like scaling the layers to create the illusion or an effect like Card Dance.

 

Mylenium