Animation Extractor
Houdini HDA to detect rigid objects from an Alembic file and extract the animation into the object level.
Under construction!
Overview
To practice making a digital asset and using Python with Houdini, I made a HDA that extracts the transformations of objects in an Alembic file and turns them into efficient collision objects for simulations.
An Alembic file is efficient for storing detailed 3D animation as baked geometric results. It stores pre-calculated geometry data like vertex positions, and sometimes this can include hundreds or thousands of pieces that move frame-by-frame.
While this makes Alembics efficient and interchangeable across different platforms, using an Alembic for collision simulations becomes very computationally expensive. This tool identifies pieces of geometry with the same transformation (translation + rotation) in an Alembic file and extracts that transformation to the object-level. Instead of dealing with a full complex deforming mesh, we have rigid bodies with simple transformations instead. This is much more efficient for collisions in DOPs, Houdini’s engine for simulating rigid body interactions.
The repo for this HDA is stored here.
Rigid Body Detection
In the first step, I create a Houdini digital asset to procedurally divide an Alembic file into parts based on the transformations of the geometry. I do this by extracting the packedfulltransform
matrix of each primitive, turning the orientation into a quaternion, and counting how many different orientations there are.
For instance, in this helicopter animation, the three components with distinct transformations are the main body, the main rotor, and the rear rotor.

Animation Extractor
In the next step, I create an HDA extract_anim
to run a callback to a Python script which first object merges an Alembic, and then divides it into separate parts which share the same transformation.

DOP Network Import
The HDA also automates importing the separate parts as collision objects into DOPs. To do this, simply pass in the relative path of a target DOP node.
