Radz Posted April 14, 2017 Share Posted April 14, 2017 Hi guys, I have this problem where I've deleted bunch of constraints when certain force threshold is exceeded using some vex code in sop solver but they came back after couple frames. Anyone know any circumstances that can cause constraints to restore on its own? Quote Link to comment Share on other sites More sharing options...
Atom Posted April 14, 2017 Share Posted April 14, 2017 (edited) I have noticed that as well. The constraints are enforced on a per-frame basis. So deletion of constraints must be enforced on a per-frame basis as well. Once the condition in the solver is met you may need to flag it so it remains persistent. One way might be to create an additional attribute as a flag. Then in the solver examine the flag first to see if the constraint has already been deleted, if so then delete it again. Otherwise process as normal inside the solver. Edited April 14, 2017 by Atom Quote Link to comment Share on other sites More sharing options...
Ryan Posted April 14, 2017 Share Posted April 14, 2017 Constraints are weird... Instead of actually deleting them, you need to put them in a primitive group called "broken". http://www.sidefx.com/docs/houdini/nodes/dop/constraintnetwork I am guessing deleting them might unintentionally scramble the primitive counts. Quote Link to comment Share on other sites More sharing options...
rich_lord Posted April 14, 2017 Share Posted April 14, 2017 I do a lot of creating and deleting constraints in VEX, and have also had some issues. I don't think primitive number, or count matters, as the data it needs is on the primitive itself, and unrelated to the order, or the primitive number. I noticed the Object Merge node that brings in the Relationship Geometry was not giving me the data I expected, so I changed the path in there to an explicit path. I was surprised to find that this solved my problems. I changed this stamp expression: `stamps("..", "DATAPATH", chsop("relnode") + ":Relationships/" + chs(chsop("relnode") + "/relname") + "/" + chs(chsop("relnode") + "/relationship/dataname") + "/Geometry")` with this(the path depends on your scene graph of course): /obj/geo1/dopnet1:Relationships/constraintnetwork1/constraintnetwork/Geometry Would love to know if this works for you, or if I'm way off. I was going to file a bug for the specific case I hit, but need to recreate the issue in a less complex file first. Quote Link to comment Share on other sites More sharing options...
Radz Posted April 15, 2017 Author Share Posted April 15, 2017 Hi guys, I've figured it out and it's my bad really to cache the geo of my animation that causes it to reconstruct the constraint every couple frames. Mine still works tho without deleting them per frame basis. Once it's broken, it should always be ignored otherwise you write some specific functions for that I think. As for richard, I tried that but it's not the case unfortunately. Thanks anyway guys 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.