Jump to content
Feather

Hard constraints stretching beyond rest length?

Recommended Posts

I can't figure out why the hard constraints are stretching before the glue constraints break. The hard constraints have a rest length and as far as I'm aware its not being updated.

I've set the constraint iterations to 30. 60. and even 100 which does help but they continue to stretch. Upping this iteration number isn't viable in terms of time for the scale simulations I'm looking to use this and so I'm hoping someone can help me. Maybe I just shouldn't be using glue here at all?

I've put together a quick and dirty example file of this problem and attached it below.

 

 Snap_Constraints_Example.hip

Edited by Feather

Share this post


Link to post
Share on other sites

Still trying to find a viable balance between the glue and hard constraints but they simply don't behave as I'd expect.

snap.gif.1a76fed17da73e6dc283f63228bad419.gifSti

I would expect that hard constraints are respected explicitly and do not break or stretch. 

I would also expect that glue constraints not matter how strong, when a piece with a hard constraint is under force would always break.

This seems to not be the case, different levels of glue strength and RBD object density result in long and shorter stretch lengths before the glue decideds to snap in a catastrophic failure sort of way. From what I've gathered, A glue strength of 1 per 1000 units of density is the balance point for glue that will stretch the hard constraint only a slight bit but I can't seem to drive this otherwise and it's not very intuitive. 

Attached is a more simply animation example to really make this obvious.Snap_Constraints_Example_2.hip

 

snap.mp4

Edited by Feather

Share this post


Link to post
Share on other sites

Continuing this in hopes someone can help me out.

I had a suspicion that the hard overwrite of the "Animated Static Object" may no play nicely with the constraints and so I tried using a constant force to see what happens. Turns out even with a constant force of like 10^10 you get ... this.

snap_Force.gif.3ebd147b2ffed894ad19c2787329a193.gif

It does seem to respect the hard constraints more but not really all that spectacular a failure. >.<

 

Edited by Feather

Share this post


Link to post
Share on other sites

I wonder if you're not putting the solver in an unsolvable situation.
By doing my own little experiment I found that constraint propagation management, especially by trying to manually control the setup via animated objects, could give heretical, or at least not understandable results.
I still took a look to your files(you never know), but as I suspected I'm not experienced enough.

not very useful I know
I hope someone can help, I'm also curious about this problem.

Edited by flcc

Share this post


Link to post
Share on other sites

Thanks for taking a look and no worries on the experience thing this is like.. exactly what the forums are for, I don't know either haha

I guess it very well may be an unsolvable thing like unstoppable force vs immovable object. BUT this is a pretty common situation in destruction where you have a base simulation and want to do secondary fractures.  

For what its worth I've just tried glue constraints with different strengths. For example the would be hard constraints are -1 and the middle is set to some random strength. THESE STRETCH TOO. They don't snap back to their rest length like the hard constraints though. 

:angry:

Share this post


Link to post
Share on other sites

This is actually the expected behaviour.

Using glue constraints will make the solver treat all connected pieces as one object (no relative movement between them) until the constraints are broken. To break a glue you need to apply collision (impact) force to the corresponding piece - forces/constraints can not force a glue to break.

In this case it is like constraining a single active piece between 2 animated objects - hard constraints will stretch no matter of what. The only reason the glues are broken in your example is because of some instabilities of the collisions between the connected pieces and the initially detached pieces.

If you want to force the object to break in the points with the bigger stress, then use only hard constraints and break them manually using the 'force' attribute.

Edited by rayman

Share this post


Link to post
Share on other sites

Thanks Pavel,

I've been able to get it to remove prims based on exceeding a certain force limit as you suggested. They do not stretch in this case much at all but It does seem to apply forces evenly across the entire object. Once it reaches the threshold all of the constraints break at the same time. I'm sure I could set variable thresholds for the break to occur where I want it to but without anything impacting the object I would be basically painting certain weak points so I doubt it would produce a very natural result.

The object I'm breaking is made of long beam structures that pull and rotate each other as they fall. I want to make sure that as they are getting torqued I can split and splinter those beams naturally under their own weight. Without an impact, determining where torsion would occur would take a bunch of simulations and repainting.

Is there a more natural way to find stress points between pieces and weaken them dynamically?

Share this post


Link to post
Share on other sites

This does not seem right. Most of the time forces are distributed pretty uneven based on the stress of the constraint system.

I modified your scene a bit, to illustrate my point - as you can see all constrains are using the same break threshold (with the exception of both sides - I made them stronger on purpose, as they are most likely to fail), but only some of them are broken - where the forces are much stronger than the rest of the constraint network.

You can expand on this and add different types of constraint breaks based on force, torque or distance between the pieces.

Snap_Constraints_Example_2_MOD.hipnc

  • Like 2

Share this post


Link to post
Share on other sites

This method seems to be far more controllable. Thanks again Pavel!

 

ezgif-4-8b1e86fb4015.gif.570dcfe734aa349a1315d6d29ba27e46.gifTwist.gif.c7a716de08bb7238ee39cc928a0d614b.gifSlide.gif.8e8783c632c1a156a9ebb1efba53479c.gif

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

×