Skip to main content
Inspiring
September 7, 2022
Answered

Auto point on the selected layer

  • September 7, 2022
  • 2 replies
  • 273 views

Hello! 

I was interested in the question, is it possible to make my camera in the After Effect (not the Camera layer) automatically point to the layer I selected?

That is, I selected the layer, pressed the hot key and immediately saw my selected layer in the preview

Thanks in advance!

This topic has been closed for replies.
Correct answer Rick Gerard

If you have positioned a 3D layer outside of the camera view and you have a one-node camera, you can use a vector math expression to point the camera at the layer by using lookAt(fromPoint, toPoint). If you have a two-node camera, you can reveal the camera's point of interest by pressing the A key, then reveal the Position property of the layer you want to look at, then show the Parent/Link column (Shift + F4) and drag the pickwhip from the Camera's point of interest to the target layer's position.

 

Another option would be to use an expression to point the camera at a 3D null, then Shift + Parent the null to any 3D layer, then release the Parent to get the camera to point at the 3D layer.

 

There is no automated way to get a camera to point to a 3D layer without an expression or without resetting the camera and the 3D layer's position. Using the Shift + Parent then release is the closest thing I can think of to get a camera to point at another layer. I use a null on the Point of Interest or as a lookAt target all the time.

 

Here are the expressions:

 

// For a 2-Node camera Point of interest
thisComp.layer("3D Null").transform.position

// For a one node camera orientation
lookAt(position, thisComp.layer("3D Null").position)

 

All you have to do is make the Null 3D and name it 3D Null for this to work. I use both all the time.

 

2 replies

Rick GerardCommunity ExpertCorrect answer
Community Expert
September 7, 2022

If you have positioned a 3D layer outside of the camera view and you have a one-node camera, you can use a vector math expression to point the camera at the layer by using lookAt(fromPoint, toPoint). If you have a two-node camera, you can reveal the camera's point of interest by pressing the A key, then reveal the Position property of the layer you want to look at, then show the Parent/Link column (Shift + F4) and drag the pickwhip from the Camera's point of interest to the target layer's position.

 

Another option would be to use an expression to point the camera at a 3D null, then Shift + Parent the null to any 3D layer, then release the Parent to get the camera to point at the 3D layer.

 

There is no automated way to get a camera to point to a 3D layer without an expression or without resetting the camera and the 3D layer's position. Using the Shift + Parent then release is the closest thing I can think of to get a camera to point at another layer. I use a null on the Point of Interest or as a lookAt target all the time.

 

Here are the expressions:

 

// For a 2-Node camera Point of interest
thisComp.layer("3D Null").transform.position

// For a one node camera orientation
lookAt(position, thisComp.layer("3D Null").position)

 

All you have to do is make the Null 3D and name it 3D Null for this to work. I use both all the time.

 

Mathias Moehl
Community Expert
Community Expert
September 7, 2022

After Effects is not designed as a software to work with live video sources and it has no built-in features for something like that. If you can find a way to save a screenshot of your camera with a terminal command, you could write a script that creates the screenshot, imports the image in Ae and inserts it in the active comp (or replaces the footage of the selected layer by this new image). But this requires programming knowledge.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects