Skip to main content
Inspiring
May 11, 2022
Answered

How To Center Anchor Point On 3D Text - Possible ?

  • May 11, 2022
  • 2 replies
  • 1510 views

Hello and good morning,

I do a lot of fun little spinning 3D text, ( simple rotation on the X axis )

Method: - I type out the text, turn it into a 3D layer, add an extrusion on it, and a little bevel. That's it.

I cannot see a way to automatically move the anchor point to the exact middle of that text

so that it rotates correctly ( centered ) ... currently, I hit the "A" button to bring up anchor, then

spin the 3D text around so I can see the top of it, and then manually move the anchor point so the arrows

"look right"  There must be a way to auto-do this.  If there is, I'd love to know the secret ! Thanks so much for your help !

 

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

You can add this expression to Anchor Point. It will correct for Base Line shift and paragraph justification. It will throw an error unless the Rendering Engine is set to C4D.

txtBox = thisLayer.sourceRectAtTime();

xLeft = txtBox.left;
yTop = txtBox.top;
yHeight = txtBox.height / 2;
xWidth = txtBox.width / 2;
x = xWidth + xLeft;
y = yHeight + yTop;
z = geometryOption.extrusionDepth * .5;

[x, y, z]

If you want the Z position of the Anchor point to be on the front surface or work with the Classic 3D renderer change the z variable to z = 0;

2 replies

Rick GerardCommunity ExpertCorrect answer
Community Expert
May 11, 2022

You can add this expression to Anchor Point. It will correct for Base Line shift and paragraph justification. It will throw an error unless the Rendering Engine is set to C4D.

txtBox = thisLayer.sourceRectAtTime();

xLeft = txtBox.left;
yTop = txtBox.top;
yHeight = txtBox.height / 2;
xWidth = txtBox.width / 2;
x = xWidth + xLeft;
y = yHeight + yTop;
z = geometryOption.extrusionDepth * .5;

[x, y, z]

If you want the Z position of the Anchor point to be on the front surface or work with the Classic 3D renderer change the z variable to z = 0;

Inspiring
May 11, 2022

Wow, Rick, uh.. what can I say ?

I just tried this, and it works !  It works well !

It's perfect ! I just tried it on a test 3d text that is rotating and it's flawless,

I could not get it more centered by hand. Thank you. ... yeah I appreciate your help !

Mylenium
Legend
May 11, 2022

In theory a sourceRectAtTime() expression expanded with figuring in the extrusion depth might do the trick, but generally anything to do with fonts and that 3D stuff has caveats because what you see on screen does not necessarily represent the abstract exact values you may need for these calculations. Anyway, you can easily find a ton sourceRectAtTime() tutorials that explain its uses, so perhaps give that a whirl.

 

Mylenium

Inspiring
May 11, 2022

Thanks for helping !