Houdini 20.0 Unreal Meshes

Create procedural collision with procedural assets

On this page

This covers how to setup procedural collision to work with a procedural asset. The Houdini setup uses the For Each LOP node to create a sequential suffix allowing you to create collision for multiple geometries while still keeping the power of procedural collision.

Copy over the HDA file

Before you begin, copy the Houdini HDA file that you will be working with throughout this workflow:

  1. Open a file browser window and then navigate to your Houdini Engine install directory.

  2. In the install directory, navigate to the \Plugins\HoudiniEngine\Content\Examples\hda folder.

  3. In the \hda folder, copy the HEUE_Geometry_Fence.hda file.

  4. Navigate to your user directory and then create a new folder named \ProceduralCollision.

  5. In the \ProceduralCollision working folder, paste the HDA file.

  6. Run Houdini.

  7. Open the HEUE_Geometry_Fence.hda workflow file and become familiar with its contents.

Inspect Houdini setup (optional)

The following sections inspects how the content example was created and a few important setups before going into Unreal. You can skip to the Import to Unreal section to see the Unreal setup.

Collision setup for fence planks

  1. Double-click LMB the geo1 to enter into Geometry view. Then double-click LMB hece_geometry_fence1 to enter the Surface Operator network view.

  2. Double-click LMB the Collision subnetwork. You can now see the setup to generate a material.

  3. Locate the Blast SOP node named blast1 not"planks. This is the start of the sequence to extract the planks and create a procedural collision piece.

Collision attributes setup for multiple geomtries

This setup requires an extra step because the fence posts are multiple geometries. For multiple geometries, the name group must have a sequential suffix after the collision attributes. For example the first collision is collision_geo_simple_1, and second is collision_geo_simple_2. See Collision from multiple geometries for more information.

  • Locate the Merge SOP node named merge3. This merges the two collisions from the planks and posts into one to allow for a single export.

  • Followed is a For Each Connected Piece LOP sequence with a Group SOP to add the collision attributes. See Looping in geometry networks for more information on how For Each LOPs works.

  • Select the Group SOP node named group2.

    • In the Group Name parameter with the primitive:

    collision_geo_simple_box_`detail("../foreach_begin2_metadata1", "iteration", 0)
    
    • The collision_geo_simple_box represents the Unreal attribute needed to generate this type of collision.

    • The detail("../foreach_begin2_metadata1", "iteration", 0) represents the detail attribute to create an iteration of a numbered sequence for the collision. This ensures each piece is named in the sequential suffix needed for multiple geometries.

Promote parameters for export

  1. RMB the hece_geometry_fence1 and select Type Properties. Locate the Parameters tab.

  2. On the Existing Parameters section, you can see all the promoted parameters that will carry forward into Unreal.

    • In the Collision folder, you can see the following:

      • The Enable Collision parameter allows you to set if a collision is generated

      • The two Collision Padding allows you to create additional collision padding to the fence panel or fence post if you require it.

Import into Unreal

Make sure you have a Houdini Engine for Unreal session running. See Session for more information.

  1. In Unreal, import the hece_geometry_fence HDA.

  2. RMB the HDA and select Instantiate at the origin.

    • You should now see the fence in the viewport.

Change Houdini parameters

During the Houdini setup, certain parameters were promoted to use them in Unreal.

  1. In Houdini Parameters detail panel, locate the Mesh tab.

  2. Select the checkbox for Export Fence Full.

  3. In the Design tab, change some of the parameters for your fence.

  4. In the Collision tab, select the checkbox for Enable Collision.

Bake into actor

  1. In the Houdini Engine panel, select Bake.

  2. In the Viewport, locate the Show tab and select the checkbox for collision.

    • You should now see your altered fence model with its matching collision.

  3. Select the hece_geometry_fence HDA again.

  4. In the Collision tab, change the Collision Padding Panel and Collision Padding Posts to 0.2.

  5. Select Bake.

    • Your fence’s panels now have additional padding in its collision.

See also

Meshes