toothpaste Posted December 8, 2019 Share Posted December 8, 2019 (edited) Making a shower curtain vellum SOP set up, having trouble updating the pin constraint group, need help. What I have done: 1. Group points to 'pin' group using animated bounding object to simulate curtain being pulled and snapping from the curtain rod. 2. Pipe cloth into vellum system, using the 'pin' group in a vellum constraint set too pin. 3. Here's where I need help, I don't know how/where to use a sop solver to update the 'pin' group frame to frame. Does this solution differ when using vellum in DOPs? 4. Is there an '@active'-like attribute in vellum SOPs I can use to tell them when to enter and exit simulation? I've attached a quick example file, please take a peek if you can. Thanks! vellum_update_pinConstraint_HELP.hipnc Edited December 8, 2019 by toothpaste Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 8, 2019 Share Posted December 8, 2019 I'd simply animate the 'pin' points. Here's my proof of concept if you'd like to have a look. vu_VellumCurtainPull.hiplc 1 1 Quote Link to comment Share on other sites More sharing options...
toothpaste Posted December 8, 2019 Author Share Posted December 8, 2019 Thanks for your help Noobini! I also want to do a snapping off animation ( someone pulling on the shower curtain to snap off the points one by one / release from the 'pin' group ), and I am animating the bounding object to try to achieve that, while it is updating in SOPs ( I see the points entering and leaving the group in the spreadsheet ) it is not transferring the updates into the vellum solver, could you help me solve this problem as well please? Thanks! Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 8, 2019 Share Posted December 8, 2019 i'd say it's possible with a wrangle in the solver SOP (delete the constraint i'd say) but i'm not much of a coder. Will have a try anyway but I reckon @anim can write this up in seconds. Quote Link to comment Share on other sites More sharing options...
anim Posted December 8, 2019 Share Posted December 8, 2019 (edited) there is couple of ways, but since it seems you only need hard pin contraints update and you are already basing everything off of a group here is the easiest way for your case 1. set Pin Type to Stopped, which will use @stopped attribute to define what's pinned instead of zero @mass, this makes it easier to unpin stuff as the actual @mass is not lost for pinned points 2. inside of the solver subnet, add POP Wrangle for example, bind first input to First Input Geo and use: i@stopped = inpointgroup(0, "pin", @ptnum); vellum_update_pinConstraint_HELP_fix.hipnc Edited December 8, 2019 by anim 1 Quote Link to comment Share on other sites More sharing options...
toothpaste Posted December 9, 2019 Author Share Posted December 9, 2019 Thanks Tomas! That solution worked as I expected! To clarify what this piece of vex code does: inpointgroup(0, "pin", @ptnum) : return True or False ( 1/0 ) based on if the current pt in input [0] is in group 'pin' then assigning the value to the stopped attribute on each point in the vellum system if stopped = 1, hard constraint is maintained if stopped = 0, hard constraint is turned off PS. I really like this solution because it allows me to animate the bounding object back over the unpinned points to constraint them again in the same vellum system. Thanks! Quote Link to comment Share on other sites More sharing options...
Noobini Posted December 9, 2019 Share Posted December 9, 2019 (edited) here's my go.... (well if I can't vex...gotta do something else to jazz it up) vu_VellumCurtainPull2.zip Edited December 9, 2019 by Noobini 1 Quote Link to comment Share on other sites More sharing options...
toothpaste Posted December 16, 2019 Author Share Posted December 16, 2019 Cool! That's a real smart way to get the same result without coding! 8) Thanks for showing me another way to do it! 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.