Linking/Parenting Cameras in Different Comps?

Hey folks, quick question for the expressionists, I wondered if it was possible to parent cameras in different comps? Ideally I’d animate a camera using a null and then parent the second camera in the different comp to the null as well. I could always copy/paste the camera/null into the new comp but just trying to save time, see what I’m doing on the fly and have a more organised workflow…
Any advice/suggestions would be great :slight_smile:

Do like this. Make second camera a child to a null too. Let’s call it a child null.

in the comp in which is the child null(you want to control this with other null), select that child null and use these expresions:

apply to childs position:

comp(“Your comp where is parrent null”).layer(“Parrent null”).transform.position

apply to childs orientation:

comp(“Your comp where is parrent null”).layer(“Parrent null”).transform.orientation


Camera 1>null 1

Camera 2>null 2

then null2>null1

control the null1 to control both cameras.

That’s great cyzer, thank you!

Or… do this.

Make an unparented camera in the new comp, make sure it has no point of interest (i.e. a one node camera) and stick this in its orientation…

CL = comp("original comp").layer("original camera");

getGlobal Orientation(CL, time);

function getGlobalOrientation(aLayer, aTime) {
C = aLayer;
aTime = (aTime ? aTime : time);
ghi=normalize(C.toWorldVec([1,0,0], aTime));
def=normalize(C.toWorldVec([0,1,0], aTime));
abc=normalize(C.toWorldVec([0,0,1], aTime));
A=abc[0];B=abc[1];C=abc[2]; D=def[0];E=def[1];F=def[2]; G=ghi[0];H=ghi[1];I=ghi[2];
return([OrX, OrY, OrZ]);

Then wham this in the position…

CL = comp("original comp").layer("original camera"); CL.toWorld([0,0,0]);

sorry, the spacing’s a bit all over the place, you can’t have code with formatting in forum posts, apparently.

Don’t worry too much about what the first expression’s doing. I’ll do a tut about this at some point. It’s a function that converts an After Effects world vector to an orientation. Should be built into AE really, but it’s not.

This is a bit more robust than Cyzer’s, because you can unparent the original cam, reparent it, parent the parent and so on. Basically, you can do whatever you want with the original cam and the secondary cam will always follow it perfectly, because it’s following its global “world position”. On the flip side, the expressions are much more complicated… so use whichever you feel most comfortable with.


Thanks for this too Felt, will try out both and see how I get on. Wish I had a better grasp on expressions though, as they appear to be crucial in making animations feel really unique, and such a time-saver in other ways too…
Are there any websites you’d recommend with expression-based tutorials? :slight_smile:

edit: actually I’ll link these in the essential resources too.


Awesome! thank you very much felt_tips I just used this in a new project and no problems.