Assign a switch input to a point ID

   512   2   0
User Avatar
Member
2 posts
Joined: 6月 2024
Offline
Hello!

I'm currently on a Houdini project in which i want to create a building. The building consist on different flats, and I want to be able to select different flat types and apply any of them to the different flat positions.
My idea was to create a line of points and set the different flats with a switch node, and then assign the switch input I want to the point I want, but I have really no idea how to do that. I've tried to create an attribute wrangle in which I can select the point ID I want, but then I don't know how to assign a switch input to this point ID.
Anyone has any idea? Thanks a lot!

Attachments:
Problem_01.PNG (457.6 KB)

User Avatar
Member
53 posts
Joined: 4月 2013
Offline
You're very close, there is no reason for a switch node in this case when using "copy to points" as it has an in built
parameter called "piece attribute" which can be used to say essentially "what" should I copy onto this point.

Also there is no need to pack the geometry as again using this "copy to points" node has packing built into its functionality.

Attachments:
CopyToPoints.hipnc (94.4 KB)

User Avatar
Member
2 posts
Joined: 6月 2024
Offline
Thanks! I've now tried that, however it is not exactly what I want. This assigns random positions for every object depending on the attribute, right? What I really want to do is to be able to specify which point has which geometry (for example, I want point 1 to have "box1", point 2 to have "tube1", and point 3 to have "box1" again). Plus, I want to be able to change on the fly the geometry put in every point. Any way to do it? thanks again!
  • Quick Links