Controlling vellum constraints with geo wrangle

   1816   2   2
User Avatar
Member
21 posts
Joined: Jan. 2016
Offline
Hey all,

wondering if anyone can give me any pointers with my setup. This should be so simple but i've done something wrong here.

Got a simple vellum cloth pinned at the edges, i'm also adding an animated noise attribute called mask set as a prim attribute on a side branch. Inside the solver, i'm using a geo wrangle to get the mask value from the geo and using it to modify the restlength. But it doesn't match the noise attribute being fed in.

To debug it further, i also set the Cd to be the value of the mask in the same geo wrangle. And then back above if i connect a null to the vellum solver's constraint geo you can see the attribute via colour.


All seems to work but looks like the primitive numbers are being garbled. I would expect the result of the debug null to have the same pattern as the noise being fed in.

I know this could be done with a vellumconstraintproperty, but i'm mostly trying to understand why the geo wrangle doesn't work in this case.

If anyone has any ideas why, would love to know.

Thanks

Attachments:
VellumCon_GeoWrangle.hiplc (590.0 KB)

User Avatar
Member
359 posts
Joined: April 2017
Offline
The Vellum Solver SOP scrambles your primitive constraint order for some reason... there's an internal sorting somewhere that prevents primitive numbers from lining up. If you create a unique identifier attribute on your primitives after the constraints are created but before the sim:
i@primid = @primnum;
you can just lookup i@primid instead of @primnum in your Geometry Wrangle and it will find the right primitives.
Edited by toadstorm - June 27, 2021 16:30:14

Attachments:
VellumCon_GeoWrangle_toadstorm.hiplc (596.7 KB)

MOPs (Motion Operators for Houdini): http://www.motionoperators.com [www.motionoperators.com]
User Avatar
Member
21 posts
Joined: Jan. 2016
Offline
Hey thanks for that Henry!

Yeah of course might be to do with the graph colouring stuff, i assumed i'd messed up in the wrangle somewhere. Thanks for the info, and good idea on the solution. Really appreciated
  • Quick Links