resolve vellum constraints (with vex)

   1921   1   1
User Avatar
Member
237 posts
Joined: June 2006
Offline
how could I resolve pintconstraints in vellum?
Scene:
a gridcloth, fixed on the corners on top of four rods. I know as soon I use a point to pin its @mass becomes 0.
Pinned points are in the pinpts group. Depending on different events and behaviours I want to resolve the pinconstraints


So I used a popwrangle in the vellumsolver with i.e.:
i@ingrp = inpointgroup(0, "pinpts", @ptnum);
if(@Time>15||@mass==0||i@ingrp==1){
    @mass==0.11;
};
But unfortunately it doesnt work. Would you mind to have a look into the attached hip?
Edited by Follyx - April 20, 2021 09:05:51

Attachments:
untitled.hip (514.2 KB)

User Avatar
Member
9408 posts
Joined: July 2007
Offline
a few things:
i@ingrp = inpointgroup(0, "pinpts", @ptnum); // will work only if you bind input 0 to Myself in Inputs tab, you can also use @group_pinpts instead without messing with Inputs tab
if(@Time>15||@mass==0||i@ingrp==1){ // you probably want to use && instead of || 
@Time>15 // your timeline is just 240f at 24FPS so 10s so @Time will never be > 15 maybe you meant @Frame>15
@mass==0.11;   // == is for comparison, for assignment use =, so @mass=0.11;

so it will be :
if(@Frame>15 && @mass==0 && @group_pinpts ){
    @mass=0.11;
};

and also:
Follyx
I know as soon I use a point to pin its @mass becomes 0.
that's only when the Pin Type is set to Permanent, which you'd usually use if you never want to unpin (as for unpinning you'd have to know the exact mass value)
in your case just set it to Stopped which sets @stopped=1 for them instead
so then it would become:
if(@Frame>15 && i@stopped ){
    i@stopped = 0;;
};
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links