Advertisement Jump to content
Sign in to follow this  

Regenerate mesh normals for Free-Form Deformation (FFD)

This topic is 4938 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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.
	*NODE_NAME "QuadPatch01"
		*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
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

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!