Houdini Engine 1.9
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Overview

What is Houdini Engine

Houdini Engine allows Houdini technology to be integrated into any application. It is an API that allows Houdini digital assets to be used directly inside of the host application. By doing so, Houdini Engine 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 designed for binary compatibility, so that 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 .Net), as well as a native C++ applications.

Finally, Houdini Engine is easy to learn - it's a thin API that can be easily picked up by anyone with a reasonable background in 3D programming.

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 assets 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, directly inside of the host application.

The basic abstraction inside of Houdini Engine currently consists of four levels: assets, objects, geos, and parts.

At the highest level we have the assets. Assets have an interface which you can query and set in the form of parameters. Assets contain input and output connections that are classified by the type of data. Each asset will have one or more objects.

The objects that an asset contains have a one to one correspondence with object nodes inside of Houdini. For those unfamiliar with Houdini, you can think of an object as a specialized transform that has custom properties (for example those representing a light) in addition to the standard T, R, S properties of a transform. For Houdini Engine's purposes, all transforms associated with Houdini Engine objects are global transforms. Houdini Engine objects contain one or more geos.

For those familiar with Houdini, geos have a one to one correspondence with SOP nodes inside of Houdini. If you're unfamiliar with Houdini, you can simply think of a geo as just that - an exposed piece of geometry that has vertices, faces, normals, and meta-data. Because geometries in Houdini can contain multiple primitive types (volumes, curves, mesh) as well as muliple groups, we split Houdini Engine goes into parts. We creat one part per group and if a group contains more than one primitive type, each primitive in said group gets its own part.

Below is a diagram illustrating these concepts:

HAPI_Overview_Diagram.jpg

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, retrieving an asset id in the process.
  3. Query and display the parameters of the asset.
  4. Query the objects, including their transforms and number of geos.
  5. Query the geos, including the number of parts each geo parents.
  6. Query the parts, retrieving vertices, faces, and normals to be displayed.
  7. Query the inputs of the asset, if any. Present UI to allow other assets to connect to this asset.
  8. Push parameter and input changes back to the Engine to be processed.
  9. Retrieve updated asset, object, geo, and part information as required.
  10. Cleanup assets when they are no longer needed.
  11. Cleanup Houdini Engine when done.