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

How to get the real position of a camera's target point via expression or scripting?

New Here ,
Sep 27, 2022 Sep 27, 2022

Copy link to clipboard

Copied

I am working on a project about exporting AE animation data to webpage, when I try to get camera parameters. Normally I can get the coordinate of the 'target point' from the camera directly, but when i rotate the camera, the 'target point' keep moving but the parameters not change, how to get the real position of a camera's target point via expression or scripting?

cam.gif

TOPICS
Expressions , Scripting

Views

61

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
LEGEND ,
Sep 27, 2022 Sep 27, 2022

Copy link to clipboard

Copied

Unless you care for a whole lot of complicated math that re-creates the entire logic as expressions, simply use a two-node camera with a separate Null as the target. There's really no good way to go about it since the relevant matrix functions from the API are not avialable in the expressions. Otherwise you'd have to create a nested construct that converts the rotation to a vector and then you can calculate the world position of the point with toWorldVec() and similar with all the potential caveats like angles flipping around after the Euler conversion.

 

Mylenium

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
New Here ,
Sep 28, 2022 Sep 28, 2022

Copy link to clipboard

Copied

Thanks for replying Mylenium!
I am trying to recreate the camera (woth other animated layers) in the web, so I may have to do the calculation. Oh no, math:(

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
Community Expert ,
Sep 29, 2022 Sep 29, 2022

Copy link to clipboard

Copied

LATEST

AE is the wrong tool for creating web-based animations with a camera. You should be using Adobe Autition. 

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