Feathers Deformation
Author : Edy Susanto
Feathers is always an interesting topic to discuss. This article covers more on the rigid deformation that is handled inside the feather system that I built. I hope that it can give a better idea to everyone about how the system works.The system actually requires simple only math knowledge on vectors and quaternion for calculation. The idea here is to create a controlable polygon base feathers mesh from a source feather mesh on a polygon mesh skin.
Growing the feather
To get a predictable result, it's recommended that the feather is build from an ordered skin polygon mesh. This is to avoid the large amount of time we'll have to spend reorienting the generated feather. (I've wrote a tool for reordering polygon mesh which can be downloaded here)

The image above shows a 4x4 ordered polygon grid. Using an ordered mesh skin, deciding where to grow the feather and where the feather will be orienting is realatively easy process and looking at the image above, we can see that the aim is simply the next row neighbor of the feather vertex.
So at this moment we already got 2 valuable information those are, where to place the feather (the position information) and where the feather is aiming (the aim vector).

The red arrow represent the aim vector which is mentioned earlier while the green arrow is the upvector of the current polygon surface. The cross product of the two vectors provide us with another vector which is now sufficient to define a 3D rotation of the feather.
Using the rotation information and the position information of the feather, we can now construct and distribute the feather. And the feather scale is just another extra parameter for the user to play with.
Quaternion Slerp Intro
Quaternion was first introduced by Sir William Rowan Hamilton in 19th centuries which is a powerful way to represent 3D rotation noted with algebraic form :
q = [ s + x i + y j + z k ]
These quadruple stores the information of a 3x3 rotation matrix :

where
Spherical linear interpolation (slerp) is an interpolation between two quaternions along the radius of a circle with linear gradation on angle ratio. t is the interpolation weight between the two quaternions which is ranged from 0 to 1.

Controling the Feather
To animate the feathers, we need to add a control object or so caled the control feather that can represent and control a group of feathers. The controller influence area can be determined easily with weight painting. There are also other alternatives but I find the flexibility of painting the influence weight is the best for the current task.
With the weight provided and the XSI powerful math library, we can easily blend the rotations of each control feather to the feather geometry.
The image above shows how the smooth blending on the control feather weight results a smooth feather rotation gradation from one control to another.
Some notes

It's a good practice to keep the object count as minimum as possible for better performance. Less objects also saves user from headache on integration between two feather setup and managing the objects.
Polygon surface can become handy compared to NURBS surface because it can be merged and can be manipulated easily. The image above shows the feathers on the Passer Montanus bird I created which is actually using only 3 feather set up. 1 for the main body (blue), 1 for the wing (yellow), and 1 for the leg (red). All those feathers are "instanced" from a single feather source.
Fold Animation
Fly Animation
Conclusion
The system is currently working but it's still potential for lots of improvement. The method mentioned above is just one of many alternatives to instance and controls the feathers with all the adventages and limitations.
|