Blackstarz Posted May 16, 2021 Share Posted May 16, 2021 Hi all , I was trying to assign a specific geo on a specific point id with a copy to point node . I manage to do it randomly but i'm not sure to find how could I really control each point So per example if point id = 0 i want the copy to be a cube if point id = 1 i want the copy to be a sphere etc.. I could just delete each point per id then copy the geo but i was wondering if there was a better way . Thank you IDTEST.hipnc Quote Link to comment Share on other sites More sharing options...
underscoreus Posted May 16, 2021 Share Posted May 16, 2021 This sounds like what the "variant" attribute was made to solve. To set this up just assign an "id" attribute to each of your objects, like all the points on a sphere gets "id" 0 and all the points of the cube get "id" 1. Then assign each of the points you are copying to an "id" attribute with the same name with a value of 0 or 1 (you can of course have more than just 0 and 1, just limited it to these in this example since I only made up two shapes). Lastly, in the copy to points node, just enable the "variant" attribute checkbox and put the name of your "id" attribute in the text field and it should work. One thing with this approach is that this feature was added to houdini in version 18.0 I believe so you'll have to have that version or later for this to work. Looking at your file it looks like you have the older version of the copy to points node which came with Houdini 17.5 and earlier. If you cannot update your houdini you might have to look into either the copy stamp node (not really reccommended as copy stamping is VERY slow) or assigning geometry to points via the "instancepath" attribute. But if you can, I'd just say to update your houdini version. Here is an example made in houdini 18.0.460: IDTEST_mnb.hipnc Quote Link to comment Share on other sites More sharing options...
Blackstarz Posted May 16, 2021 Author Share Posted May 16, 2021 1 hour ago, underscoreus said: This sounds like what the "variant" attribute was made to solve. To set this up just assign an "id" attribute to each of your objects, like all the points on a sphere gets "id" 0 and all the points of the cube get "id" 1. Then assign each of the points you are copying to an "id" attribute with the same name with a value of 0 or 1 (you can of course have more than just 0 and 1, just limited it to these in this example since I only made up two shapes). Lastly, in the copy to points node, just enable the "variant" attribute checkbox and put the name of your "id" attribute in the text field and it should work. One thing with this approach is that this feature was added to houdini in version 18.0 I believe so you'll have to have that version or later for this to work. Looking at your file it looks like you have the older version of the copy to points node which came with Houdini 17.5 and earlier. If you cannot update your houdini you might have to look into either the copy stamp node (not really reccommended as copy stamping is VERY slow) or assigning geometry to points via the "instancepath" attribute. But if you can, I'd just say to update your houdini version. Here is an example made in houdini 18.0.460: IDTEST_mnb.hipnc This is a very great addition to Houdini 18 !! But unfortunately due to pipeline i need to find the way to replicate that in Houdini 17.5 . Yea Copy Stamp is too heavy as for the instancepath this is what i started with . But i was blocked because of the collision once it hit the floor . Due to the fact that it's based on the point not the geo . This is why as back up i was thinking of turning couple of instance in RBD and then have the right collission . Maybe there is a better way to do this Quote Link to comment Share on other sites More sharing options...
underscoreus Posted May 16, 2021 Share Posted May 16, 2021 What you could do is use the instancepath method and then simply add the "instance" node and set the "display as" drop-down to full geometry. That should spawn the full geometry onto your points. Then from there you could pack them and bring them into your sim as an "RBD packed object" or just import the full geo as a normal "RBD object". Quote Link to comment Share on other sites More sharing options...
Blackstarz Posted May 17, 2021 Author Share Posted May 17, 2021 4 hours ago, underscoreus said: What you could do is use the instancepath method and then simply add the "instance" node and set the "display as" drop-down to full geometry. That should spawn the full geometry onto your points. Then from there you could pack them and bring them into your sim as an "RBD packed object" or just import the full geo as a normal "RBD object". Yeap that could work . But i actually found a lil cheat with Apply Houdini Particles IV . Not perfect but will do the job Thank a lot for you input 1 Quote Link to comment Share on other sites More sharing options...
dleonhardt Posted May 17, 2021 Share Posted May 17, 2021 Or you could just use a simple "For-each Point" loop with a Switch that reads the "id" attribute from the current point in the loop. dl_copytopoints_withid.hipnc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.