Updated December 5, 2018

Blog | Restraining Objects

In Virtual CRASH 3 and 4, it’s possible to restrain the motion of objects by strategically using joints or the rope tool. In this post we’ll review different ways objects can be restrained, including multibodies.

In the simple example below, a sphere is attached to a box. The box is a terrain object and therefore cannot move. A spherical joint is used to connect the sphere to the box. Even though the sphere is given an initial velocity, the sphere’s motion is restrained by the joint connection. Remember, you can learn more about using joints in this post: https://www.vcrashusa.com/blog/2018/6/7/building-complex-systems-with-joint-tools

It is highly recommend to read this post before continuing.

Spherical joints can be used to easily restrain the motion of multibodies. First, convert the multibody to a rigid body (see https://www.vcrashusa.com/guide-chapter20/#Multibody). Now, simply attach a spherical joint to the multibody’s torso. In the below example, we’ve simulated the effect of a safety harness by attaching a spherical joint to the torso and to an immovable object. This prevents the multibody from falling to the ground.

Let’s return to our simple box and ball simulation. Turn off the simulator to make it easier to attach the rope tool. To select the rope tool, simply left-click on “joints”, left-click on “create rope”, left-click on the first object, then right-click on the second object. The two objects will then be connected. Notice in the video, we expand the “joints” menu of the rope tool to access the spring stiffness and damping values for the rope. The rope is constructed of an array of rigid body spheres connected by spherical joints. The spherical joint spring stiffness and damping coefficients can be easily modified to create the desired amount of elasticity. You can easily change the mass per unit in the rope by left-clicking on the rope object in the left-side control panel labeled “chain” and then by left-clicking on “mass properties”. The total weight for the rope tool will be divided among the individual spheres that compose it.

Remember, for any joint in Virtual CRASH, including multibody ragdoll joints as well as spherical joints used by the rope tool, the spring stiffness and damping coefficients are re-scaled internally such that:

$$ k_{internal} = {m_{1}+m_{2} \over 1~kg} \cdot k_{user~input} $$


$$ b_{internal} = {m_{1}+m_{2} \over 1~kg} \cdot b_{user~input} $$

where \(m_{1}\) and \(m_{2}\) are the masses of the connected objects. This conversion helps ensure simulations remain stable for increases in linked object masses.

Note: If one of the connected objects is infinite in mass (using Physics > Make Unyielding / Terrain from Selection), then the internally used spring constant is:

$$k_{internal} = {m \over 1~kg} \cdot k_{user~input}$$


$$b_{internal} = {m \over 1~kg} \cdot b_{user~input}$$

where \(m\) is the mass of the finite mass rigid body object.

You can learn more about the various spring and damping input values used by joints in the Short Glossary: https://www.vcrashusa.com/short-glossary/

When a rope is created, a default spring and damping value are used for the “fix orientation” property of the joints within the rope (see Short Glossary). These inputs will essentially control the torque resistance to “bending” — that is, the resistance of each joint’s change in articulation angle. As the spring and damping values are increased, you will notice the rope’s overall resistance to bending also increase. Note that neighboring spheres will not directly interact because of the “disable before break” option being enabled in the “contact” menu for the rope’s joints; however, non-neighboring joints can interact. You can also re-enable neighboring joint interactions if desired by deselecting this feature.

Wrapping objects with a rope

In the above example, each end of the rope is attached to the connected objects. We can also restrain objects by wrapping the rope tool around them. This takes practice. In the video below, we’ll use two ropes to restrain the forward motion of a rigid body cylinder. Note, after you’ve selected the rope tool, the first left-click will attach the starting end of the rope to the object your mouse is hovering over. As you left-click on additional objects, new lengths of rope will be created that link the prior point and the current point you left-click on, but the rope will not be attached to these additional points. The end of the rope will be attached to the final object you right-click on. The video below shows the cylinder shape itself being used to help shape the rope. After each rope is created, the cylinder can be repositioned as needed, but the ropes’ shapes remain in their initial configuration until the simulation starts. As the cylinder moves forward, the ropes stop the forward travel of the cylinder, and the aggregate effect of the joint spring forces cause the cylinder to reverse direction. Each sphere within the rope exchanges contact impulses with the cylinder using the default-auto impulse model. Note that if the cylinder’s initial speed is too high, the cylinder travels through some of the spheres. To counter-act this, simply reduce the integration time-step size to ensure that the distance traveled between time-steps isn’t too large.

You can also use “dummy” objects to help shape the rope. In the example below, we use three rigid body spheres to help shape the rope’s initial configuration. This is often useful because the camera cannot be repositioned while a rope is being created. Note that for the second rope, we use one of the spheres in the first rope to help form its shape. You can also attach the starting or ending point of a rope to spheres within another rope.

Restraint in a moving rigid body object

In the video below, we create a moving sled with restraints to stop the forward motion of our box. Note that since we wanted to better place the start and end point of our rope, we used dummy spheres to place the start and end of our rope at the desired height, then used spherical joints to connect these points to the sled.

Restrained multibody in a vehicle

Using the same techniques described above, we’ll now add restraints to prevent forward motion of a multibody object. Here you can use the spring and damping values in the “joint” menu to fine-tune the maximum amount of forward travel required for your simulation or visual aid. Notice, in the video below, the upper portion of the shoulder restraint needed to be adjusted by simply deleting the automatically created joints, moving the spheres as needed, and reattaching with new spherical joints. You are also free, of course, to insert new spheres to create additional links as needed. You can even build a restraint by hand starting from your own collection of rigid body spheres.

Tie down one vehicle (or object) to another

Using the techniques shown above, we secure a passenger car to a lowboy using 8 tie points. To better control the start and end points of our rope tool, we use dummy spheres. The first and last sphere of each chain object is finally secured using spherical joints. In order to see the sensitivity of our system’s behavior to various inputs, we spend some time adjusting damping and stiffness values, as well as integration time-step size.

Custom rope or chain

The rope tool is a nice time saver since it will generate a series of connected rigid body spheres for you and automatically connect end points; however, you can also create your own rope out of any collection of rigid bodies. The video below shows how to make a simplified chain out of ellipsoids. Such a simplified chain may be useful for computational efficiency as it requires fewer spherical joint calculations.