Animated groups driving vellum simulations

   10436   4   2
User Avatar
Member
17 posts
Joined: Nov. 2008
Offline
Hey guys I'm doing some tearing cloth simulations and I wan't to control how they tear over time. I'm using some attribute transfers + noise in SOPs to control a group which changes over time. This group, “pins”, should drive the group inside a Pin To Target constraint inside vellum. It seems that vellum only takes the group on the creation frame (frame 1) and never receives the animated group. Am I approaching this the wrong way? I'm no Houdini pro by any means so It may be possible I'm approaching this the wrong way? I understand how I can animate vellum constraints inside the dopnet's “forces” node using vellumconstraints, but animating the breaking threshold isn't going to give the same look as being able to actually animate the locations of these constraints.

here i make some nice animated attributes that convert to a group:



and then i use this custom “pins” group via Pin To Target:



and yay i get some animating constraint locations (i want to dive into the noise look here to get neat tearing patterns)


but when i run the simulation it only takes the group on the first frame. It'd be quite intuitive if your sops animations were able to be used but i'd love to know how i should recreate this in the vellum mindset.
Edited by mradfo21 - Nov. 11, 2019 11:41:03
User Avatar
Staff
6413 posts
Joined: July 2005
Offline
The vellum constraint node is only run on the first frame. So it creates all the pin constraints on that first frame. The “Animated” flag adds an attribute that the target position to be updated, but will not re-create the pins. Thus it won't notice that the group has since changed. This might seem a pedantic separation when the group is “pins” as it seems trivial to re-evaluate membership in that group. But that generation group can be any arbitrary expression.

Since you created soft pins they exist as spheres on the Constraints geometry.

The easiest way to deactivate them is to set their stiffness to 0. You can do this in the vellumconstraintproperty DOP inside the forces tab.

The Animated Constraints help card example shows a setup reading in to a vellum constraints property. You could do similar with a vexpression of

stiffness = 1e10 * inpointgroup(2, “pins”, @ptnum);

and then set the Input 3 to point to where the pins group is animated.
User Avatar
Member
17 posts
Joined: Nov. 2008
Offline
Got it so your recommendation would be to set every point as a pin initially and then using an attribute just modify the stiffness via vellumConstraintProperty DOP. I'm animating some breaking values already in there so that sounds reasonable.

The original attribute I'm generating the group from is called “PinSelection” and its 0-1, does that mean I can do a vexpression like
1e10 * @PinSelection to essentially have pins add influence or not? Am I understanding how stiffness would work in this correctly?
User Avatar
Staff
6413 posts
Joined: July 2005
Offline
In the vellumconstraintspropertiy it is bound to the Constraint primitives. Thus @PinSelection would read the primitive attribute on the constraint geometry, which likely isn't where you have your animated data.

This is why you likely want to use a point() expression to read from one of the other inputs, and set that input to the animated geometry. In particular,

stiffness = 1e10 * point(2, ‘PinSelection’, @ptnum);

would work if the Third Input (2) is set to point to the SOP that has the animated PinSelection attribute.

Note stiffness is exponential, so it will be pretty much on/off even for intermediate values of PinSelection like 0.5.
User Avatar
Member
5 posts
Joined: Feb. 2015
Offline
Thank you Jeff,

you saved me, because I didn't know how to animate in soft pin constraints and using an expression on vellumconstraintproperties made it possible.

Cheers
Ray
  • Quick Links