How to set various pressure values in vellum

   1700   6   2
User Avatar
Member
60 posts
Joined: 2月 2022
Online


Currently I can add the same pressure to multiple spheres, what has been bothering me lately is how to apply different pressure values in the simulation (e.g. 5 for the red sphere, 2 for other colors), or set different stretch values for the cloth, I Thinking they're similar in principle.

I've tried looking up information, but haven't been able to find an introduction to this. Do you have any good solution? Thank you for your help!



Edited by HenDaSheng - 2022年10月31日 12:24:11
User Avatar
Member
2534 posts
Joined: 6月 2008
Offline
You could activate Use VEXpression. Add a custom id to identify each sphere, and supply an alternate value to restscale over time.
if(i@my_id==0){restscale = fit(@Frame,1,48,1,10);}
if(i@my_id==1){restscale = fit(@Frame,1,56,1,4);}
if(i@my_id==2){restscale = fit(@Frame,1,60,1,30);}
if(i@my_id==3){restscale = fit(@Frame,1,24,1,9);}
if(i@my_id==4){restscale = fit(@Frame,1,72,1,17);}
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
60 posts
Joined: 2月 2022
Online
Enivob
Enivob
Thanks for your help, I'll do some concrete tests next, thanks a lot!
User Avatar
Member
60 posts
Joined: 2月 2022
Online
Enivob
You could activate Use VEXpression. Add a custom id to identify each sphere, and supply an alternate value to restscale over time.
if(i@my_id==0){restscale = fit(@Frame,1,48,1,10);}
if(i@my_id==1){restscale = fit(@Frame,1,56,1,4);}
if(i@my_id==2){restscale = fit(@Frame,1,60,1,30);}
if(i@my_id==3){restscale = fit(@Frame,1,24,1,9);}
if(i@my_id==4){restscale = fit(@Frame,1,72,1,17);}

According to the idea you provided, I first defined the id attribute for each sphere.

And then set different restscales according to the id attribute through VEXpression in slover.

But the result does not seem to identify "i@my_id>4", may I ask why?


Looking forward to your reply
Edited by HenDaSheng - 2022年11月1日 03:15:35
User Avatar
Member
159 posts
Joined: 2月 2016
Offline
It's probably because the "i@my_id" needs to be a prim attribute not point. (you can promote it after your copy to points)
Vellum constraint properties runs over prims, so it cant find your id attribute
Edited by AslakKS - 2022年11月1日 07:37:37
User Avatar
Member
60 posts
Joined: 2月 2022
Online
AslakKS
It's probably because the "i@my_id" needs to be a prim attribute not point. (you can promote it after your copy to points)
Vellum constraint properties runs over prims, so it cant find your id attribute



Thank you for your reply. I tried to add "attribute promote", but it still doesn't work. Is there something wrong with my "attribute promote" setting?
User Avatar
Member
4 posts
Joined: 6月 2017
Offline
Hi,
I seem to have the same issue. I need to setup a customized per-point restlength to mimic a growth effect, and I tried using VEX expression. It doesn't work. Then I simplified to just setting a constant restlength. Still doesn't seem to affect anything.
Could someone please take a look at this? I am on 18.5.351.

Thanks a lot!

Attachments:
perpoint_restlength.hipnc (640.4 KB)

  • Quick Links