Constraints Module

What are Constraints?

Constraints are a kind of "glue" that hold the pieces together. This allows much more control and realism in the simulations. In RBDLab we can generate constraints in several ways, choosing each way will depend on the result we are looking for.

Although the constraints slow down the simulation, they are practically obligatory if we want to look for certain realism in our scenes, and RBDLab facilitates a lot the use of them, extending enormously the possibilities that Blender offers.

Example Without Constraints

Here we can see a simple simulation, in which the Cube does not have any Constraints.

Example with Constraints

Here we can see the same simulation, but our cube has "Clusters" Constraints.

Create submodule

When we access the Constraints module, we will have 2 sub-modules. Create and Edit.

In the Create module, we will see that we have a panel called "Source Collections". In it we will be able to see all the collections that we have fractured. In this way, even if we are working on a collection (for example, Floor_low) we could create constraints for all the collections at the same time.

This facilitates a lot the work, and also allows to work with "Adjacent constraints" that we will see later.

There are 3 other submodules called Source Filter called: Collections, Selection, and Clusters.


Here we can see a basic creation of Constraints. We are going to use the collection mode, and working with only one collection ( Floor_Low ).

We have several settings in the creation module:

Brekeable: enabled by default, it tells the constraints that they can be broken, depending on the GlueStrength that the user indicates. If disabled, the constraints will never be broken.

Disable Collisions: By default it is disabled. If enabled, Blender will not calculate the collision between constraints, increasing the performance and speed of the simulation. Depending on the type of scene we are working with, it could be useful to activate this option.

GlueStrength: Here we indicate the strength of the glue. The higher the glue strength, the harder it will be to break the constraints.

Iterations: Here we indicate the number of "Solvers" that will calculate the constraints. Often, having it deactivated is useful to increase the performance and the result is satisfactory. But many times it will be necessary to activate it to have a more precise result.

Limit Constraints: Limits the number of constraints that will be created for each chunk. A too high value, will generate a very slow simulation, but a result with a lot of "Plasticity", where the constraints do not end up breaking but deform the object. In some occasions, it can be interesting to set a high number (7 or 8).

Constraints From Adjacent Collections: This option can only be used when working with 2 or more collections in the constraints module. If those 2 collections are physically together (for example, the Floor with the Pillars), it will create constraints only in the zones where these objects are touching. We will see this option in detail later.

Collections submodule

In the first sub-module within Source Filter, we have the Collections module. This allows us to add constraints to a whole collection or to several collections at once. We configure the collections and settings and click on the Create Constraints Group button.

This will create the constraints group and will automatically send us to the Edit module. We will see later how the Edit module works.

Selection submodule

The Selection submodule is the same as the Collection submodule, the only difference is that it can work by manual selection in the viewport. We select the zone we want to work with, and it will only add constraints in those zones. It can be very useful in many occasions, allowing a more precise control of the zones in which we want to work with the constraints.

Cluster submodule

The Clusters submodule is very interesting and useful. It allows to generate constraints by means of Clusters. This will generate groups of constraints separated from each other, which will allow a more organic and realistic simulation in many cases. It is a very powerful tool and is used in most professional software, such as Houdini. Let's see its options:

Cluster Count: The number of clusters you want your fractures to have. This value is not always exact, as it will depend on the number of chunks you have, the "Min Chunks" selected, or the Radius of the clusters you have chosen.

Min Chunks: The minimum number of chunks that must be in each Cluster.

Radius: Allows you to choose the radius (size) of each cluster. You can also select the random option, to choose a radius between 2 minimum and maximum values.

Use Selection: Allows to add clusters only to the chunks selected in the viewport.


Add IntraClusters

If we activate the Add IntraClusters option, we will create a second group of Constraints, in which constraints will have been generated to link the Clusters. This allows us to have in one group the clusters, and in another separate group, constraints that link the clusters themselves. Thus, we can for example set a low Glue value in the Intraclusters, to make the clusters even more realistic.

If we only have the clusters, sometimes in the simulation they can be very evident, as we can see how large pieces are clearly separated. By adding the Intraclusters, we avoid that happening and we have a great control.

When generating the group with Intraclusters, by default they will be deactivated, we must activate them to make them work.

Adjacent Constraints

Adjacent Constraints allow to detect which chunks of a collection are in contact with chunks of another collection. In this way, constraints will be created only in those areas. It is very useful, as we see in the example, to create constraints between pillars, ceilings, floors... You can make these constraints "non-brackable" and thus make these zones appear to belong to a single geometry.

It is advisable to increase the number of constraints, for example to 10, to generate enough constraints to keep these parts together.

Edit Module

In this module, we can change the values of the groups of constraints that we have generated. In addition, and very important, we can animate the constraints in different ways. We can also mute or unmute zones of Constraints.

Remember that in the "Activators" module we can also animate the constraints (deactivate them), but from here, we can do it manually.

Brekeable Animation

The first option that we can animate is "Brekeable". We can, for example, tell the constraints that they are not breakeable. This will keep all the fractures together without breaking. We choose in which frame we want to activate "Breakable", click on the add Key button and at that moment, the constraints will be able to break. If we want to delete that animation, we simply click on the delete Key button.

Animation Glue Strength

This constraint option is very powerful. It allows to manually select the chunks and animate their constraints. We can choose in which initial frame to start the animation and what will be the strength of the constraints. Then we choose in which frame the animation will end and what will be the new strength of the constraints.

In this example, we can see how we select the lower part, and in frame 67 we indicate that its strength is 500. Then we indicate that in frame 70, its new value will be 0, in this way, the constraints will "turn off" and collapse the geometry.

We can add as many animations as we want to different chunks.


Mute Constraints

With the Mute Constraints option, we can turn off the constraints that we select. In this example, we can see the usefulness of this tool, creating a very organic simulation by simply muting certain constraints.