Setting Up Collisions for Lagoa Effects

 
 
 

For most Lagoa simulation effects, you are going to need some sort of collision between the Lagoa-simulated object and a collision object. While this is a very simple setup to create, you can also customize the collision using several different options in a few different Lagoa compounds.

Image courtesy of Lagoa MultiphysicsTM

Collision Objects

A collision object is a solid object which obstructs the points of a simulated object, causing the points to interact with and move around it in some way. When Lagoa objects collide with a collision object's geometry, the collision object's actual shape is used.

The collision object can be any type of object with a surface (polygon mesh or NURBS surfaces), as long as its geometry is closed. Subdivision surfaces are not supported. As well, the collision object can be stationary or moving, and deforming or not.

While the resolution of the collision object is often important for an accurate collision, what matters most in Lagoa is the Substeps value in the Lagoa Simulate Multiphysics node. The higher this value, the more accurate the collision, but the longer the calculation time — see Setting the Simulation's Substeps for Accuracy for more information.

Below, the Substeps value is at 1, which is not enough to prevent the particles from penetrating the low-resolution box at their current velocity.

Below, the Substeps value is at 3, which keeps all the particles inside the low-resolution box.

Points in a Collision

The size of the points in the Lagoa object is taken into account upon collision. If you're using instances as the particle geometry, an approximated bounding sphere is created around it: its actual shape is not used. This is the same as in standard ICE particle collisions (non-rigid body collisions).

The point rotation is not calculated unless you select the Orient Particles option in the Lagoa Simulate Multiphysics node. This allows the particles to change orientation according to forces and collisions. You can see this easily when the particle shape is something like a building block or an irregular-shaped rock.

Creating Collisions in a Lagoa Simulation

These are the basic steps you need to follow to create any collision for a Lagoa simulation.

  1. Create a Lagoa ICE tree for a point cloud or polygon mesh with the required nodes as described in Creating a Lagoa Effect from Scratch.

  2. Create one or more collision objects. Put multiple collision objects in a group.

    TipGroups allow you to easily add collision objects to, or delete collision objects from, the group while keeping the same Get Data node plugged into the ICE tree. However, note that if you add objects to the group later then you still need to apply a Set Collision Data compound as described in the next step.
  3. For each collision object, create an unsimulated ICE tree and plug the Lagoa Set Collision Data node into a port on the ICETree node.

    You can also select each collision object and choose Particles Collision Lagoa Collision Set Collision Data from the ICE toolbar to do this.

  4. Set the options in each collision object's Lagoa Set Collision Data property editor to affect how points interact with only that collision object.

  5. To add collision objects to the Lagoa-simulated object's ICE tree, do any of the following:

    • Plug each collision object or group's Get Data node into the Passive Body In Name port on the Lagoa Simulate Multiphysics node.

    • If you're using a group of collision objects, select the group and choose Particles Collision Lagoa Collision Add Passive Body from the ICE toolbar. This creates a Get Data node for the group of selected collision objects and plugs it into the Passive Body In Name port on the Lagoa Simulate Multiphysics node.

    • If you select one or more collision objects that are not in a group and choose Particles Collision Lagoa Collision Add Passive Body, a group called Lagoa_PassiveBodies is created with these collision objects in it. The group's Get Data node is plugged into the Lagoa Simulate Multiphysics node.

    NoteTo remove a collision object from a group, select it and choose Particles Collision Lagoa Collision Remove Passive Body from the ICE toolbar. The Get Data node remains connected to the ICE tree, making it easy to switch out collision objects from the group.
  6. Raise the Substeps value in the Lagoa Simulate Multiphysics property editor to as high a value as you need to accurately solve the collision.

    The accuracy results depend on the force of the collisions and the complexity of the collision object's shape, but not on its resolution.

Setting Offsets from Collision Objects

To set an offset between the collision objects and points, there are two options you need to set:

  • Set the Material Collision Offset value in the Material compound (see Lagoa Main Material), which creates an offset in Softimage units between points that have this material and collision objects.

  • Select the Offset Method in the Lagoa Simulate Multiphysics node which allows you to define an offset from the collision objects for all materials used in this ICE tree.

Below, the Material Collision Offset value is set to 0.5 creating a slight gap between the particles and the boundary of the collision object.

Below, the Material Collision Offset value is set to 0.

Note that if the particles have a high velocity, they may penetrate the collision object if there is no offset. The best is to set at least a very small offset of 0.1 or so.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License