Jump to content
mahdi_d

merging multiple constraints in DOP

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

Share this post


Link to post
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 1

Share this post


Link to post
Share on other sites

Hey Mahdi,

I strongly suggest you take a look at Steven Knipping's videos.

The first one is free. 

And the second isn't but it really has all the answers you're looking for if ever you have a few bucks to spend.

 

Cheers!

 

  • Like 2

Share this post


Link to post
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 .. :)

Share this post


Link to post
Share on other sites

Hey Mark - just wanted to say thanks for posting your file. I had the same issue and seeing your node network helped me figure out the problem. 

Share this post


Link to post
Share on other sites

Tried to replicate it in Houdini 17.5. DOP can't recognize any of my constraints, even if I'm giving different names to fractured objects. What I'm doing wrong?

multiconsnetwork.hipnc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×