= Collisions = == RBD collision representations == Houdini supports two types of collision representations: _volume_ and _thin-plate_. Use volume-based collisions for normal objects, and thin-plate collisions for objects without volume. === Volume-based collision detection === Volume-based collision detection creates a _volume representation_ of each object. You can [visualize the volume representation of an object|visualization] and control how it is created with the options on the __Volume__ tab on the __Collision__ tab of an object's parameters. To detect collisions, Houdini intersects the _surface representation_ of one object with the volume representation of the other object, and vice versa. The default surface representation for geometry is just the object's points. This works well with dense geometry, but doesn't work well if an object has sharp edges or not many points. Alternatively, you can use _edges_ to represent the surface. In an object's parameters, click the __Collisions__ tab, then click the __Surface__ tab and set __Surface representation__ to "Edges". Edge representation is more expensive than using points, and for most complicated models it's unnecessary overkill. However, for certain geometry types, such as a cube without points on the faces, you will need to use edges. === Thin-plate collision detection === If your object has no volume (such as pieces of paper and ground planes), turn off __Use volume based collision detection__ on the object's __Collision__ tab to have Houdini treat it as a thin surface. If a thin plate object collides with a volume-based object, it uses volume-based collision. However, if two thin-plate objects collide, Houdini uses a per-triangle collision test. NOTE: Thin-plate objects do not stack well. If you need to stack them up, you should increase the minimum number of sub-steps on the DOP Network container node. == Cloth/volume collisions == When cloth and RBD volume objects collide, Houdini uses only the volume representation of the RBD object (it ignores the object's surface representation). So it is very important in the case of cloth/volume collisions to make sure the RBD object's volume representation is accurate: [visualize the volume representation of the object|visualization] and make sure it's accurate and it has a high number of divisions. You can control how Houdini creates an object's volume representation with the options on the __Volume__ tab on the __Collision__ tab of an object's parameters. Houdini uses the edges of the cloth object, with some detection of collisions inside the faces. However, the detection of collisions within faces is not perfect, so a slightly larger collision volume gives better results. The default cloth object has a collision volume offset of 0.01 (__Volume offset__ on the __Collisions__ tab) to help with this. When an object has a narrow gap (such as the armpit of a character), Houdini's volume representation can be inaccurate. Two possible solutions are to increase the divisions to a high value, which uses more memory and time, or to split the object into separate relatively convex objects (such as a torso and an arm). You can get _pinching_ when cloth is sandwiched between to volume objects, as often happens with cloth on character (in the gaps between torso and arms, thigh and calf, in hand/chest interactions, and so on). To deal with these situations more accurately, set the __Model__ parameter on the cloth object to "Fine". NOTE: Houdini does not currently support collisions between cloth and thin-plate objects. == Cloth/cloth collisions == This refers both to when two separate cloth objects collide, or when a cloth object collides with itself. Cloth/cloth collision detection is quite slow, and you should restructure your simulation to _avoid it whenever possible_. NOTE: It is very important that the _initial position_ of a cloth object must not have _any collisions_. If a cloth object starts with collisions, the solver cannot fix them.