I've tried and failed for a while now. That's why I'm looking for help here.
I have a super simple setup. A fractured cube - fractured using rbd material fracture.
I use the rbd Bullet Solver SOP to let the fractured cube fall onto a ground plane and shatter.
Now I simply want to access all the pieces that had their constraint broken and remove said piece. Is there a simple way I can achieve that using a geo- or pop wrangle or similar?
My problem seems to be accessing the constraint information for each piece/point, and checking the state of the constraint.
A nod in the right direction would be much appreciated.
Cheers!
RBD Bullet Solver || Deleting pieces with broken constraints
2676 4 1-
- Jaervi
- Member
- 8 posts
- Joined: Feb. 2020
- Offline
-
- tamte
- Member
- 9130 posts
- Joined: July 2007
- Online
it's relatively simple, but to avoid too much code, you have to do 2 things (it's possible to do all in 1 wrangle with more code if needed)
1. delete broken constraints (as they are not removed by default during sim)
- Bullet Solver SOP/Contraints/1/
Constraint Names: Glue
Use VEX Snippet: On
2. check if the current piece has any constraints left and if not delete:
- add POP Wrangle inside of Bullet Solver SOP
- set Inputs/Input2/DOP Data: ConstraintGeometry
1. delete broken constraints (as they are not removed by default during sim)
- Bullet Solver SOP/Contraints/1/
Constraint Names: Glue
Use VEX Snippet: On
if (@group_broken) removeprim(0, @primnum, 1);
2. check if the current piece has any constraints left and if not delete:
- add POP Wrangle inside of Bullet Solver SOP
- set Inputs/Input2/DOP Data: ConstraintGeometry
int pt = nametopoint(1, s@name); if (pt == -1) removepoint(0, @ptnum, 1);
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- Jaervi
- Member
- 8 posts
- Joined: Feb. 2020
- Offline
Thank you tamte! That was very helpful.
I managed to do it in Houdini 19 and achieved the effect I'm after.
Using a Geowrangler running over the ConstraintGeometry, I removed the detached Constraints.
Then using a Popwrangle I deleted the points/pieces without a corresponding Constraint.
Changing the Houdini version from 18 to 19 did the trick. Somehow in 18, I cannot access the ContraintGeometry using the DOP Data Input.

In 19, as soon as I check "Use this Object's Data", I can access the Attributes on the ConstraintGeometry.

In 18, that does not seem to work and there is no checkmark available. What am I missing?
I still work primarily in Houdini 18 so getting this setup to work there, would be quite helpful.
Cheers
I managed to do it in Houdini 19 and achieved the effect I'm after.
Using a Geowrangler running over the ConstraintGeometry, I removed the detached Constraints.
if (@group_broken){ removeprim(0, @primnum, 1); }
Then using a Popwrangle I deleted the points/pieces without a corresponding Constraint.
int pt = nametopoint(1, s@name); if (pt == -1){ removepoint(0, @ptnum, 1); }
Changing the Houdini version from 18 to 19 did the trick. Somehow in 18, I cannot access the ContraintGeometry using the DOP Data Input.
In 19, as soon as I check "Use this Object's Data", I can access the Attributes on the ConstraintGeometry.
In 18, that does not seem to work and there is no checkmark available. What am I missing?
I still work primarily in Houdini 18 so getting this setup to work there, would be quite helpful.
Cheers
-
- tamte
- Member
- 9130 posts
- Joined: July 2007
- Online
-
- Jaervi
- Member
- 8 posts
- Joined: Feb. 2020
- Offline
-
- Quick Links