Jump to content

Vellum - animated Pin to Target?


benguastella

Recommended Posts

Hello,

I am struggling to find a solution using Vellum that allows me to modify which points are part of a "pin to target" constraint over time, or their overall strength.  There seem to be workflows for modifying attributes for other types of constraints that work (using a sop solver in DOPs to modify stretch stiffness, etc), but those same methods do not seem to work with Pin to Target. Essentially, I want to be able to have my vellum object pinned to animation in specific locations on specific frames, then over time, change which points are being constrained (usually I would be removing a sub-set of the points, allowing more of the geometry to simulate freely). 

 

Rohan Dalvi has a great tutorial that goes over a similar workflow using "Stitch Points or "Weld Points" and modifying the Breaking Threshold over time, but this method does not seem to garnish any results when you flip to the "Pin to Target" constraint type. (Link to his video: https://vimeo.com/296601872)

 

Am I just doing something wrong? Does this feature not exist? Maybe there is a different constraint type that would allow me to pin to animation? Any help would be greatly appreciated!

 

Thanks!

-Ben

 

Link to comment
Share on other sites

  • 5 weeks later...

Hi Ben,

I'm having the same issue here. Were you able to find a solution?

I also want to update the constrained points over time but it seems like it's not working with the "Pin to target" constraint type.

I've attached a very simple scene.. Basically I'm just trying to transfer an attribute from an sphere in order to detach strings over time.

Any help much appreciated! Thanks!

test_fur_vellum_v01.hip

Link to comment
Share on other sites

You could use targetweight on your points, which is a float variable, and animate that (see the help on grains for that matter). I tend to create a Pin to Target constraint, setting Stretch>Stiffness to Scale by Attribute and targetweight as control attribute.

Also set Pin Type > Soft, Orientation Pin Type > None and activate Pin to Animation.

This should allow you to control the pin strength by animating the targetweight attribute.

Link to comment
Share on other sites

I'm struggling with the same issue at the moment. What's strange is that I'm perfectly able to do it the other way around; having 0 pin to target on all points, then adding pin constraints throughout the geo with an animated attribute transfer in a sop solver within the dop network. Then using the dop vellumconstraints, set to update on each frame, to create the pins throughout the simulation. Must be something I'm missing here...

Any insight would be greatly appreciated.

Thanks 

Link to comment
Share on other sites

  • 2 weeks later...

I know it's been a while but I ended up finding a solution through an older odforce post from vtrvtr.

Basically you want to set a group of points in a "Pin to target" constraint and animate the breakthreshold attribute in sop.

In order to transfer the attribute from sop to your ConstraintGeometry in dop, you need to plug a sop solver in your vellum solver. You will need to check "Invoke Compiled Block" on your sop solver node and add an extra output for the ConstraintGeometry. Inside the sop solver, you'll need to copy the breakthreshold attribute from sop to the ConstraintGeometry.

Maybe there's another way, but it's the only way that worked for me so far! Thanks Vitor!

 

test_fur_vellum_dop.PNG.55aefe9cc61df114d8ce5d8286a3f26c.PNGtest_fur_vellum_sop_solver_output.PNG.2fce1d6416a50ebf523875601eb6aafd.PNG

test_fur_vellum_sop_solver.PNG.323ea72e47f7f82497df555e2743ed25.PNG

fur_vellum_playblast_v01.mp4

test_fur_vellum_v04.hip

  • Like 4
Link to comment
Share on other sites

  • 2 months later...

Using a SOP solver to generate the animated attributes...
I am doing a similar thing, with pin to target but using @stretchstiffness / match animation to modulate the constraints. 
I have it working, but for the constraints to be working I have to remove the constraint every frame with a VCP node, and rebuild it, but match to animation doesn't work. 
If I kill the VCP remove then match to animation works but the animated constraints don't. Which kind of makes sense. 
I will crack it at some point!
I take it the only reason you need compiled block is so the SOP solver can output both Geo & Constraints seperately? I am a bit confused, I thought the SOP solver would take both automatically and spit both out. I am guessing not as they are individual data streams.

Any help appreciated. Hipfile included.

 

untitled.mp4

PTA_matchAnimaitonFail.zip

Edited by Jim M
  • Like 1
Link to comment
Share on other sites

  • 1 year later...
On 15/03/2019 at 11:53 PM, splegare said:

I know it's been a while but I ended up finding a solution through an older odforce post from vtrvtr.

Basically you want to set a group of points in a "Pin to target" constraint and animate the breakthreshold attribute in sop.

In order to transfer the attribute from sop to your ConstraintGeometry in dop, you need to plug a sop solver in your vellum solver. You will need to check "Invoke Compiled Block" on your sop solver node and add an extra output for the ConstraintGeometry. Inside the sop solver, you'll need to copy the breakthreshold attribute from sop to the ConstraintGeometry.

Maybe there's another way, but it's the only way that worked for me so far! Thanks Vitor!

 

test_fur_vellum_dop.PNG.55aefe9cc61df114d8ce5d8286a3f26c.PNGtest_fur_vellum_sop_solver_output.PNG.2fce1d6416a50ebf523875601eb6aafd.PNG

test_fur_vellum_sop_solver.PNG.323ea72e47f7f82497df555e2743ed25.PNG

fur_vellum_playblast_v01.mp4

test_fur_vellum_v04.hip

Hello, thank for the post .

After digging on this issue i found a simpler technic that works based on "WHATISANAME" suggestion

I modified your file getting rid of all the hassle of the block begin which i can't understand myself, i hope it helps.

I upload the clean version i did for myself as well ready to be used

test_fur_vellum_v04_SIMPLE.hip

 

vellum_pintotarget_animated.hip

Edited by FR3D
  • Like 1
Link to comment
Share on other sites

  • 4 months later...

for those who need that for vellum cloth , here is an other hip

pin_to_animation_att.hiplc

cheers

E

 

EDIT :

I also add the link to this post , cause Tomas hip is very useful and concise to get pin constrain control by an attribute :

https://www.sidefx.com/forum/topic/68425/

 

 

Edited by sebkaine
  • Like 3
Link to comment
Share on other sites

  • 10 months later...

Thank you all for the insight and reference .hip files on this topic. I am working on a system that uses vellum cloth and points need to gracefully transition from their pin-to-animation state after collisions with other objects are detected so the simulation can then kick in to handle the animation. I checked everything out and ended up using sebkaine's solution as a starting point. I appreciate your sharing !

S

flower_array_sim_01.mp4

Link to comment
Share on other sites

  • 2 months later...

I'm trying to do this in Houdini 18, using Solver SOP inside of a vellum solver. I'm succeeding at transfering attributes using object merge and attribute copy node, however it seems like it just ignores @stretchstiffness attribute, even though it's clear from Geometry Spreadsheet, that it IS being trunsfered:/ Can anybody explain why?

animate pin to target.hipnc

Link to comment
Share on other sites

stretchstiffness is applied in the vellum constraint sop and applied to the constraints before it reaches the solver. 
It is really just a convenience utility for setting up incoming constraints. 

If you want to write to constraint data in the sim you can use a vcp node.
Alternatively you must set your sop solver to operate on ConstraintGeometry not Geometry (data name) and then write to the constraint prim attribs directly. You can easily recreate "stretchstiffness" by scaling constraint forces. There is no magic here. 

Furthermore if you want to get Geometry data inside a ConstraintGeometry sop solver just dup the dopimport in the sop solver and change the geometry data path to "Geometry". This way you can do things like trainsfer point attribs onto constraints.

Sounds complicated but it isn't really. You just have to realise that constraint and geo data are operated on separately. 

 

Edited by Jim M
Link to comment
Share on other sites

This should make everything clear. 

You do not need a sop solver for what you are doing. In the file is a few examples showing getting data from sops with VCP or wrangle (showing the VCP is just a convenience dop) and the same for data generated inside the dop, getting dop geometry data into the ConstraintGeometry data VCP or wrangle. Then lastly the sop solver example doing the exact same thing getting dop geometry data / sop geo data into a ConstraintGeometry sop solver.

The idea is just repeated in 3 different ways for sops and dops. The main thing being you are working on "ConstraintGeometry" primitives with attributes from "Geometry" points. N.B. to drive the point home, these are the exact names of the data class you need to explicitly declare in SOP solvers, VCPs or geometry wrangles to do this kind of thing.

vellum anim constraints.hip

Link to comment
Share on other sites

Thank you so much, Jim! I managed to make it work (more or less:) )  using vellumconstraintproperty. Was trying to wrap my head around sop solver method when a message from you came.
This was my first question on this forum and you made it into a really pleasant experience, what a great community! thank you again ;)

animate pin to target2.hipnc

Edited by Dee PoG
  • Thanks 1
Link to comment
Share on other sites

5 hours ago, Dee PoG said:

Thank you so much, Jim! I managed to make it work (more or less:) )  using vellumconstraintproperty. Was trying to wrap my head around sop solver method when a message from you came.
This was my first question on this forum and you made it into a really pleasant experience, what a great community! thank you again ;)

animate pin to target2.hipnc

Haha great !! 
Take a look at my example hip too as you may need a sop solver running on constraints at some point, and in general it's pretty useful in dops in general to understand data names and inputs. So often something isn't working because you assume you are getting data from one place and you forgot to assign the inputs.

Good luck !!!

Link to comment
Share on other sites

  • 1 month later...
On 04/04/2022 at 3:33 AM, Dee PoG said:

Thank you so much, Jim! I managed to make it work (more or less:) )  using vellumconstraintproperty. Was trying to wrap my head around sop solver method when a message from you came.
This was my first question on this forum and you made it into a really pleasant experience, what a great community! thank you again ;)

animate pin to target2.hipnc

Thanks a lot for this! This was exactly what I was looking for

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