Vellum constraint properties animation with expression

   308   2   2
User Avatar
Member
13 posts
Joined: June 2015
Offline
Hi,
I'm trying to adjust the stiffness of a pin-to-target constraint with an expression : smooth($FF,1,48)



The problem is, it overrides completely the existing stiffness; doing @stiffness*smooth() or stiffness* smooth() doesn't work;

No big deal i thought, i just write in the vex code:
stiffness *= smooth($FF,1,48);
It doesn't work;

Now i figure out, there is 2 differents smooth fonctions: first one doesn't work in vex it seems, very confusing.




Well second smooth doesn't work either ! Any idea what i'm doing wrong? I could use some help here.
Thanks in advance

Attachments:
stiffness_overried.png (33.5 KB)
smooth01.png (25.7 KB)
smooth02.png (51.5 KB)

User Avatar
Member
384 posts
Joined: April 2017
Offline
You have to remember that you're doing this multiplication in a solver, which means you're multiplying stiffness by this scalar on every single timestep. Check the Geometry Spreadsheet and you'll likely see your stiffness values immediately hitting zero. Multiplying zero by anything later in the simulation will do nothing.


Instead, try storing the existing stiffness as some other attribute before the DOPnet, like `stiffnessorig`, and then use a VEXpression like this:

stiffness = @stiffnessorig * smooth(40, 75, @Frame);
MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
13 posts
Joined: June 2015
Offline
Oh that makes sense, thanks for answering, i will try : )
  • Quick Links