Learn how to create a standalone Houdini Digital Asset containing multiple Houdini object (OBJ) nodes inside.


In Houdini

  1. Install, instantiate, and unlock the Instancing_ObjectInstancingByAttribute_Start.hda example in Houdini.
  2. Go inside the Instancing_ObjectInstancingByAttribute1 node in the network editor.
  3. Note the lovely yellow_starfish and blue_starfish OBJ nodes. These will be our two variations of instanced starfish.
  4. Click on the instance1 OBJ node and in its parameters note that Instance > Point Instancing is set to Full point instancing. This is important.
  5. Back in the network editor, go inside the instance1 node by double-clicking on it.
  6. Here we simply have a grid1 on which we scatter1 some points, and then we create a string point attribute with attribcreate1, called instance, and set it to the relative path of the yellow starfish.
  7. The instance attribute is a special attribute that tells the Instance OBJ node what objects to instance on which points.
  8. Let's instance the blue starfish on 1 in 5 of the points.
  9. Hit Tab, type group, and press Enter twice. Connect attribcreate1 to group1's first input and set the Group Name to blue_starfish, Entity to Points, Number > Operation to Group by Range, and finally, Number > Select of to 1 and 5.
  10. Create another Attribute Create SOP as above, connect the group1 node to it, then set it's Group parameter to blue_starfish, Name to instance, Type to String, and String to ../../blue_starfish.
  11. Set the blue display flag on attribcreate2.
  12. With attribcreate2 selected, in the Scene View pane, go to the Geometry Spreadsheet tab, and make sure Points are selected at the top of the window to see the instance attribute values on each point.
  13. Switch back to the Scene View and go back out of instance1 to see your starfish army.
  14. Save the asset via the top-menu Assets > Save Asset > Instancing_ObjectInstancingByAttribute.


In Unity

  1. Go to Houdini Engine > Load Houdini Asset... and find your Instancing_ObjectInstancingByAttribute_Start.hda asset.
  2. You should see your starfish army in the Scene view.
  3. If you expand the Instancing_ObjectInstancingByAttribute1 > instance1 object in the Hierarchy, you'll see a bunch of (Clone) objects for the instanced starfish.


In UE4

  1. Right-click in the Content Browser and select Import to...
  2. Find your Instancing_ObjectInstancingByAttribute_Start.hda and import it.
  3. Drag it from the Content Browser to the Viewport.
  4. You should see a bunch of starfish hanging out.

CREATED BY

SIDEFX

For over thirty five years, SideFX has been providing artists with procedural 3D animation and visual effects tools designed to create the highest-quality cinematic results. We are passionate about what our customers do because our roots are in production, both as artists and as pioneering technical innovators.

More from SideFX

COMMENTS

  • ipavlin 6 years, 11 months ago  | 

    The video is the same as for for Instancing by Parameter

  • chekboom 6 years, 7 months ago  | 

    Hi!

    Is it possible to have a random scale per instance?
    I managed to have random rotation per instance by randomly orienting the points normals, but I'm stuck for scale:
    I added a pscale attribute to the points with random values, it works fine in Houdini but not in UE4.

    Thanks for your help and these great tutorials!
    Alex

  • chekboom 6 years, 7 months ago  | 

    Nevermind, pscale is working fine :)

Please log in to leave a comment.