Jump to content

Vellum SOP - update pin group over time


toothpaste

Recommended Posts

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 by toothpaste
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 by anim
  • Like 1
Link to comment
Share on other sites

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!

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