Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Reverse 3D conversion

  • Reverse 3D conversion

    Posted by Ryan Hill on November 26, 2009 at 5:01 pm

    Let’s say I’m tracking a point in 2D that’s moving on a flat surface, but that flat surface is angled away from the camera.

    If I have measured a rectangle on that flat surface, the corners are visible in the footage, and the point I’m tracking is within those four corners, how could I calculate the real position of that point?

    Nathan Clark replied 16 years, 4 months ago 3 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    November 26, 2009 at 5:30 pm

    It sounds like you’re looking for something like this:

    L = thisComp.layer(“your tracked layer”);
    L.toWorld(L.motionTracker(“Tracker 1”)(“Track Point 1”).attachPoint)

    Dan

  • Ryan Hill

    November 26, 2009 at 11:17 pm

    I’m not sure I understand? I’ve used toWorld before, but always to convert from 3D layers that I’ve made.

    In this case, say I have footage of something moving along the floor, and I’m tracking it. But that’s just tracking its position as the camera sees it, which is affected by the perspective of where the camera is. And I want to be able to position the point on a 2D map of that floor.

  • Dan Ebberts

    November 26, 2009 at 11:32 pm

    Ah. So you’ve got some 2D footage of a 3D world and you want to transform a point from that 3D world into AE 3D and have it match up, is that right? As far as I know, there’s no way to do that without some 3rd party help, like a camera tracking application.

    Dan

  • Ryan Hill

    November 30, 2009 at 8:59 pm

    Well, it’s converting from 2D to 2D but the conversion depends upon how the two 2D layers are related to one another in 3D space.

    I don’t really know what 3rd-party plugin would be suited for this, but maybe I can figure out the math:
    https://en.wikipedia.org/wiki/Line-plane_intersection
    I can use that math to convert assuming I know the 3D position of the four corners of the bounding rectangle. I might end up matching those corner positions by eye, but maybe that won’t be too hard, especially if I get rough measurements when we shoot.

  • Nathan Clark

    January 2, 2010 at 4:56 am

    Look at Nukes wonderful node called “points to 3D”
    It is exaclty what your trying to do, but in Nuke.
    Maybe someone could port the math to a plug-in for AE.

    On Point Cloud Nine

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy