Jump to content

merging multiple constraints in DOP


mahdi_d

Recommended Posts

hi everyone, i'm trying to do something like having multiple RBD objects with constraints setup through one Single constraints setup withing a DOP .. i am still newbie in houdini and have no idea about the logic behind it.. put me in the right direction .. what is the approach to get this working? what i have done was i copied the nodes in the DOPS including RBD objects, bullet solver, constraint network and wired them back to the original merge that flows to the output and RBDs are there but constraints are not working and there is certainly problems with the names and should not the be solution .. do i have to do the node copies in the geometry level ? .. hope to have made myself clear .. thank you in advance for any help .. :)

Link to comment
Share on other sites

For multiple RBD packed objects, you need to make sure all pieces have a unique name inside the sim.


Say I want to use a fractured box and a fractured sphere in the same sim:


I fracture a box with voronoi and pack with an assemble node, the name attribute will be piece0, piece1... etc. I do the same with a sphere, but that also gives me piece0, piece1... etc. in the name attribute. Having duplicate name attribute values in the RBD sim will not work as we expect. You'll have to rename the pieces using the sprintf function like so:

s@name = sprintf("box_piece%d", @ptnum);

 

From there you can make your constraint networks, and give each object's constraints a unique name e.g 'sphere_constraints' and 'box_constraints'. You can merge the constraint networks in SOPs for a neater DOP network, but it's not necessary.


I have attached a file for you :)

multiple_rbds_with_constraints.hip

Edited by markingleukc
  • Like 1
  • Thanks 2
Link to comment
Share on other sites

On 12/26/2017 at 9:31 PM, markingleukc said:

For multiple RBD packed objects, you need to make sure all pieces have a unique name inside the sim.


Say I want to use a fractured box and a fractured sphere in the same sim:


I fracture a box with voronoi and pack with an assemble node, the name attribute will be piece0, piece1... etc. I do the same with a sphere, but that also gives me piece0, piece1... etc. in the name attribute. Having duplicate name attribute values in the RBD sim will not work as we expect. You'll have to rename the pieces using the sprintf function like so:


s@name = sprintf("box_piece%d", @ptnum);

 

From there you can make your constraint networks, and give each object's constraints a unique name e.g 'sphere_constraints' and 'box_constraints'. You can merge the constraint networks in SOPs for a neater DOP network, but it's not necessary.


I have attached a file for you :)

multiple_rbds_with_constraints.hip

thank you so much for great explanation .. :)

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...
  • 1 year later...

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