The most tricky part of this all was to make tentacles grow… Normally, in Houdini, for dynamic objects you never change constraints or geometry attributes during simulation, you provide solver with initial values and it does the magic automatically, but in this case, I had to change geometry attributes and constraint length over time during simulation…
I’ve started with randomly positioned short lines
Those lines are short but each has 26 points
so 9 lines times 26 points per line = 234 points
For each point on each line, I have few attributes for later use
- id of the line ( 1-9 )
- index of the point in the line ( 1-26 )
- U value of the point ( 0-1 normalized point position on the line )
- bottom point of each line added to “pin” group
Next, I’m setting up constraints for vellum
now these lines are hair, with very high stretch stiffness and pretty high bend stiffness,
also bottom points is pinned and can’t move.
Vellum Constraints node generates additional geometry for constraints: 450 primitives
for each line 50: 25 for bend and 25 for stretch
Next, I’m passing data generated by Vellum Constraints to dop net (dynamic simulation)
this is a very basic simulation setup
with vellum solver and static solver
also (on the left side of the graph) I’m passing two static rigid bodies: a tube and ground plane for tentacles to collide with
all magic happening in sop solver where I’m changing constraints and forces