Animate vellum pressure constraint rest length

   1747   8   1
User Avatar
Member
425 posts
Joined: March 2014
Offline
I'm trying to animate the "Rest Length Scale" of the Pressure Constraint that is connnected to a Cloth constraint.

Unfortunately enough one can't animate constraint values directly so I figured I can use a "Vellumconstraintproperty" in the DOPnet to do that.

But that only gives access to the "Rest Length Scale" of the Cloth Constraint , which is resulting in something completely different then animating the "Rest Length Scale" of the Pressure Constraint.

Is there a way to animate the "Rest Length Scale" of the Pressure Constraint without having to take a course in Vex ?

Thanks.
User Avatar
Member
2572 posts
Joined: June 2008
Offline
You don't really need a course. It's only two lines of VEX code. Check out this post.
https://www.sidefx.com/forum/topic/87419/ [www.sidefx.com]
Edited by Enivob - March 7, 2023 08:16:01
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
425 posts
Joined: March 2014
Offline
Hey thanks.

I checked the scene. Looks great, but as far as I get it, it's just a fancy way to animate the rest length of the Cloth Constraint with a Vellum Constraint Property and a gradient mask ( restlength = mask; ) ?

But what I'm looking for is access to the Rest Length Scale of the Pressure Constraint that is connected to the Cloth Constraint in this particular setup...
Edited by toonafish - March 7, 2023 08:58:29
User Avatar
Member
2572 posts
Joined: June 2008
Offline
When you override an attribute for animation, I believe all of those attributes are the same. The Rest Scale Length for a Cloth constraint is the same as the Rest Scale Length of the Pressure constraint.

Try this line of VEX code with the Rest Length Scale box enabled.
restscale = fit(@Frame,1,48,1,0.1);
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
8635 posts
Joined: July 2007
Online
toonafish
But what I'm looking for is access to the Rest Length Scale of the Pressure Constraint that is connected to the Cloth Constraint in this particular setup...
those constraints are independent of each other and Vellum Constraint Property can work on all constraints so it's just matter of defining the correct constraint group

you can also have a look at AnimatedPressure example file in help, which while not completely correct in terms of volume computation, it may provide a good starting point
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
425 posts
Joined: March 2014
Offline
Great, thanks a lot for the pointers, I'll give it a try.
User Avatar
Member
2572 posts
Joined: June 2008
Offline
Thanks for pointing that out, Tomas. After specifying a new group name, pressure_stretch, the constraint vellum properties node can isolate only those for processing.

Attachments:
Untitled-1.jpg (128.8 KB)
ap_vellum_pressure_stretch_group.hiplc (498.4 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
425 posts
Joined: March 2014
Offline
Strangely enough the "animated pressure constraints" scene from the Help, completely freezes up Houdini as soon as I hit "play".

I can fix it by replacing the "rubbertoy" with a simple torus, then the dynamics work as expected.

But as soon as I edit the Torus, like adding an edgebevel or duplicating it, the scene freezes up again when I try to play and run the simulation.

Is it me, or is this a bug ?

Houdini 19.5.493 / Nvidia RTX 4090 / driver version 528.49
Edited by toonafish - March 8, 2023 14:54:55
User Avatar
Member
425 posts
Joined: March 2014
Offline
To answer my own question, setting the OpenCL device to CPU in the preferences solved the freezing issue. ( Preferences -> Miscellaneous )

Probably another Nvidia driver issue.

Just in case someone else runs into the same problem.
  • Quick Links