1) At about 11 minutes of that Andrew tut, Cool 3D room, Andrew uses a pickwhipped expression to make sure the Camera’s Focus Distance is the same as the distance from the text. I changed the name of the layer to “hummingbird”. Here’s the expression:
length(thisComp.layer(“hummingbird”).transform.position,transform.position)
If you’re on an older version of AE, like me on AE6.5, the syntax is:
length(thisComp.layer(“hummingbird”).position,position)
2) OK, if you don’t want the camera to be glued (focus wise) to the hummingbird from the get-go, start with a camera, no expression added, then down the timeline, add a new camera where you want the hummingbird to be focused on, with the expression on that camera. Just make sure that camera is on top, it will then be the active camera. You can cut it off (Alt ] ) when you want the expression camera to quit. The only trouble is, if you move the camera in between, they be an abrupt jump when you switch cameras.
3) Here’s a better solution from Filip (link below). You can ease the camera from it’s original vale (like when it had no expression) into the expression, by putting this expression on the Camera’s Focus Point. First you need to add a Null (Layer>New>Null Object, name it Controller (hit Enter and rename it “Controller”), Add a Slider (Effect>Expression Controls>Slider Control, then name it “interpolate” (select the Slider, hit Enter, rename). Add the expression to the Camera’s Focus Distance :
a=value;
b=length(thisComp.layer(“hummingbird”).position,position);
c=thisComp.layer(“Controller”).effect(“interpolate”)(“Slider”);
linear(c,0,100,a,b);
This is just a linear interpolation from a (the camera’s position values at that time) to Andrew’s expression. So you need to set keyframes on that Slider named interpolate. At 0 there will only be the camera value(like no expression) and at 100, it will be all expression. Halfway between the two keyframes will be half camera value and half expression influence. Pretty cool, thanks Filip! It’s modified from here:
https://forums.creativecow.net/readpost/227/7515
If you have that newer syntax, change line 2 to this:
b=(“hummingbird”).transform.position,transform.position);
This should do what you want.