• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

How to align multiple callout titles?

New Here ,
Feb 14, 2024 Feb 14, 2024

Copy link to clipboard

Copied

Hello, I'm an amateur in After Effects. I need help to align multiple callouts.

I want all callouts to face the camera and align with X,Y and Z axis of the camera. I don't want the callouts to orient towards the camera.

I found an expression (link below) where I can make all callouts face and orient with the camera. But I don't know how to disable the orientation and the expression don't always face (align) the X,Y and Z axis perfectly with camera. Link: https://videolancer.net/3d-layer-orient-to-camera/

Making one callout to face and align with the camera is easy but it gets complicated when handling multiple callouts.
Please help me to find a method or expression to make multiple callouts face the camera and align with X,Y and Z axis of the camera.
I also need an option to enable and disable the callouts to orient towards the camera.

Please check the screenshot below, Thank you and I'm sorry for my bad English.
Screenshot 2024-02-15 024106.png




TOPICS
Error or problem , Expressions , FAQ , How to

Views

188

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2024 Feb 15, 2024

Copy link to clipboard

Copied

LATEST

Each layer will need it's own expression and will angle itself based on the anchor point of the layer.  

This line:

[radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]

lists the three angles.  (not sure if you're saying you want to make a change here.)

Just underneath that:

}catch(err){
value
}

tells AE to use the orientation value if something is messed up.

To control when the expression is running, simplest option is to add a checkbox to the layer then add it to the main expression like this:

if (effect("Checkbox Control")("Checkbox")==1) {
	
try{
L = thisComp.activeCamera;
u = fromWorldVec(L.toWorldVec([1,0,0]));
v = fromWorldVec(L.toWorldVec([0,1,0]));
w = normalize(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 = (sinb < 0 ? -1 : 1)*Math.atan2(u[1],v[1]);
c = 0;
}
[radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]
}catch(err){
value
}
} else {
	value
}

So when the checkbox is checked, run the expression, but if not, use the orientation value.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines