Question about HDAs and outputs in Unity

   871   0   1
User Avatar
Member
10 posts
Joined: Nov. 2018
Offline
I'm working on an HDA where I have a parameter that slices up a mesh a number of times (uses Labs Slice Mesh). I'd like these pieces to come into Unity as separate game objects but I am having a hard time finding a way to set up my network to produce a dynamic number of outputs.

I tried setting up a for loop that iterates over all the pieces and then pipes them into an output node, but unfortunately only one of the pieces ended up in Unity.

Then I tried setting up a series of 50 or so dummy geo nodes, each one with an index parameter that isolates one of the pieces. This method worked to get multiple game objects in Unity, but unfortunately the number of objects is limited to however many geo nodes I set up in the HDA, and I need to do this manually by hand. Ideally I'd like the number of outputs to be driven by a parameter.

I'm wondering if anyone has a better approach for generating multiple outputs from a single HDA.

Alternatively, is there a prim group / attribute name that Unity will recognize to split pieces into separate objects?

Secondly, I am wondering about output naming. It appears that the objects will come into Unity with redundant strings in the name. For example, if the last node in the network is "output0", the object in Unity will be named "geoname_output0_output0_0". Is it possible to set the object name procedurally on the Houdini side?

Thanks!
Edited by davidbk - Sept. 3, 2023 18:53:55
  • Quick Links