Houdini Engine 5.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

What is Houdini Engine

Houdini Engine is an API that enables Houdini digital assets to be used directly inside of the host application. This allows artists to leverage the power of Houdini directly inside of whichever environment they are most comfortable working in.

From a technical point of view, Houdini Engine is a C API designed for binary compatibility. It is able to integrate into a host application even if compiler choice or versions don't match. For instance, Houdini Engine can integrate into both managed environments, such as C#, as well as a native C++ applications.

Finally, Houdini Engine is a flat and small API that is easy to learn.

Overall Architecture

Houdini Engine employs the C ABI (Application Binary Interface), essentially a set of C functions. This interface was chosen with binary compatibility in mind. It operates based on handles which are integer ids mapping to nodes and other objects it has created on the user's behalf. When the Engine is instantiated inside a host application, it creates a full session of Houdini, complete with a scene and node network.

Houdini Engine operates primarly on the nodes themselves, very similar to Houdini proper. To instantiate an asset you install the asset library (.otl/.hda) and then you create the node. When you create nodes you get back their node id which becomes your handle to the new node. With this id, you can query the node's child nodes, its parameters, connect it to other nodes, or delete it. You can see if this is an OBJ node, get the child OBJ nodes, get their display geometry (SOP) nodes, and finally fetch the geometry information.

The basic tasks for a programmer integrating Houdini Engine into a host application is thus the following:

  1. Initialize Houdini Engine.
  2. Instantiate an asset node, retrieving node id in the process.
  3. Query and display the parameters of the asset node.
  4. Query the object nodes (if any), including their transforms.
  5. Query the display geometry nodes inside each object, including the number of parts each geo contains.
  6. Query the parts, retrieving vertices, faces, and normals, among other things, to be displayed.
  7. Query the OP node path parameters on the asset node and any native node inputs, if any. Present UI to allow other nodes to be connected to this node.
  8. Push parameter changes back to Houdini Engine.
  9. Cook the node.
  10. Retrieve updated node and part information as required.
  11. Cleanup asset nodes when they are no longer needed.
  12. Cleanup Houdini Engine when done.