« Posts tagged 2014

[R&D] nHair Chain Strand Rig Part 2 of 2

This post is a continuation of my last post here (http://www NULL.terrymatthes NULL.com/maya/animation/maya-nhair-chain-strand-rig/). In the first post I explained that I was trying to create a strand of chain that was dynamic, but pinned at both ends like a strand of Christmas garland. At the time I wasn’t able to find any information on how to pin the loose end of the chain to an anchor pertaining to nHair. All tutorials I read/viewed were to do with the legacy hair system whose constraints don’t work on nHair curves. Well I’m here to report that I’ve found the solution I needed.

When working with nHair you need to make sure any objects you want it to interact with can also be seen by the nucleus solver. For my purposes this meant turning the polygon object representing my anchor at the end of my chain into a nMesh passive object. Once my polygon anchor was converted it could be used for a “component to component” nConstraint. I constrained the last CV in my dynamic hair curve to a vertex on my polygon anchor. Everything works great now and I can move either end of the rig around and it affects the chain as it should.

Time for bed *yawn*… well maybe a couple episodes of Full Metal Alchemist first. Damn you Netflix!

 

 

[R&D] nHair Chain Strand Rig Part 1 of 2

Rigging… It’s not my favorite aspect of 3D, but that’s probably because It’s also my least practiced. What better way to learn though than to jump right into nHair and IK Splines, right :D ? My end goal with this rig is to have several strands of chain that are strewn across a mirror ball attached at several points, think of garland on a Christmas tree if you need a visual. As always to start I researched how this could be accomplished in Maya. Every tutorial I read/watched mentioned IK splines and Maya’s hair system.

It took me the entire morning, but I was eventually able to produce a chain strand constrained on a single end. The biggest problem I ran into was constraining the far end of the chain to an object. Literally all the tutorials out there are using the old Maya hair System. With the copy of Maya I currently have (2014) you are forced into using Maya’s “nHair” system and the “n” stands for “Nucleus”. Nucleus if you’ve never heard of it is Maya’s new dynamic simulation system that unifies all your dynamic elements so they can operate in conjunction with each other. It’s Very similar to how Side Effect Software’s program Houdini works. So great, “yay”, everything works together, but all the constraints mentioned in the tutorials I watched are based on the old hair system and they do not work with nucleus hair. So this is as far as I have gotten today, and It will probably take another half day to find the proper type of constraint that acts in the same way a “stick” constraint does with legacy hair.

There are plenty of scripts out there that will do this task for you, but I try to avoid scripts when learning. I that find that; (A) it’s essentially letting someone else do the work for you which means you didn’t actually learn anything and (B) depending on how the script works, it could have unintended consequences immediately or down the road. For those of you who have never created anything like this before and are looking for answers here are the steps I used to create the rig and as always don’t be afraid to ask questions :)

  1. Model a chain link and then duplicate it over and over to create whatever length of strand you need.
  2. Use the joint tool to create a joint chain all the way down your strand putting a joint between each place where the pieces of chain meet up.
  3. One by one starting with the top chain link and the top joint use the rigid bind tool to bind each link to its corresponding joint. In the rigid bind options make sure you have the “Bind to: Selected joints” option activated.
  4. Draw an EP curve down the length of the chain adding a point over each of the joints you previously created. Press to “P” key to activate pivot snapping and your points will automatically center on the joints. Rename this curve something like “epc_original”.
  5. Make your curve a dynamic nHair curve through the nDynamics > nHair menu. You need to first make sure that the only option in the “Make Selected Curves Dynamic” option box that is selected is “Attach curves to selected surface”. This will now create a hair system and follicle system in your outliner.
  6. The last step is creating the IK spline and this is where most people make a mistake because they select the wrong curve. In the Animation > Skeleton menu select the option box for the “IK Spline Handle Tool”. Make sure the only option selected is “Root on curve”. With the tool active click in this order… the first joint of your joint chain then the last joint on your joint chain and now open your outliner and hold down ctrl(PC) or cmnd(Mac) and select the curve under the “hairSystem1OutputCurves” node. An IK node should now appear in your outliner.
  7. Lastly select the original curve and parent it to whatever piece of geometry you’d like to constrain the top of the chain to. Now if you use the interactive playback feature and drag that geometry around your chain will follow.

As soon as I figure out how to constrain the other end of the chain with nHair I’ll post an update, and if anyone figures it out before I do then please let me know. Bye for now :)

 

UPDATE!

Part 2 : The rig gets completed with moveable anchors at both ends. (http://www NULL.terrymatthes NULL.com/maya/animation/nhair-chain-strand-rig-part-2-of-2/)