Зіткнення – Collision#

There are two different collision types that you may use: collision between different objects and internal collision. We should set one thing straight from the start – the primary targets of the collision calculation are the vertices of a soft body. So if you have too few vertices too few collision takes place. Secondarily, you can use edges and faces to improve the collision calculation.

Зіткнення з Іншими Об’єктами – Collisions with Other Objects#

Для зіткнення м’якого тіла з іншим об’єктом є кілька передумов:

  • Якщо задано Колекцію Зіткнення – Collision Collection, то об’єкт повинен належати цій колекції.

  • Об’єкт зіткнення має бути сітьовим об’єктом.

  • You have to activate the Collision in the Physics tab for the collision object. The collision object may also be a soft body.

Examples – Приклади#

Куб, що є м’яким тілом та зіштовхується з площиною (Ілюстрація Куб, що є м’яким тілом, зіштовхується з площиною.) працює досить добре, але площина, що є м’яким тілом, падає прямо крізь куб, хоча передбачається, що вона має з ним зіткнутися (Ілюстрація Площина, що є м’яким тілом, зіштовхується з кубом так, що немає жодної взаємодії взагалі.).

../../_images/physics_soft-body_collision_cube-plane-1.png

Куб, що є м’яким тілом, зіштовхується з площиною.#

../../_images/physics_soft-body_collision_cube-plane-2.png

Площина, що є м’яким тілом, зіштовхується з кубом так, що немає жодної взаємодії взагалі.#

Why is that? Because the default method of calculation only checks to see if the four vertices of the soft body plane collides with the cube as the plane is pulled down by gravity. You can activate Collision: Face (in the Soft Body Edges panel) to enable collision between the face of the plane and the object instead, but this type of calculation takes much longer.

Давайте ближче подивимося на розрахунок зіткнення, щоб ви могли мати уявлення, як ми можемо його оптимізувати.

Розрахування Зіткнень – Calculating Collisions#

Soft body simulations are by default done on a per-vertex basis. If the vertices of the soft body do not collide with the collision object, there will be no interaction between the two objects.

In the video below, you can see the vertices colliding with a plane. If a vertex penetrates the zone between Outer and Inner, it is repulsed by a force in the direction of the face normal. The position that a vertex finally ends up in is dependent on the forces that act upon it. In the example (the first vertex on the left in the video below) gravity and the repulsion force of the face balance out. The speed at which the vertex is pulled out of the collision zone is influenced by the Choke parameter in the Soft Body Solver settings.

Дивись також

Download the blend-file.

Now let’s see what happens if we make vertices heavier and let them travel at a faster speed. In the video above, you can see vertices traveling at different speeds. The two on the far right (fifth and sixth) are traveling so fast that they pass right through the collision zone (this is because of the default solver precision, which we can fix later). You will notice that the fourth vertex also travels quite fast and because it is heavier it breaches the inner zone. The first three vertices collide correctly.

You can set up your collision so that edges and even faces are included in the collision calculation in the Soft Body Edges panel with the Collision Face and Edge options. The collision is then calculated differently. It is checked whether the edge or face intersects with the collision object, the collision zones are not used.

Добрі Зіткнення – Good Collisions#

Якщо зіткнення, яке ви уклали, не поводиться належно, то ви можете спробувати наступне:

  • The soft body object must have more subdivisions than the collision object. Add loop cuts to the soft body object in strategic areas that you know are most likely to be involved in a collision.

  • Перевірте напрямок нормалей граней.

  • Якщо об’єкт зіткнення має гострі піки у своїй формі, то вони можуть пронизувати м’яке тіло.

  • The resolution of the solver must match the speed at which soft body vertices are traveling. Lower the parameter Error Limit and carefully increase Min Step.

  • Значення Outer та Inner для об’єкта зіткнення повинні бути достатньо великими, але зони протилежних граней не повинні перекриватися і ви не маєте мати сили у протилежних напрямках.

  • Якщо ви використовуєте потужні сили, то ви повинні використовувати великі зони.

  • Задайте для Choke достатньо високе значення (для усієї симуляції, якщо необхідно), якщо ви маєте труднощі з виштовханими вершинами.

  • Colliding faces are difficult to control and need long calculation times. Try not to use them.

Часто краще створити спрощену сіть для використання як об’єкта зіткнення, однак, це може бути важко, якщо ви вживаєте для цього анімовану сіть.

Само-Зіткнення – Self-Collisions#

For information on self-collision please refer to the Само Зіткнення – Self Collision settings.