Constraint Networks 3: A new hope.
I've been building my own constraint lines so far because it made it nice and clear in my head. Since 17.5 there's been a bunch of sops to help make these things for you. When they arrived I had a quick play, couldn't make them work, swore, didn't touch them again.
Well we're now at 18.5, I'm on a project that needs RBD again, seemed a good time to dive back in.
Multi outputs and modularity
The RBD constraint tools take ideas from Vellum. RBD sop nodes have 3 in/3 outs, first is geometry, second is constraint geo, third is guides. The other idea is to have RBD sops which can be chained together, so one sop might setup RBD object attributes, another creates constraint lines between them, a third modifies rbd contraint attributes, and this all gets wired to a RBD Sop Solver.
My initial frustration stemmed from not really understanding Vellum at the time, much less ported Vellum concepts to RBD, hence confusion and fury.
If you remember from the previous section the way to pin an rbd object was to:
- Duplicate the point
- Create a line between those points
- Give the line prim a @constraint_name
- Set one end of the points to have @name = ""
- Create a constraint network in dops
Quite a lot of work, lots of places to make mistakes. Here's how you do it with the new workflow:
Yep, a single checkbox.
The RBD Configure sop makes this setup trivially easy to do, and because it presents itself like a regular sop should, you can use groups to define the pinned geo, or a bounding box selector built into the sop. It's pretty handy. However...
Download hip: File:rbd_pin_slidey.hip
Most of the time you want a pin locked down, immovable, and that's the default behaviour. But as you can see in the gif I had an issue; if the shapes intersected while pinned, they'd go on intersecting. The pins are too strong, and didn't allow for any play.
From inspecting the geo attributes and thinking about it just now, I realised my original method wasn't really pinning as suggested by Sidefx; they use attributes to pin, while I was making constraints to lock things in place.