I learned how to rig in Maya, but I wanted to give rigging in Houdini a shot. I ended up doing a human character rig and animation, and through that process I came to the conclusion that Houdini has some nice rigging tools that are hampered by a frankly confusing and difficult to use interface. In fact, I would go so far to say that if Houdini's rigging interface were better I would prefer to rig in Houdini as there's something appealing and intuitive to being able to see your rig and relationships laid out in a big network that looks vaguely like the thing you're rigging. Over the course of my education, I scripted a python-based toolset for rigging in Maya that made it quick create joints based on locators, create controls, set constraints, rename large numbers of objects, and set colors. If I can port that interface over to Houdini, that would make the entire rigging process significantly less painful.
As is implied by the title of this post, this tool is incomplete. However I wanted to breakdown what I have so far and highlight some of the differences between the two rigging systems.
I've broken down the controls into a number of different sections. First is a node renamer. Second is a locator creator, third is the bone chain creator, and fourth is the control creator.
The node renamer does exactly what you expect. You make a selection of nodes, then under the new name field you type in your new name with a # substituted for the number. For example, if I had a selection of three nodes that I wanted to rename L_Arm_Ctrl_01, L_Arm_Ctrl_02, and L_Arm_Ctrl_03, I would select them in the order I want them renamed, enter L_Arm_Ctrl_# as the new name, and set the number padding to 2. Straightforward, simple, but can be a time-saver when dealing with larger rigs.
Admittedly, the section of code that actually handles renaming is pretty inelegant. However, it currently works to an accuracy that I doubt I'll ever have to work outside of (you won't catch me working on a rig with more than 9999 bones), so I'll come back and refactor that section after the rest of the tool is working.
The Locator creator creates nulls at the centers of geometry selections. This makes it easy to create bone roots at the centers of shoulders, elbows, knees, etc. I haven't quite gotten to implementing this system yet, as I'm currently focusing on the bone chain creator. I'm still investigating the best way to reference geometry selections at the point and edge level.
The Bone Chain creator takes a set of locators, and creates bones on all but the last, the last locator being the end point of the final bone. This section has been much more complex to implement in Houdini that it was in Maya, and there are a few reasons for that. The biggest one is that, at least in my mind, it is preferable to initialize bones in their correct orientation in Houdini. Maya's "bones" are merely UI elements that indicate hierarchy, as a Maya rig's base unit is a joint rather than a bone. There are benefits and detriments to each style of rigging, but that is outside of the scope of this post. Maya has useful tools for setting joint orientations, typically done after creation of the joint hierarchy. In Houdini, orientation is visualized as a property of the bone, which itself is an object. Bones have one axis that is wider than the other, and that is the axis you want to bend along. Setting parent relationships can completely change orientations if you're not careful, and so in my mind it is preferable to kill two birds with one stone and get the orientation right the first time, if you can help it. This section is getting close to viable, what I'm currently missing is the ability to recolor bone chains, the ability to freeze bones in place when parenting, and while orientations are perfect when chains are formed on axis planes, there can be issues when they're not. These are my next areas of focus in the development of this tool.
The last section is the control creator, which is meant to create null controls between their respective bones. I have yet to do more than basic framework laying in this section, as I feel that getting over the remaining hurdles on the joint creator is not only higher priority from a functionality standpoint, but the solutions to the remaining problems on that tool are the same solutions needed to quickly set up the control generator.
The sub-tools laid out previously, I feel, are the minimum tools required to make this a viable product. That said, I do intend to take this tool further over time. The ability to create IK chains and functional RK/IKFK Blend systems from this interface will save me further time while rigging. Another valuable tool would be one that allowed for the easy creation of a customized general interface for the rig. What that looks like in practice, I'm not entirely sure yet, however I will be doing some interface mock-up in the meantime.
All in all, this has been a pleasant and deeply informative project work on. Already, I am thinking of further tools I can create to enhance my pipeline. I anticipate that I will have a fully working version of this tool in the weeks to come, mainly determined by how much free time I find myself with. I'll be sure to make a follow-up post when that happens.