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

3D Camera Matrix SDK Help

Engaged ,
Nov 25, 2021 Nov 25, 2021

Hi gang;

 

I am coding a relatively simple plugin with basic particle effects. At the moment, I have sliders that can rotate my around my particles but I would like to use the After Effects 3D camera since that's what it's for.

 

I have gone through the Resizer project and I have successfully pulled the camera and light info. I also carefully read through this thread as well: https://community.adobe.com/t5/after-effects-discussions/glator-for-dummies-and-from-dummy/m-p/69303...

 

I see that using the camera matrix, I can pull the camera X, Y and Z coordinates using:

 

matrix.mat[3][0];
matrix.mat[3][1];
matrix.mat[3][2];

 

I can't find anywhere in the documentation how to pull the remaninig info, like orientation. If I follow the GLater example, it suggests orientation would be:

 

matrix.mat[0][1];
matrix.mat[1][1];
matrix.mat[2][1];

 

But that returns floating point data.

 

Additionally, taking a look at the camera target, the GLater examples show:

 

matrix.mat[2][0];
matrix.mat[2][1];
matrix.mat[2][2];

 

But that too returns floating point data.

 

So my issue is two-fold: how to I get the remaining camera info, and more importantly, once I have it, how do I use it such as to adapt it to work with a 3D point in space?

 

It is a shame Adobe erased so many valuable forum threads that probably showed some great examples on how to use the camera. I searched the documentation and I can't even find a description anywhere on what camera matrix corresponds to what.

 

Can anyone help here? I realize it is a loaded question but seeing as how there is no relevant help anywhere else, a good reply (ideally with some example source code) would no doubt help a lot of other developers also trying to understand how to use the 3D camera in the SDK.

 

Thanks!

-Richard

TOPICS
SDK
235
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
Community Expert ,
Nov 25, 2021 Nov 25, 2021
LATEST

start with AEGP_GetEffectCameraMatrix, and then create the perspective matrix from the camera's FOV and concat with the camera transformation matrix.

https://ae-plugins.docsforadobe.dev/artisans/artisan-data-types.html?highlight=film%20size#film-size

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