Houdini Engine for Unreal
 All Files Pages
Chaos (GeometryCollections)

Requirements

The Unreal Chaos integration works requires Unreal Engine 4.26 with Chaos integration in order to be compiled. UE 4.26 without Chaos enabled will still generate GeometryCollection components, but will not have Chaos physics enabled.

Houdini to Unreal

This table lists special attributes that can be set in an HDA, and that be recognized and used by the plugin when translating the Houdini data to Unreal outputs.

Attribute Name Owner Type Topic Description
unreal_gc_piece prim int Geometry Collections Specifies the primitive as a GeometryCollection piece. The value represents the clustering level, or 0 to disable this behaviour.
unreal_gc_cluster prim int Fracturing and Clustering Specifies the primitive clustering index, to group multiple pieces of the same level to different groups.
unreal_gc_clustering_damage_threshold detail float[] Geometry Collections Specifies the clustering damage threshold.
unreal_gc_collisions_collision_type detail int Geometry Collections Specifies the collisions collision type. 0 = Implicit-Implicit, 1 = Particle-Implicit.
unreal_gc_collisions_implicit_type detail int Geometry Collections Specifies the collisions implicit type. 0 = None, 1 = Box, 2 = Sphere, 3 = Capsule, 4 = Level Set.
unreal_gc_collisions_min_level_set_resolution detail int Geometry Collections Specifies the collisions min level set resolution.
unreal_gc_collisions_max_level_set_resolution detail int Geometry Collections Specifies the collisions max level set resolution.
unreal_gc_collisions_min_cluster_level_set_resolution detail int Geometry Collections Specifies the collisions min cluster level set resolution.
unreal_gc_collisions_max_cluster_level_set_resolution detail int Geometry Collections Specifies the collisions max cluster level set resolution.
unreal_gc_collisions_collision_object_reduction_percentage detail float Geometry Collections Specifies the collisions collision object reduction percentage.
unreal_gc_collisions_mass_as_density detail int Geometry Collections Sets the collisions mass as density. 0 = unset, 1 = set.
unreal_gc_collisions_mass detail float Geometry Collections Specifies the collisions mass.
unreal_gc_collisions_minimum_mass_clamp detail float Geometry Collections Specifies the collisions minimum mass clamp.
unreal_gc_collisions_collision_particles_fraction detail float Geometry Collections Specifies the collisions collision particles fraction.
unreal_gc_collisions_maximum_collision_particles detail int Geometry Collections Specifies the collisions maximum collision particles.
unreal_gc_name prim, detail string Geometry Collections Specifies the name of the GeometryCollection. Used to differentiate multiple GC outputs.

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

Unreal Engine 5 Attributes

These attributes are specific to Unreal Engine 5. UE5 Allows you to specify multiple "Size Specific Data". In addition, each element of "Size Specific Data" allows you to specify an array of collision shapes.

Attribute Name Owner Type Topic Description
unreal_gc_clustering_cluster_connection_type detail int Geometry Collections Specifies the clustering connection type. 0 = Point implicit, 1 = MinimalSpanningSubsetDelaunayTriangulation, 3 = PointImplicitAugmentedMinimalDelaunay
unreal_gc_collisions_max_size detail float, float[] Geometry Collections The max size of the "Size Specific Data". Required to specify multiple Size Specific Data
unreal_gc_collisions_damage_threshold detail int, int[] Geometry Collections The collision damage threshold for each Size Specific Data.
unreal_gc_collisions_collision_type_X detail int, int[] Geometry Collections Specifies the clustering damage threshold. The _X specifies the index of the size specific data.
unreal_gc_collisions_implicit_type_X detail int, int[] Geometry Collections Specifies the collisions implicit type. 0 = None, 1 = Box, 2 = Sphere, 3 = Capsule, 4 = Level Set. The _X specifies the index of the size specific data.
unreal_gc_collisions_min_level_set_resolution_X detail int, int[] Geometry Collections Specifies the collisions min level set resolution. The _X specifies the index of the size specific data.
unreal_gc_collisions_max_level_set_resolution_X detail int, int[] Geometry Collections Specifies the collisions max level set resolution. The _X specifies the index of the size specific data.
unreal_gc_collisions_min_cluster_level_set_resolution_X detail int, int[] Geometry Collections Specifies the collisions min cluster level set resolution. The _X specifies the index of the size specific data.
unreal_gc_collisions_max_cluster_level_set_resolution_X detail int, int[] Geometry Collections Specifies the collisions max cluster level set resolution. The _X specifies the index of the size specific data.
unreal_gc_collisions_collision_object_reduction_percentage_X detail float, float[] Geometry Collections Specifies the collisions collision object reduction percentage. The _X specifies the index of the size specific data.
unreal_gc_collisions_collision_particles_fraction_X detail float, float[] Geometry Collections Specifies the collisions collision particles fraction. The _X specifies the index of the size specific data.
unreal_gc_collisions_maximum_collision_particles_X detail int, int[] Geometry Collections Specifies the collisions maximum collision particles. The _X specifies the index of the size specific data.
unreal_gc_collisions_collision_margin_fraction_X detail float, float[] Geometry Collections Specifies the collisions margin fraction. The _X specifies the index of the size specific data.

The X in the attributes that contain _X represents the index of the size specific data. Additionally, some of the collision attributes can either be a value or an array of values. An element at index i represents the value for the collision object at index i. A value is identical to a value array of size one with only that value in it for backwards compatibility. If you do not add the _X suffix, then it will be equivalent to index 0.

If you want to have more than one size specific data, then it must be specified using the unreal_gc_collisions_max_size attribute. For instance, the sequence of attributes unreal_gc_collisions_max_size = {1234, 12345} and unreal_gc_collisions_collision_type_1 = {0, 1} means that you have a GeometryCollection with two size specific datas, and the second size specific data has two collision shapes: One with a collision type of Implicit-Implicit, and the other with a collision type of Particle-Implicit.

Unreal to Houdini

All output attributes in the above table are imported into Houdini in addition to the attributes below:

Attribute Name Owner Type Topic Description
unreal_input_gc_name detail string Geometry Collections The path name of the geometry collection.
unreal_actor_path detail string Geometry Collections Path to the actor that contained the input data/should be generated. Only available if Actor is specified as input.
unreal_level_path detail string Geometry Collections Path to the level in which an actor should be generated or which contained the input data. Only available if Actor is specified as input.

Geometry Collections

Geometry collection outputs are generated from packed primitives with a non-zero unreal_gc_piece primitive attribute. It is recommended to use the Voronoi fracture node along with the the unreal_gc_piece attribute for a good balance between speed and results. It is required that the set of all unreal_gc_piece values are sequential. In other words, if there exists a unreal_gc_piece with value X, then there must exist a unreal_gc_piece with value (X - 1).

It is recommended to fracture your geometry in Houdini to the highest "damage threshold" using the Voronoi fracture or any tool of your choosing. Afterwards, apply unreal_gc_piece to each group with a value corresponding to your desired clustering level.

Below is an example of an HDA that takes a cube, fractures it into three different levels, and then outputs it for the Plugin to process.

Unreal_GC_Example_Network.png

This is what is contained within the attribute wrangle of the network:

Unreal_GC_Example_Wrangle.png

This is the result of the HDA:

Unreal_GC_Example_Result.png

Observe that the output contains 3 levels (not including Level 0), as expected.

If your HDA output contains more than one GeometryCollection, then you must add the attribute unreal_gc_name with a unique name for each of your desired GeometryCollections. This will split the GeometryCollections according to the name.

Fracturing and Clustering

In addition to adding manual fractures as done above, you can also use a combination of RBD fracture and RDB cluster nodes. The unreal_gc_cluster is a primitive attribute that Specifies clustering index, to group multiple pieces of the same level to different groups in the GeometryCollection. Full control over the exact GeometryCollection hierarchy is not supported at this time (But is often times not needed).

Below is an example that takes a cube, fractures it using RBD fracture, and then randomly cluster groups of pieces using RBD cluster:

Unreal_GC_Example2_Network.png

The unreal_gc_piece is initialized to 1 in the beginning:

Unreal_GC_Example2_Wrangle1.png

After clustering, update the level of the clustered pieces:

Unreal_GC_Example2_Wrangle2.png

Pack using the "name_gc" (because the name attribute get overwritten by the RBD nodes):

Unreal_GC_Example2_Pack.png

The result is a GeometryCollection with 2 levels, with two clusters of pieces (the pieces in level 2), and two pieces that are not part the cluster (the pieces in level 1):

Unreal_GC_Example2_Result.png