Re: [Algorithms] normals in skeletal animation
Brought to you by:
vexxed72
From: Jeff L. <je...@di...> - 2000-08-13 23:54:33
|
Sounds like you have it right to me. But normals on a deformable mesh are tricky. There is one problem I know of with the technique. It only works for rotational joints. If you are using the bones for animation by translating them, the normals will not be correct since a translation can change local surface without a way to fix the normals. For instance think of using bones in a grid across a planar surface that you want to use to animate it like water. If you translate up one bone, the local surface will change. But nothing in the rotational part of the bone matrix has changed. You would need to fix up the normals by recomputing them. I have not seen any real serious problems with normals when they are only used with a hierarchical skeleton where the bones only rotate. That doesn't mean there are no problems. Linear interpolation of normals and then normalizing the result is probably not perfect. It would be interesting to test the accuracy by generating average normals then deforming a mesh and normals. Then you could compare those normals with ones that you regenerate. I also thought once about converting the normal to a quaternion, rotating, and then slerping between them. That may be more accurate, however, it really has never looked bad enough for me to investigate further. -Jeff At 06:22 PM 8/13/2000 +0300, you wrote: >Hi, > >How to handle normals in skeletal animation? > >Currently I use this way : >After loading model I take first frame and calculate all normals. >Then I use inverted bone matrices to transform normals into >some 'pretransformed' state and store it same as offset vectors >(every vertex has list of pre normals for affected bones) > >At rendering time for every affected bone I transform this >normals using current bone matrix, multiply to the weight, sum it >and normalize. > >In result I get something hm.. :) >In most cases it looks ok but sometimes it looks like some normals >was calculated using incorrect bones. > >In any case I think should be much better way for this. >Can anybody recommend something? > >Thanks >vlad > > > >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |