# Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Turning a 2D corner pin into a 3D perspective layer

• # Turning a 2D corner pin into a 3D perspective layer

6 Members · 8 Posts
• ### Navarro Parker

January 4, 2013 at 6:08 pm

Are there any clever expression tricks to convert a corner pinned 2D layer into a 3D perspective layer (Or at least a close approximation)?

• ### Dan Ebberts

January 4, 2013 at 7:14 pm

I think that might be a bit too much math to bite off for an expression. I would love to be proven wrong though.

Dan

• ### Darby Edelen

January 4, 2013 at 7:45 pm

[Navarro Parker] “Are there any clever expression tricks to convert a corner pinned 2D layer into a 3D perspective layer (Or at least a close approximation)?”

The biggest problem I see with this is that it’s very very easy to create a 2D Corner Pin that does not match any perspective. Assuming that it does match some perspective the challenges then become:

1) defining how near or far away the corner pinned layer is from the ‘camera.’

2) figuring out the parameters of the camera based on (1).

3) determining the scale, position and orientation of the 3D layer based on the corner pin data as well as (1) and (2).

Maybe this is possible, but I have a suspicion that 99 times out of 100 your 2D corner pin will not match any perspective projection. At that point I wouldn’t know how to proceed. I’d assume some sort of heuristic method would work but that’s beyond my pay grade 🙂

Darby Edelen

• ### anil kumar

May 3, 2016 at 1:26 pm

Hi

any progress according to above question or any idea hows that possible or its impossible?
i have same situation i have a scene with plane corner pin which is tracked for mobile screen and i need a 3d null with position, rotation and scale with same screenspace of cornerpin if i attach a solid plane at 3d null.

i search it on internet for along time but can’t find the solution why?
is there nothing solution of this method?
is this impossible in programming?
or no one intrested in this type of question?

thanks…

• ### Kalleheikki Kannisto

May 3, 2016 at 6:23 pm

If you mask the footage so that you can 3D camera track the phone by itself, you can create a camera and 3D position data from it.

• ### anil kumar

May 11, 2016 at 6:14 am

Hi kalle its as easy as you say.

i did it with tracking software but i need that footage data in

transformation x,y,z in value
scale x,y in %

i use that data and convert it according in my software.
that software support only above value in any 3d layer not any cornerpin.

so i convert my cornerpin data to 3d null data or 3d transformation data so i use that in my software to match same screenspace.

thanks

August 24, 2016 at 4:25 pm

Wow, if Dan can’t figure this one out, there is no hope! (-;

Seriously, has anyone come up with a solution for this? I need to match a bunch of 3D text into static shots of a city … there MUST be a way, given 4 points, to calculate the focal length / position of a camera … no??

Maybe some way to use the 3D motion tracker … ?

I just know there is some math out there that would accomplish this.

• ### Kalleheikki Kannisto

August 24, 2016 at 6:23 pm

The mathematical operation is called “decomposing a homography matrix” (no kidding) and it it certainly a complex one.

For some “light” reading, here’s a paper on the matter: https://hal.inria.fr/inria-00174036v3/document

Kalleheikki Kannisto
Senior Graphic Designer

Viewing 1 - 8 of 8 posts