8 Replies Latest reply on Aug 2, 2010 11:06 PM by Mylenium

# Units in AE and Z-space

Is there a way to use a metric scale for z-position in AE? I sometimes need this when I have a 3D-tracked scene but don't have a point cloud or any nulls with z-position of the obects in the scene. But I do have the actual distance in meters. Or does AE have any other way of finding the z-position of objects, like the Reconcile3D node in Nuke?

• ###### 1. Re: Units in AE and Z-space

I believe AE numerics are only pixel based. If you have camera data/distance to an object you could maybe work out how many pixels in a metre. I've done something like this along time ago and I think a metre is about 2835 pixels. Hope this helps.

• ###### 2. Re: Units in AE and Z-space

Thank you for your reply. What is the math behind that number?

• ###### 3. Re: Units in AE and Z-space

I think I made a new photoshop canvas at 100cm x (anything) then I went to canvas size then changed the units from cm to pixels and used that figure. It got me around my issue along time ago but I think you have to be aware of pixel aspect i.e. square pixels would make more sense to use.

Cheers

• ###### 4. Re: Units in AE and Z-space

What is the math behind that number?

1inch = 2.75 cm = 72pixels at 72DPI --> 1m = 100 cm/ 2.75cm ~ 36.7inch * 72DPI ~ 2618pixels, give or take some margin of error/ rounding difference.

Mylenium

• ###### 5. Re: Units in AE and Z-space

Great, thank you! Will try it out.

So, is there another way in AE to find the Z-position if you have a camera? I don't know how the thing works in Nuke, but you basically 2d track a point at different times, and then somehow it calculates the 3d position. Anyone?

• ###### 6. Re: Units in AE and Z-space

Doesn't sound conclusive. If it is able to calculate the distance just based on 2 points, it needs to have a reference input elsewhere. Solving the distance otherwise at least requires 3 points - the two track points and one fixed point as reference. Then you can use trigonometry to calculate the sides of the resulting triangles based on the angular difference. Still, mathematically, those values are still ambiguous and need to be normalized using a known measure as input...

Mylenium

• ###### 7. Re: Units in AE and Z-space

Thank you for your reply Mylenium. You basically track (or select) a point three times in different parts. So you end up with values for a point in example 5s, 10s and 15s. Then it somehow calculates the z-position. The way you described it, does that calculation exist in a script or plug-in?

• ###### 8. Re: Units in AE and Z-space

It would be easily possible to assume a planar rotation for a nodal pan and calculate the linear distance between the points simly using length(pointA,pointB) in an expression. Still, as I said, doesn't sound right to me. The values would not reflect the actual distance and you still do not know the correct camera position, so whatever Nuke does, is probably more elaborate than that and a specific part of NukeX' 3D tracking and matchmoving features, building on specific other features.

Mylenium