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

Anamorphic footage and 3d coordinates in After Effects

New Here ,
May 02, 2023 May 02, 2023

Copy link to clipboard

Copied

Hi! My name is Sergey, I'm a developer at KeenTools.

We are currently struggling with supporting anamorphic footage (pixel aspect != 1.0) in our plugins. 

 

Imagine I have a FullHD composition with pixel aspect == 2.0. It would look like this:

Keen25218870rqhr_0-1683026607732.png


If I create camera it's parameters in pixels doesn't match the composition size (e.g. horizontal is multiplied by pixel aspect)

Keen25218870rqhr_1-1683027119800.png

 


If I create four Nulls with (x, y, 0) coordinates, where x and y are 0 or 100 I would get a rectangle (with width equal to pixel aspect multiplied by height). 

Keen25218870rqhr_2-1683027475924.png


But if I load a 3d model (in AE Beta) it will look OK (not streched). (So streching happens for 3d coordinates of Nulls, but not for 3d point coordinates of imported objects?)

 

My question is this:

How does projection and 3d space positions (coordinates) work with anamorphic composition in After Effects? Where/when does stretching by pixel aspect applies? Does it affect the default camera settings (e.g. maybe zoom==z coordinate is affected)?

To be clear - we want to make sure our idea of how model/view/projection matrices look like is similar to what they actually look like in After Effects. So all the exports we do work as expected.
In other software anamorphic footage only affects projection (streching is happenning there). While 3d coordinates are always uniform and are not affected by pixel aspect. This is not the case for After Effects.

 

TOPICS
SDK

Views

272

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 19, 2023 Sep 19, 2023

Copy link to clipboard

Copied

LATEST

well when dealing with non square, i account for the footage pixel aspect ratio first, and the comp aspect ratio last.
here's the code from my transform method:

void Transform(	double source_axis_x,
		double source_axis_y,
		double position_x,
		double position_y,
		double scale_x,
		double scale_y,
		double angle,
		double sourcePixAR,
		double targetPixAR) {
	//setting identity matrix
	Identity();
	//anchor matrix
	if (source_axis_x || source_axis_y)
		Translate(-source_axis_x, -source_axis_y);
	//scale matrix
	if (scale_x != 1.0 || scale_y != 1.0 || sourcePixAR != 1.0)
		Scale(scale_x * sourcePixAR, scale_y);
	//rotation matrix
	if (angle)
		Rotate(angle);
	//compensating for target pixel aspect ratio
	if (targetPixAR != 1.0)
		Scale(1.0f / targetPixAR, 1);
	//position matrix
	if (position_x || position_y)
		Translate(position_x, position_y);
}

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