Unlimited inputs - Houdini Digital Asset

   6841   1   1
User Avatar
Member
10 posts
Joined: Jan. 2018
Offline
I've been working on a lightning generator for some time now. Basically, points are scattered on objects, points of the same indexes are connected with lines, and the lines are displaced.

I recently found out that my asset works no matter how many object inputs I plug into it. Originally, I had two objects, a source and a target - but now I'd like to set it up so it operates like a chain of objects.

I'm wondering if there is a way to incorporate a button in the asset which creates a new object input and somehow link that to the sub-network through which the points are scattered on the object.
User Avatar
Member
65 posts
Joined: March 2017
Offline
Hi,

You can setup unlimited inputs by doing the following :
- In the minInputs of your hda, put 1. In the maxInputs, put a very high number (999 for example). The inputs in the hda node should now be a solid bar, not individual inputs (like the merge node for example).
- inside your hda, create a for loop set of nodes (create the meta import node too).
- In the repeat_end1 node :
- iterations would be an expression : opninputs('../').
- Make sure the Gather Method is “Merge iterations”.
- Create a Object_Merge Node that you connect to the first input of the repeat_end1.
- In the Object1 field put this expression : `opinputpath('..',detail('../repeat_begin1_metadata1/','iteration',0))`

There might be other ways, but this is working fine for me, so it should work for you too !

Cheers,

Julien
VFX Supervisor @ MPC London
  • Quick Links