Morphing

I’m using the SimpleOpenGLControl with visual basic 2005 and i need to morph a patient face. I’m loading an image of a pacient face into a polygon. What i need is to allow the user to select a part of the image an Strech or shring, using the mouse, a part of the face, like for instance, the shin, mouth, nose,…
Does anyone have a clue about how this can be made? Can you give me any references, please?

My thanks in advanced

“into a polygon” - just one polygon, right?? It’s going to be a bumpy ride.

yes, its just one. But if you know any other way arround, at least i’m interested to know. Maybe i can do something with it!

two ways of doing :

  1. deform a fine mesh plane : problems with extreme distorsions
  2. use a texture to hold delta texcoord values : somewhat harder to implement, but much higher quality

implementation quidelines for 2)

  • the brush will modify values inside the delta texture (either by render to texture or glTexSubImage cpu uploads)
  • the fragment shader will access the source texture (“pacient face”) through an offset retrieved from delta texture

deltaTexcoord+=texture2D(deltaTex,actualTexcoord);
gl_Fragment=texture2D(deltaTex, actualTexcoord + (deltaTexcoord*someFactor));