On this page

Overview

Houdini Engine for Unity supports generating Unity meshes as output geometry, as well as uploading Unity meshes to Houdini as input geometry.

Input

By using Node Inputs or Object Path Input Parameter, Unity mesh geometry can be marshalled into Houdini. Assigned materials can be saved as primitive attributes with material paths, which will survive the roundtrip when exporting the same geometry back out to Unity.

Output

The geometry output of a Houdini asset is usually a Unity Mesh, stored on a MeshFilter or MeshCollider.

An asset usually contains Objects, which in turn contain Geos, which contain Parts. This structure dictates how Unity meshes are generated.

  • Object (OBJ) nodes are Houdini’s transform nodes. They contain other OBJ nodes or geometry (SOP) nodes.

  • Geo (SOP) nodes are Houdini’s geometry container nodes. They do not contain geometry directly, rather they contain Parts.

  • Parts contain the actual geometry and attribute data that is used to generate meshes.

Typically all geometry in a Part will be generated as a single mesh. Only collision groups or LOD groups can be used to split up the geometry into separate meshes. Other groups will be either combined into a single mesh, or if LOD groups are present, the those other geometry are ignored.

Note that, by default, meshes will be generated using split vertices (i.e. each triangle will have unique vertices). This can be changed to using Points (shared vertices) by enabling Generate Mesh Using Points checkbox in the ASSET OPTIONS section.

Triangles and Quads

By default, the plugin always generates meshes with Triangle topology, even if the geometry Connectivity is set to Quadrilaterals. Instead, Quad topology meshes can be generated by doing the following:

  1. In Plugin Settings, under the GEOMETRY section, change the Max Vertices Per Primitive to 4.

  2. Make sure the geometry Connectivity is set to Quadrilaterals or make sure that the geometry has all quads.

  3. Recook the HDA. It should produce quad topology meshes.

Notes:

  • Even when quad topology is used, Unity will display the wireframe of the mesh with triangles. To query the mesh topology, select the GameObject, then go to menu HoudiniEngine ▸ Utility ▸ Query Mesh Topology. The vertex count will also be lower than with triangles.

  • Mixing topology in the same mesh (i.e. triangles and quads) is not supported, and will result in error. If mixed topology is required, then you must split the mesh.

  • Max Vertices Per Primitive in Plugin Settings must be either 3 or 4. When set to 3, it will always generate triangles. When set to 4, it will generate triangles or quads depending on the connectivity.

Readable Meshes

By default, the plugin will generate non-readable meshes. Yet readable meshes can be generated by specifying the integer attribute named unity_mesh_readable with a value of 1.

Meshes