Transform zone to square

Hello dear Blenderers.

I have a basic plane, with a camera NOT in front of it.
For projection mapping purpose, I have to make this deformed plane square back in my final render.

I tried to play with MapUv or Movie Plane deformation. But all I get is a more deformed output.
For now it’s a plane, but I intend to make animations of it, so I’d like to make this operation with the compositor if possible.

Does anyone have any idea how to accomplish that?

Thanks

It is hard to understand what you have now, and what you want ti to look like? Could you attach an image to demonstrate the problem?

Sorry.

Here’s what I’m trying to accomplish.

Transform from this :


To this :


I’m aware of quality loss with deformations but I can work around this.

If you want to distort an image that you already have (a photo or render) then you could distort using the plane node (set it up in the tacker) or by using the corner pin distort node. But that requires you to input numbers for each corner.

Alternatively you could map the image onto a an image plane in 3D view and distort the mesh in edit mode.

Be warned that you wont be able to make a perspective render look like an orthogonal view as you have in the example above. There are simply to many vanishing points to correct.

Thanks for the reply but that I plan to do this on images I’m rendering, so currently don’t have.

I was wondering if adding the uv pass on renderlayers, it would be possible to tweak these to achieve this?

If you are rendering them why not just change the camera type to orthographic?

One way to do this is to create a script that calculates the plane corner coordinates in screen space and creates keyframes for Cornerpin node in compositor.

Rendering out the UV coords of plane and then doing the distortion based on these is also an option. You could, I think, calculate the needed distortion based on the difference of UV image and screen space UV-s.