Jump to content

How to assign specific Geo on specific point ID with copy to point Point


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

 

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 

Link to comment
Share on other sites

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".

Link to comment
Share on other sites

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 
image.png.38bada1b2d0ea1c143d564115a8afe99.png

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...