Houdini Engine for Unity
 All Files Pages
Attributes and Groups

Special groups and attributes are used when marshalling data between Houdini and Unity.

Standard Houdini Attributes

Certain standard Houdini attributes are used when marshaling data between Houdini and Unity.

Attribute Name Description
p position
rot rotation
Cd color
Alpha opacity
N normal
uv uv
uv2, uv3 additionnal uv channels
instance For object-level instancing, See Instancing

Houdini to Unity

This table lists special attributes which will be recognized when marshalling data from Houdini to Unity.

Attribute Name Owner Type Topic Description
unity_instance point, detail string Instancing Path in Unity project of an Asset to instance at the given owner transform. Should be relative to the project Assets folder (eg. "Assets/Prefabs/Hero.prefab").
unity_material prim, detail string Materials Path in Unity of a Material asset to apply to a part. Should be relative to the project Assets folder (eg. "Assets/Materials/HeroMat.mat").
unity_tag prim, detail string Unity tag to set for generated GameObjects. Note that tag must already exist in Unity Editor scene.
unity_static prim, detail int Set to 1 to make generated GameObject static, or 0 for non-static.
lod_screensizes detail float arrayMeshes_LOD Transition screensizes for LOD levels (range should be 0 to 1 or 1 to 100).
unity_layer prim, detail string Unity layer to set for generated GameObjects. Note that the layer must already exist in Unity Editor scene.
instance_prefix point, detail string Instancing Prefix to append to instance objects (eg. "City_Instance1" where "City" is the prefix).

Houdini Heightfields to Unity Terrain

The following table lists special attributes which can be set on Heightfields in order to set the corresponding Terrain Layer properties on the generated Unity Terrain.

Attribute Name Owner Type Topic Description
unity_hf_texture_diffuse prim string Heightfield Layers Path in Unity project of a Texture asset to set as the terrain layer's diffuse texture. Relative to project Assets folder (eg. "Assets/Texture/sand.png").
unity_hf_texture_mask prim string Heightfield Layers Path in Unity project of a Texture asset to set as the terrain layer's mask texture. Relative to project Assets folder (eg. "Assets/Texture/sand.png").
unity_hf_texture_normal prim string Heightfield Layers Path in Unity project of a Texture asset to set as the terrain layer's normal texture. Relative to project Assets folder (eg. "Assets/Texture/sand.png").
unity_hf_normal_scale prim float Heightfield Layers Terrain layer's normal scale (float of size 1).
unity_hf_metallic prim float Heightfield Layers Terrain layer's shader's metallic value (float of size 1, with value between 0 and 1).
unity_hf_smoothness prim float Heightfield Layers Terrain layer's shader's smoothness value (float of size 1, with value between 0 and 1).
unity_hf_specular prim float array Heightfield Layers Terrain layer's shader's specular color (float of size 4, with values between 0 and 1).
unity_hf_tile_offset prim float array Heightfield Layers Terrain layer's texture's tile offset (float of size 2).
unity_hf_tile_size prim float array Heightfield Layers Terrain layer's texture's tile size (float of size 2).

Setting up those attributes on your asset will allow you to control and override some properties of the generated Unity geometry.


Unity to Houdini

This table lists special attributes which are created by the plug-in when marshaling data from Unity to Houdini.

Attribute Name Owner Type Topic Description
unity_material prim string Materials Path in Unity of a Material asset to apply to the mesh. Should be relative to the project Assets folder (eg. "Assets/Materials/HeroMat.prefab"). Automatically set when using an input mesh.
unity_input_mesh_name prim string Inputs Name of mesh's owner GameObject. Automatically set when using an input mesh.

These attributes will be available in Houdini when using Inputs to marshall data from Unity to Houdini.

These Standard Houdini Attributes will generally also be available: position (p), vertex colors (Cd, Alpha), normals (N) and UV sets (uv, uv2, uv3).

You can easily see these attributes and their values by debugging the internal Houdini Scene (File > Open Scene In Houdini) after initializing your asset's Inputs.


Groups

Some special group names have naming schemes which specify generation behavior when marshalling data from Houdini to Unity.

Group Name Topic Description
collision_geo_* Colliders Prefix used for collision geometry generation (invisible)
convex_collision_geo_* Colliders Prefix used for convex collision geometry generation (invisible)
rendered_collision_geo_* Colliders Prefix used for visible collision geometry generation
rendered_convex_collision_geo_* Colliders Prefix used for visible collision geometry generation
lod* Level of Detail Prefix used for defining mesh LOD level (e.g. lod0, lod1)

Primitives that belong to collision groups will be separately created as Mesh Collider components and added to the output GameObject. The rendered_collision_geo groups will have MeshRenderer and MeshFilter components as well.