View Full Version : how to use Free-Form Deformation?

07-17-2008, 10:40 AM
how to use Free-Form Deformation?

07-17-2008, 01:00 PM
there is no such thing in OpenGL

07-20-2008, 07:00 AM
With a vertex shader and a high enough tessellated object, it's possible. But it won't work well without a GF8/9, because previous cards are limited in uniform storage or vertex texture fetch.

The simplest version (GF8) would be to build 2 3d textures, one for the rotation and one for the translation part. The rotation part should be stored as quaternion to save space.

Then the vertex position have to be used to fetch a local transform matrix from the two textures. Then transform position and Normal, Tangent and others with that, before the modelview(projection) matrix multiplication.

Unfortunately the linear interpolation won't be ideal, but a higher order filter would require at least 8 times more and 3 for each dimension texture lookups (19 total)
As long the 3d textures don't change, it's not a bad idea, to cache the positions with stream out.