# ConstraintNetworks3

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.

## Contents

### Multi outputs and modularity

The new RBD tools take a few ideas from Vellum:

• RBD sops function like Vellum sops, you chain them together to define behavior, constraints, stuff
• RBD sop nodes have multiple inputs and outputs like Vellum sops (grr), first is geometry, second is constraint geo, third is proxy geo.
• RBD now has a solver in sops to hopefully handle most of the stuff you want to do, so you don't have to wire up complex dopnets every time.

My initial frustration stemmed from not really understanding Vellum at the time, much less ported Vellum concepts to RBD, hence confusion and fury.

### Standard constraints

Chain of things, a rope bridge, a collapsing sidefx logo, you know the deal.

• Assemble sop, ensures you have names on things
• Rbd Constraints from Rules, one of several ways to create the lines between the RBD geo
• RBD Constraint Properties - Only realised very late that the above node ONLY makes the lines, it doesn't set any properties to make them constraints.
• RBD Configure - Used to configure the RBD geo itself, for this example its used to pin the left and right edge. I'm using the bounding type from geometry, so any shapes that fall within the boxes I'm using to mark the left and right edge become pinned.
• rbd bullet solver sop - do the actual solve.

### Pins

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 (which is another 4 or 5 nodes and easily broken).

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...