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

How to get Final Transform value for a 3DLayer after Camera is applied?

New Here ,
Mar 31, 2008 Mar 31, 2008

Copy link to clipboard

Copied

Hi,

I need to export final transform values (position, rotation, scale, etc) from a Layer. I used ProjDumper example to extract the values. But I'm having trouble if the Layer is a 3D Layer and there is a Camera, because the Camera will affect the 3D Layer and hence transform it.

For example, the initial position of a Layer is in the centre of the screen (let say position 100,100). But after I adds a Camera and change the Camera properties, the Layer is seen on the top left on the screen (0,0).

So given a Layer and a Camera, how can I get the final transform values of the Layer? In other words, how can I transform from Composition coordinate to Camera coordinate?

Thanks,

Klarinda
TOPICS
SDK

Views

3.0K

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
Adobe Employee ,
Apr 01, 2008 Apr 01, 2008

Copy link to clipboard

Copied

That depends on your definition of "final". :)

I think you might want AEGP_GetLayerToWorldXformFromView().

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 ,
Apr 01, 2008 Apr 01, 2008

Copy link to clipboard

Copied

Hi Brooce, thanks for the answer.

What I want is to create an exporter that exports position, rotation, scale, etc value of each Footage-type Layer. In 2D Layer, the stream value of each layer is what is displayed on the Composition Panel. But in 3D Layer, the stream value of each layer MAY NOT be what is displayed on the Composition Panel because of the Camera. So I need to get the value (position, rotation, scale, etc) as it is displayed on the Composition Panel => Stream value + Camera = ???

I have tried the AEGP_GetLayerToWorldXformFromView(), but I don't know how to get view_timeP. In the documentation it is said that I need to use AEGP_QueryXformGetViewTime(). But to use this method, I don't have the query_contextH. I tried to put the view_timeP = comp_timeP, but the resulting transform matrix is the same as GetLayerToWorldXform(), which is not affected by camera.

Regards,

Klarinda

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
Adobe Employee ,
Apr 02, 2008 Apr 02, 2008

Copy link to clipboard

Copied

Pick whatever view_timeP you want; the time of you're looking up, or the time of the current keyframe might both be good.

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 ,
Apr 02, 2008 Apr 02, 2008

Copy link to clipboard

Copied

Hi Brooce,

Given the Footage-type 3D Layer A & time T, I've tried the following combinations:
AEGP_GetLayerToWorldXformFromView(A, T, T, transformMatrix)
AEGP_GetLayerToWorldXformFromView(A, 0, T, transformMatrix)
AEGP_GetLayerToWorldXformFromView(A, T, 0, transformMatrix)

but they are all giving the same value as

AEGP_GetLayerToWorldXform(A, T, transformMatrix).

I've tried to change the Camera properties (focal length, zoom, etc) but AEGP_GetLayerToWorldXformFromView always gives the same value regardless of the Camera properties.

I also tried to put in the Camera Layer instead of footage-type Layer to the function, but the result of AEGP_GetLayerToWorldXformFromView is always the same as GetLayerToWorldXform, and the Camera properties doesn't affect the AEGP_GetLayerToWorldXformFromView function.

So my question is, why the AEGP_GetLayerToWorldXformFromView is not affected by Camera and why does it always give same result as AEGP_GetLayerToWorldXform?

Thanks.

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
Adobe Employee ,
Apr 03, 2008 Apr 03, 2008

Copy link to clipboard

Copied

Is the non-camera layer a 3D layer?

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 ,
Apr 03, 2008 Apr 03, 2008

Copy link to clipboard

Copied

LATEST
Yup, it's a 3D Layer.

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