Activity › Forums › Adobe After Effects › Reverse camera and null designation
-
Reverse camera and null designation
Posted by Stephen Mendenhall on May 12, 2015 at 6:13 pmI’m having trouble wrapping my head around this one. Perhaps someone out there can help me.
– in AE, I have a camera rotating around a null. The null stays in the center of the screen and appears as though it is rotating. It was created this way because of a C4D export.
– I need the null to have the exact same rotation/movement, but independent of the animated camera, and viewed by a static camera.
– I thought I remembered a technique of parenting positions/anchor points and reversing them. Or something like that, but I just can’t figure it out.
Any help would be greatly appreciated!
Stephen Mendenhall replied 10 years, 11 months ago 2 Members · 8 Replies -
8 Replies
-
Walter Soyka
May 13, 2015 at 1:18 am[Stephen Mendenhall] “I need the null to have the exact same rotation/movement, but independent of the animated camera, and viewed by a static camera.”
Maybe try an expression like this on the Orientation property of the null you need to rotate, referring to the moving camera:
lookAt(thisLayer.toWorld(thisLayer.anchorPoint), thisComp.layer("Camera 1").toWorld([0,0,0]));Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn] -
Stephen Mendenhall
May 13, 2015 at 2:52 pmThis is great. I thought it might use the toWorld expression.
What would be the best way to invert this? It works, but just rotating in the wrong direction. -
Walter Soyka
May 13, 2015 at 5:00 pmOh, goodness, I’m sorry — I was thinking about this totally wrong.
Here’s an expression I lifted some time ago from the inimitable Dan Ebberts. Make sure you set the first two lines to use your null and animated camera.
L = thisComp.layer("Null 1");
C = thisComp.layer("Camera 1");
u = C.fromWorldVec(L.toWorldVec([1,0,0]));
v = C.fromWorldVec(L.toWorldVec([0,1,0]));
w = C.fromWorldVec(L.toWorldVec([0,0,1]));sinb = clamp(w[0],-1,1);
b = Math.asin(sinb);
cosb = Math.cos(b);
if (Math.abs(cosb) > .0005){
c = -Math.atan2(v[0],u[0]);
a = -Math.atan2(w[1],w[2]);
}else{
a = Math.atan2(u[1],v[1]);
c = 0;
}xValue=Math.round(radiansToDegrees(a));
yValue=Math.round(radiansToDegrees(b));
zValue=Math.round(radiansToDegrees(c));[(xValue),(yValue),(zValue)]
Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn] -
Stephen Mendenhall
May 13, 2015 at 5:17 pmThank you so much for your help with this!
The rotation now works great, but the timing is a little off. The null starts late and finishes early. Would it be helpful if I provided the AE file?
8832_testanimation.aep.zip
Thanks again! -
Walter Soyka
May 13, 2015 at 5:49 pmLet’s back up a moment. What are you ultimately looking to accomplish?
Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn] -
Stephen Mendenhall
May 13, 2015 at 6:06 pmThanks for your quick response!
Maybe I should have started with a little more detail. I apologize. In fact, after describing the needs of the project, you may have an entirely different and better approach.
-I have a certain animation (image sequence) rendered out from C4D. The camera and null honor an object in that sequence.
-The null is intended as a placeholder for text that will appear/animate around the object.
-This entire composition (which is 96fps) will be nested into another composition (set at 24fps). The reason for the frame rate difference is because I want to be able to time remap the sequence animation as needed without needing to blend frames.
-I want the null/text place holder to be a parent for an identical null within the 24fps comp. That way (the thought being) when I time remap the nested comp, the null in the new comp will honor the time remap. That way the text animation itself won’t be time remapped. Just the relative position/rotation.
-In the past, I would just control all of the time ramping within C4D, but this project requires a little more fluidity, and I would like to control it in AE.I hope this all made sense 🙂
Thanks. -
Walter Soyka
May 13, 2015 at 6:25 pmThere’s a much easier way! We’ll just sync up the keyframe values with the time-remapping.
1. Enable and keyframe Time Remapping on the 1_96fps layer in your 2_24fps_conversion comp.
2. Copy your Camera.2 and Null Data layers from 1_96fps into 2_24fps_conversion.
3. For each keyframed property on the camera, alt+click the stopwatch and enter the following expression:
valueAtTime(thisComp.layer("1_96fps").timeRemap)4. Shift+parent your text animation to the copied Null Data layer inside 2_24fps_conversion.
Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn]
Reply to this Discussion! Login or Sign Up