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

Layer Space Transforms and Size

Explorer ,
Jan 05, 2011 Jan 05, 2011

Hi,

I have a 2D layer following a 3D layer using toComp in an expression, and its working really well. However, when the 3D layer gets closer to the camera, it appears as if its bigger, and I'd like the 2D layer's actual size to match the 3D layer's apparant size. Is it posible to do this in an expression? Thanks,

--Saib

TOPICS
Expressions
1.0K
Translate
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

correct answers 1 Correct answer

Community Expert , Jan 08, 2011 Jan 08, 2011

There is more than one possible answer to your question, depending on what you're doing. For example, if your 3D layer always faces the camera, a scale expression like this should work:

L = thisComp.layer("my3DLayer");
p1 = L.toComp([0,0,0]);
p2 = L.toComp([L.width,0,0]);
d = length(p1,p2);
value*d/L.width

Dan

Translate
Community Expert ,
Jan 08, 2011 Jan 08, 2011

There is more than one possible answer to your question, depending on what you're doing. For example, if your 3D layer always faces the camera, a scale expression like this should work:

L = thisComp.layer("my3DLayer");
p1 = L.toComp([0,0,0]);
p2 = L.toComp([L.width,0,0]);
d = length(p1,p2);
value*d/L.width

Dan

Translate
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
Explorer ,
Jan 09, 2011 Jan 09, 2011
LATEST

That worked wonderfully! Thank you so much!

Translate
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