Otis solver external collisions

   946   6   1
User Avatar
Member
66 posts
Joined: 2月 2016
オフライン
How do you setup external collision? For example a medicine ball hitting the character's belly.

The docs only say:

Unlike Vellum, there are only two inputs to the solver, one for the Geometry and one for Constraints. Currently, any collision geometry must be pinned simulation geometry.
Edited by jarjarshaq - 2025年11月26日 18:25:03
User Avatar
スタッフ
68 posts
Joined: 6月 2024
オフライン
Specify a group for your external collider, then merge it with the bone input. After your Otis Configure, put down a point wrangle that runs over that group with the following snippet:
i@collisiongroup = 10;
i[]@collisionignore = {0};

Furthermore, your collider must have a `tpose` attribute, and be triangulated.

On your Otis Configure node you'll want to make sure that the Bone Group field excludes the collider, so that it doesn't have any constraints created with it, although if your collider is far away on the start frame then that probably won't happen anyway.

I'll look into updating this on the docs.
Liesbeth Levick
Technical Director: CFX
SideFX
User Avatar
Member
8 posts
Joined: 5月 2018
オフライン
Hi Liesbeth,
I’m wondering what is the snippet doing, why those numeric values? How do the Otis collisions work?
Coming from Vellum, I see this snippet is using integers instead strings.
Thank you.
User Avatar
スタッフ
68 posts
Joined: 6月 2024
オフライン
For i@collisiongroupa value of 1 is used for muscles and bones, 2 is for the tissue core (aka fascia) surface, 3 is for the tissue outer surface. Everything else (internal tissue points not at either surface) uses 0. The value of 10 that I chose above is somewhat arbitrary. I could have gone for any number greater than 3, but I went for 10 so that if we decide to add more "groups" in the future, we have a buffer of some unused values. We've been considering putting the bones in a separate collision group for instance, so then 4 would be taken.

i[]@collisionignorespecifies which of the collisiongroup values to ignore as colliders. You always want 0 in this, as we don't want the internal tissue points to collide, so if it's only 0 it collides with everything else, if you want it to collide with only the muscles and bones, for instance, it would be i[]@collisionignore= {0,2,3};.
Liesbeth Levick
Technical Director: CFX
SideFX
User Avatar
Member
8 posts
Joined: 5月 2018
オフライン
Really helpful, thanks a lot Liesbeth!
User Avatar
Member
8 posts
Joined: 5月 2018
オフライン
Hi again, is there a way in Otis to exclude collision between muscles. For example if I want to exclude all left leg muscles with the right leg ones.
Thank you.
User Avatar
スタッフ
68 posts
Joined: 6月 2024
オフライン
DobleDe
Hi again, is there a way in Otis to exclude collision between muscles. For example if I want to exclude all left leg muscles with the right leg ones.
Thank you.

The first thing you'll do is create a left_leg group and a right_leg group. These can be prim groups and specified on the muscles before they go into the Otis Muscle and Tissue Configure node.

Then after the Otis Configure node, you'll create three point wrangles.

For the first one, specify "left_leg" as your group, and then use the snippet:
i@collisiongroup = 7;
i[]@collisionignore = {0,3,8};

For the second one, specify "right_leg" as your group, and then use the snippet:
i@collisiongroup = 8;
i[]@collisionignore = {0,3,7};

Your third point wrangle won't have any group specified, and the snippet is:
if (find(i[]@collisionignore, 1) > 0)
{
    append(i[]@collisionignore, 7);
    append(i[]@collisionignore, 8);
    i[]@collisionignore = sort(i[]@collisionignore);
}

So basically what we're doing is assigning all left leg muscles a collisiongroup attribute value of 7, and all right leg muscles are 8. By default the muscle and bone collisiongroup value is 1 and the collisionignore settings for it are {0,3}, so for the left leg we use a collisionignore of {0,3,8} (muscle defaults plus right leg), and {0,3,7} for the right leg.

We then need to ensure that all the other points still treat them like muscles for collisions, so any points that need to ignore collisiongroup=1 (muscles and bones) will have 7 (left leg) and 8 (right leg) appended to their collisionignore attribute.

The choice of 7 and 8 is somewhat arbitrary. It can be anything greater than 3, but I went a bit higher to leave a buffer in case we ever add extra collisiongroups by default.
Edited by Liesbeth_Levick - 2026年3月4日 14:14:43
Liesbeth Levick
Technical Director: CFX
SideFX
  • Quick Links