Feather Posted October 29, 2019 Share Posted October 29, 2019 (edited) 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 October 29, 2019 by Feather Quote Link to comment Share on other sites More sharing options...
Feather Posted October 29, 2019 Author Share Posted October 29, 2019 (edited) Still trying to find a viable balance between the glue and hard constraints but they simply don't behave as I'd expect. Sti 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 October 29, 2019 by Feather Quote Link to comment Share on other sites More sharing options...
Feather Posted October 29, 2019 Author Share Posted October 29, 2019 (edited) 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. It does seem to respect the hard constraints more but not really all that spectacular a failure. >.< Edited October 29, 2019 by Feather Quote Link to comment Share on other sites More sharing options...
flcc Posted October 30, 2019 Share Posted October 30, 2019 (edited) 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 October 30, 2019 by flcc Quote Link to comment Share on other sites More sharing options...
Feather Posted October 30, 2019 Author Share Posted October 30, 2019 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. Quote Link to comment Share on other sites More sharing options...
rayman Posted October 30, 2019 Share Posted October 30, 2019 (edited) 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 October 30, 2019 by rayman Quote Link to comment Share on other sites More sharing options...
Feather Posted October 30, 2019 Author Share Posted October 30, 2019 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? Quote Link to comment Share on other sites More sharing options...
rayman Posted October 30, 2019 Share Posted October 30, 2019 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 2 Quote Link to comment Share on other sites More sharing options...
Feather Posted October 30, 2019 Author Share Posted October 30, 2019 This method seems to be far more controllable. Thanks again Pavel! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.