Jump to content
Sign in to follow this  
sjrohit

Painting restlength on vellum cloth constraint?

Recommended Posts

Hello,

Is there any way to paint the restlength parameter on vellum cloth constraint?

I tried assigning "restlength" attribute using wrangler node, but vellum solver doesnt seem to read it. I am trying in SOP btw.

Thanks!

Edited by sjrohit

Share this post


Link to post
Share on other sites

Primwrangle, Constraint geo in first input, Vellum geo with attrib you want to scale by in second

string attrib = chs("attrib");
int pts[] = primpoints(0, @primnum);
float v0 = point(1, attrib, pts[0]);
float v1 = point(1, attrib, pts[1]);

f@restlength *= avg(v0, v1);

 

ts_vellum_paint_restlengthscale.hip

  • Thanks 1

Share this post


Link to post
Share on other sites

This is cool,  thank you so much Tomas! 

Learnt something new today :)

 

-Rohit

Edited by sjrohit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×