Curve Twist Deformer

Since my last experiment involved curves, I decided to attempt another curve node. This time a twist deformer, using the curve as central axis for the twisting mesh. I was going to try and build a matrix for each point along the closest point on the curve, but I came to realize this was over-complicating things for what I was trying to accomplish. Instead I enlisted the help of  MQuaternion and used it to rotate around the tangent of the closest point. I decided that I’d add a ramp to control the amount of twist based off of distance from the curve, and once I saw how that reacted I decided to add a couple more based on the parameter. The end result is that you can control which areas of the curve cause the most deformation, and even the width of the deformation. Here’s some sample videos and part of the compute statement:

(more…)

Hair Curve Deformer

I was sick for a couple days this week and decided to create a instancer/deformer plugin for maya. I’ve based this on the maya hair system, at first I got it functioning with one hair and one instance object, which was not too difficult. I drive the deformation by building a new transformation matrix for each point of the instance object, based on the relative height on the hair curve and the tangents of where it was birthed on the mesh. This keeps it from twisting relative to the mesh during complex motions. After I proved this could work I put together a polygon duplicator, I was expecting there to be a button for this, there isn’t. Instead I had to have the plugin record all the data maya uses to create a mesh from scratch, re-append the data as I built each instance and then create the mesh after all my calculations were done. Although this sucked, I had to do something similar last month to rebuild meshes in mental ray so it wasn’t so bad. Here’s a sample video:

 (more…)