# Regenerate mesh normals for Free-Form Deformation (FFD)

## Recommended Posts

Hi, I've been playing around with Free-Form deformations (FFD) via bizier curves defining a 3d volume. More or less following several tutorials from here and at Gamasutra. As I learned more about it I decided to start from a simple bezier curve then moved to a bezier surface and finally onto the FFD. In terms of deforming a mesh its working well, but since the source is to be polygon meshes I need to add suport for regenerating normals and this is where i've got stuck. Initially I thought it would be simple as i'd read several documents explaining how to get the normal for a surface, but of course now i'm dealing with deforming a volume. I can understand the principle for a surface, getting two tangental axis via derivitive functions to form the surface normal using a crossproduct, but cannot work out how (or if its possible) to do it for a volume (or rather the deforming mesh within the FFD volume). Can anyone point me in the right direction? I'm sure it must be possible to do this within the FFD code as opposed to using other methods for regeneration of the normals. Essentially then I have 64 control points (4x4x4 grid) and for each vertex in the source mesh I map it first into the range 0.0 - 1.0, then determine the Bernstein basis functions (and in the case of a surface their derivitives). I can use these functions to accurately deform the source mesh, but not determine correct normals. I've tried various combinations based on the generation of normals for a bezier surface, but nothing has come close to working. An alternative would be to use meshes defined as bezier patches, but i've not found much to help with building these models or retireving the patch information from sample models. For example in 3ds max you can export a bezier patch in ASE format, but it doesn't appear to provide enough information as all you get is the following.
*GEOMOBJECT {
*NODE_NAME "QuadPatch01"
*NODE_TM {
*NODE_NAME "QuadPatch01"
*INHERIT_POS 0 0 0
*INHERIT_ROT 0 0 0
*INHERIT_SCL 0 0 0
*TM_ROW0 1.0000	0.0000	0.0000
*TM_ROW1 0.0000	1.0000	0.0000
*TM_ROW2 0.0000	0.0000	1.0000
*TM_ROW3 -14.7601	-12.5461	0.0000
*TM_POS -14.7601	-12.5461	0.0000
*TM_ROTAXIS 0.0000	0.0000	0.0000
*TM_ROTANGLE 0.0000
*TM_SCALE 1.0000	1.0000	1.0000
*TM_SCALEAXIS 0.0000	0.0000	0.0000
*TM_SCALEAXISANG 0.0000
}

If anyone has any advice on how to use this information or perhaps a different format where you can extract bezier patch data i'd appricate any pointers. Thanks

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

## Sign in

Already have an account? Sign in here.

Sign In Now

• ## Partner Spotlight

• ### Forum Statistics

• Total Topics
627654
• Total Posts
2978451

• 10
• 12
• 22
• 13
• 33