modifying constraint

   710   2   0
User Avatar
Member
89 posts
Joined: Feb. 2013
Offline


I attached the hip file. I have an object then apply rbdmaterialfracture and set the constraint strength to very high value so the object stick together. I modify the constraint's color to make some constraint white. Inside the rbdbulletsolver, i add geometry wrangler and modify the constraint's strength to 0 (if the color is white):
if( @Cd.r >0) {
    @strength = 0;
}

It should break on the right part but it's not working . What is wrong ?
Edited by metaclay2 - June 2, 2025 06:30:11

Attachments:
constraint test.hipnc (1.0 MB)

User Avatar
Member
9382 posts
Joined: July 2007
Offline
metaclay2
It should break on the right part but it's not working . What is wrong ?
your setup seems working and @strength is 0 for those constraints

however, even 0 strength Glue constraints need impact to break, since Glue objects are treated as a compound RBD with singular COM therefore there is no strain between pieces of the same glued RBD

if you want them to break immediately you can assign them to broken group
@group_broken = 1;
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
89 posts
Joined: Feb. 2013
Offline
tamte
if you want them to break immediately you can assign them to broken group
@group_broken = 1;

Great, it works now.
I also found another way. I modify the codes by using removeprim() rather than edit the strength attr :

if( @Cd.r >0) {
   removeprim(0, @primnum,1); 
}
Edited by metaclay2 - June 2, 2025 11:47:39
  • Quick Links