Deform Plane in GameEngine

Hi i making on project using projection to non rectangular surface and need deform picture from in game camera.

Now i have plane with realtime camera texture. I using VideoTexture module.

My problem is broking texture when i move vertex from projected plane…

I need this result :

I need dynamicaly moving with vertex for calibrating projection result. Any Ideas? this is demo app

cursor keys - moving vertex
num 1,2,3,4 change active vertex

I’m not sure, but I think you should check the UV.
If you move the over vertex (upper right) you should get what you want.

I thik UV is correct, problem is on deforming texture, if i use more vertices in plane, all work fine, but more vertices are hard for transforming and deforming in realtime.

in this example is used subsurf, texture working great, but deforming vertices coordinate is not function…

Any idea to get vertice transformation work?

There is no chance to do that with four points. The UV is linear interpolated across the triangle of a face. If you deform the triangle you deform the texture as well. Even in the editor you will not see a different UV mapping.

left: 4-vertices-plane with left deformation - middle: normal plane- right: plane with right deformation.
I think you can easily guess how the quad is assembled from triangles.

Using subsurf will not solve your problem.

Subsurf produces a lot of triangles, by interpolating the vertices between the control points. If you move one control point, all intermediate vertice change its XYZ (but not UV). Dependent on the number of intermediate vertices this seems to smooth out the deformation. But they are all deformed.

By the way, why you would manipulate a single vertex?

You could set up a rigged mesh and use an action to move the vertices for you.
With that you can easily add more vertices with weights behaving similar to subsurf.