Houdini to Unity Character Rigging Experience

General / 23 July 2019

Quick bio experience:  I work mainly as a lead technical artist making procedural tools, environments, terrains, assets and shaders. I started out rigging in Lightwave, then I switched to Maya and Softimage. Maya was my rigging package for many years, last year I started experimenting with Houdini. Houdini 16.5 was released and I have been trying to learn as much as I can with Houdini.

We use a Houdini pipeline for almost everything. This includes rigging and character animation from Houdini to Unreal. While this is not popular, we chose this route due to the teams familiarity of using Houdini. In our pipeline, Houdini is used for layout, modeling, rigging, character animation and fx. Everything is then exported to Unity3D game engine.

Some intro notes: 

SideFX Houdini (https://www.sidefx.com/) is a bone based system. What does this mean? Here is a great write up of Bones vs Joints from Sidefx docs. - https://www.sidefx.com/docs/houdini/character/bonesvsjoints.html 

A lot of this info, I learned from the SideFX Rigging videos. Michale Goldfarb from SideFX has produced an excellent Rigging Series tutorials. This is mainly for Film and not game development. With a little bit of work, the rig you create can be used for Unreal or even Unity3D.  https://www.sidefx.com/learn/collections/rigging-series/. Understanding what you need to bring into the game engine helps as well. 

 Here is an image of my initial Rig.

Your Rig needs to be parented to each other in Unreal. This eliminates the possible use of any Parent Blends. These were setup for the Arms, Hands, Neck, Legs and Feet. Since the Bones are not physically parented to each other, the game engine will not recognize this relationship. I disabled the Constraints and connected the Bone Roots to the proper connections. When the rig is imported into Unity and you try to configure Bones as a Humanoid character, you will see that the rig stays disconnected when selecting Mapping-Enforce T-Pose. When it is connected, the Rig will snap to a T-Pose.  Parenting the bones to the proper bone will fix this error. This connected the rig correctly in Unity with minimal errors. Additional errors are in the hands. The metacarpal bone connections had to be disabled. The connection starting from the tip of the finger, went Distal, Intermediate Proximal and then Hand bone.

This brought the hand in with only one error. This error is the Thumb. The Thumb setup in Houdini only has a Distal, Proximal, Metacarpal and then Hand. This will need to be remapped in Unity. 

To get the reverse foot rig working in Houdini, there is a script that goes into the rx or RotX channel. It is an if else statement. Here is the expression:

if (ch("../R_foot_roll") <=5.0) {
return (fit ( ch("../R_foot_roll"), 0, 5, 0, 60) + fit( ch("../R_ball_offset"), 0, 10, 0, 60) );
else if (ch("../R_foot_roll") >=5.0) {
return ( fit ( ch("../R_foot_roll"), 5, 10, 60, 0) + fit( ch("../R_ball_offset"), 0, 10, 0, 60) ) ;

This will get the Reverse Foot Rig working properly. 

This is my Spine Mapping when the rig is initially brought in to Unity.

Here is the initial rig when it is brought in to Unity. The Chest and UpperChest are not mapped correctly. Spine_bone3 and Spine_bone4 are mapped  should be replaced with spine_bone5 and spine_bone6 for the proper mapping. Here is an image of the proper mapping. 

Here is the before and after re-mapping for the thumb in Unity. The before re-mapping shows the L_hand_meta_root in place of the Thumb Proximal. 

Remapping the bones in Unity gives you this now. 

The character will still give you errors in the T-Pose. There is also some weighting issues that Unity handles differently. 

Re-select the Pose -> Enforce T-Pose in the window and those errors will go away. 

No more errors!


Weighting a character is Bi-Harmonic, Iterations 1. Unity doesn't like anything besides an iteration of 1. I tried additional Iterations, and when it is imported into Unity, the weights disappear. I used the Capture Geometry shelf tool, which brought gives you several options.  Here are my settings. 

I was able to select individual bones using the Shift-Z menu in the Network View. 

Here you can create different selection groups and easily pick them when needed. 

Here is an image of our facial rig.

Next post: Facial Rig and the Take system in Houdini.