change the constraint strength dynamically?

   40309   2   1
User Avatar
Member
19 posts
Joined: 3月 2006
Offline
Hi,

I have mixed of Glue and Spring constraint in bullet sim.
and I want to control Glue strength dynamically instead of delete constraint primitives. because if I deleted the constraint primiteve, both Glue&Spring is going away.
I want to keep the Spring but not for the Glue..

any idea?
Connect the Dots…
User Avatar
Member
8583 posts
Joined: 7月 2007
Offline
so in your constraint solver
to delete just glue constraints put
@constraint_name=Glue
into group field of blast node

to modify strength of the constraint simply add/edit float primitive attribute named strength

to edit strength only on glue constraints combine previous 2 metohds
set that group for node which is modifying strength attribute


alternatively you can do it as a condition in wrangle code, without specifying Group field, mostly if you want to include else branch or multiple conditions

if (s@constraint_name = “Glue”)
{
f@strength = fit($F, 10, 20, 100, 0);
//or do something else with glue constraints
//like
//removeprim(0, @primnum);
}
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
23 posts
Joined: 7月 2015
Offline
Hi All!

I have a building with glue constraint strength mapped along the y axis (+ painted in some spots).

I'd like to change the constraint strength over time to choreograph the structure destruction/collapse. I am keyframing the points of my constraint strength ramp in SOP. How do I pass that info in DOP?

In the constraint network DOP there's the option Overwrite with SOP if time dependent. I don't want an overwrite since this option will restore also broken constraints freezing flying pieces in air.
I'd like to update the strength of “survived” cons.

I'm thinking about a att wrangle in a SOP solver, but im not sure how to set it up.


thanks very much for helping!!


simplified hip file attached

Attachments:
dynamic_glue_strength_question.hip (7.2 MB)

  • Quick Links