AMASS is a massive motion library for the SMPL body model. More information about AMASS and SMPL are here and here respectively. Few examples are shown below:
We are interested in the contact of the mesh with the static environment where the static friction is acting during the motion. An example of such contacts is the foot contacts with the ground when a person is walking. It does not include the self contact of the person e.g. contact of two hands while clapping. It also does not include the contact with the objects in the environment which can be moved by the person e.g. a mug.
We calculate the probabilities of each joint/vertex being in contact at every frame. We hypothesize that:
If a joint is in contact then its velocity at that time instant will be zero.
Vertically lower joints are more probable of being in contact.
The probability of joint being in contact can be given as
,
where and are the contact probability of joint given its velocity and height from the lowest point og the body .
If the joint has a non-zero velocity, its contact probability is close to . We can model as
.
We model the as
Let us have a look how these models look like

Using equation (1), we visualize the body joints which are in contact. The sphere radius and the colour depends on the value of . The higher value corresponds to the bigger sphere radius.

We can clip the values to if they are less than a threshold value. If we fix the threshold value to be , the visualization looks like this.

In the real world, the body surface gets in contact with the environment, not the body joints. Let us use the above-mentioned method for the body vertices. We calculate instead of in the same way as . The visualization looks like this.

The code is not publicly available, however, it is available upon request.