Vellum Hair Constraints between 2 polylines

   1930   2   0
User Avatar
Member
10 posts
Joined: June 2017
Offline
With the Hair constraint, a stretchshear and a bendtwist are created using the points of EACH primitive. But is there a way to create these constraints between two separate polylines to utilize the bend stiffness to better keep a structure?
User Avatar
Member
10 posts
Joined: June 2017
Offline
I have successfully built some hair constraints between different polylines, but in order to do so I had to set the orient of the branch points to align with the constraint that is created. The major downside to this is that I cannot use a standard Hair Constraint to help further with retaining the shape ( in this example I have String Constraints but they don't prevent the twist of the points ). Has anyone used multiple bend constraints in Vellum?

Edited by paulboiii - Aug. 22, 2020 17:33:49

Attachments:
bendConstraints.gif (491.3 KB)

User Avatar
Member
10 posts
Joined: June 2017
Offline
After recreating bend constraints to try and get the same effect as above ( my attempt worked somewhat but wasn't very stable ) , I found that with a bit more fine tuning the hair constraint method works quite well for keeping structure with an entire hierarchy of polylines.

The only reason we can't create these bendtwist and stretchshear constraints between poly lines in the first place is that in the file pbd_constraints.h which is referenced when creating all Vellum constraints, the function createOutEdgeConstraint() uses the neighbours function to determine what points to use for the constraint. This means that no matter what, these constraints are limited to connected points on a primitive. In this file, most of the functions called within the main create functions only have points as arguments, so it is quite easy to recreate the constraints on your own. In the case of the Hair constraint, you will need to look into the computeOrientRodlengths() function and set the orients of all branch points as if they are i==0 in the function.

In the following example, there are no Attach To Target constraints. There is Gravity applied universally, and a default POP wind to stress test. This is with only 200 Constraint Iterations and 1 substep. To help keep the structure, String Constraints were also added.

Edited by paulboiii - Aug. 22, 2020 17:34:01

Attachments:
bendConstraintsHierarchy.gif (6.0 MB)

  • Quick Links