View Full Version : Morphing
10-12-2009, 02:20 AM
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
10-12-2009, 02:24 AM
"into a polygon" - just one polygon, right?? It's going to be a bumpy ride.
10-12-2009, 03:00 AM
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!
10-12-2009, 05:20 AM
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
gl_Fragment=texture2D(deltaTex, actualTexcoord + (deltaTexcoord*someFactor));
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.