Chain RBD Tools

By

Dynamic Chain Links

Chains are used in a wide variety of games and can be created in several different ways. One approach is to build the entire system directly in Unreal Engine, using Niagara as the driving force. You can find an example of that workflow on my Unreal page.

In this section, we’ll take a different approach and look at creating a Houdini Engine tool for art-directing chains. The goal is to build a flexible system that can be used to create chains for cinematics, as well as animated in-game sequences.

In Houdini, meshes consist of points, primitives, vertices, and edges. However, for this tool, it’s simpler to think in terms of curves and points. In this case, we’ll be working primarily with points and curves to achieve the desired result.

We can start with a simple line and add as many points along it as we need.

We can then copy geometry onto those points. We can also copy lines onto the points, and those lines can have their own points as well. This gives us a flexible way to build up the chain structure while maintaining control over its shape and placement.

We can then skin those lines to create a ribbon. We can also drive attributes such as color and opacity across the points, add noise to them, or animate them over time.

This approach is something I use for a wide variety of effects and procedural mesh creation. It will also become important later when we create ribbon-based cables and chains in Unreal, using many of the same principles we’re applying here.

For this example, however, we’re going to use a custom mesh shaped like a chain link. We can then rotate each link and adjust the points so that the links overlap correctly.

With that in place, we now have our basic chain link mesh.

Now, all we need is a skeleton. We can go back to our original line and create a bone at each point. This gives us a simple skeleton that follows the shape of the chain and can be used to drive the links.

All we need to do now is run our line and skeleton through the Vellum Solver.

Here’s a tool that uses essentially the same principles we’ve covered above, but wraps everything up into an HDA with exposed parameters. This allows us to use it as a Houdini Engine tool directly in Unreal.