Jump to content

Change Constraint Strength query (help required)


karlp

Recommended Posts

Hi all, 

I'm trying to understand how to manipulate the constraint strength so I can art direct a simulation.

Figured setting the strength in a group in a SOP Solver on the Constraint Network was the way... but can't get a simple example working.

Simple test attached... idea was strength reduced if the constraints are within the bounding box of the group... figure it might be that the constraints aren't moving in the SOP solver, although with my test it changes the values immediately even not in the group.. so getting lost.

Any advice/help/direction, very much appreciate.

Constraint_Strength_Test.hipnc

Link to comment
Share on other sites

Usually you want to do this kind of thing in SOPs. Unless you want your con str to change dynamically, there's no need to calculate it every frame. DOPs is also a bit of a PITA to visualize.

In the file I do once in SOPs giving some str to the constraints and in DOPs I bring an animated box to break them for me. Red nodes are the important ones

Constraint_Strength_Test_tk.hipnc

Link to comment
Share on other sites

thanks Vitor... I see you suggest removing the constraint altogether.

I wanted to do in DOPs only so I could direct the sim further. I was aiming for after an initial hit I hold a large block together, then lower strength so it falls apart on the next/ground impact.

How would I lower the strength rather than removing the constraint altogether, to let the sim break it on next impact?

Link to comment
Share on other sites

sorry I still don't quite follow... you are still using constraint removal and driving it off impact value.

Maybe I'm trying to achieve things the wrong way.

Can after the initial hit, the animated box be used to lower the 'strength' attribute on constraints, so when it hits the ground it breaks, rather than a pure constraint removal? If I try manipulating f@strength it doesn't behave

Constraint_Strength_Test_v02_kp.hipnc

Edited by karlp
typo
Link to comment
Share on other sites

"Strength" is just a name. You can name the attribute you want to use to remove the constraint anything. When you don't use a sop solver and simply let the glue constraint relationship dop do its thing, all it's doing is comparing the strength attribute to the impact attribute and deleting the primitive if the latter is bigger.

If you simply bypass the deleting wrangle and change the name of the attrib. from "str" to "strength", the glue constraint will remove it if it's bigger than impact. But doing it yourself gives you more control of when the constraint will break. As is suggested in the documentation

For example, if you were to use a cone constraint, you'll see there's not "strength" attribute. Instead of you have torque, you have angle and can use those to break your constraints.

 

About the setup, it doesn't work for a different reason. Click the relationship node inside the solver and move the timeline. The constraints by default don't move. You can't group them by position because of that. That's why I moved the box initially. I'm not aware of any easy way to make it update its position. If you really want you can use the name attrib. to query the position of the point the constraint is connected to and use that as a proxy for the constraint position, but honestly playing with the attributes is not only the default way but much easier. See attached

 

 

 

Constraint_Strength_Test_v03_tk.hipnc

Link to comment
Share on other sites

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