# How to make an (open) object behave like rubber when penetrated by another

So uh i've got this problem with a penetrating object and another object that serves as something like a condom if you will

So what I want, is for the penetrating object to not deform while moving into this "rubber cylinder", while the rubber cylinder does deform and reshape itself to the outer form of the penetrating object. That is, if the pen. object is bigger than the entrance hole ofc.

Also, when the object leaves the "rubber cylinder" I want the outer edges to follow (mid object in picture) and then jump back (right object in picture)

Parenting the size and position of the "rubber cylinder"-entrance to the position of the penetrating object would work i guess, but I think it'd create problems when the pen. object enters from another angle (not perpendicular to the entrance). I just read another post where someone mentions Vertex Weight Proximity modifier in a combination with a cast modifier. Don't know if thats gonna work yet. Couldn't find the time to test it.

• Are you looking for a quick effect like example in answer ?
– Ratt
Dec 8, 2018 at 6:25
• Hey, thanks! Yea that looks great, too! I'll have to check that one out later :) Dec 8, 2018 at 10:48

You could use cloth physics for the deformation part.

Pin the corners or edges of the rubber object so it keeps its shape by adding it to a Vertex Group. Let the physics do the rest.

Not sure how one could do the holes. Weight Proximity could help fake it, I don't think there is any elegant solution with Blender. You can also assign each hole size to a shape key and manually control its diameter as necessary by keyframing the influence.

Another option is perhaps a Mask modifier that would hide those parts of the mesh.

This technique might work too. Punch holes in your mesh, Add a vertex group and set only the rim of the hole with a weight of 1. Also add creases to the edges when necessary.

Add a Subdiv modifier to form the circle shape of the hole, and a solidify to add thickness to the object.

Now add a cast modifier and set it first in order. Select only the Z Axis, set the Factor to 1 and the Radius to 2 (Might need tweaking depending on the scale of your scene).

Add a an empty object and set that to be the target of the cast modifier. Also set the vertex group to the one you just created.

Already we can see the effect of the cast modifier. Add your "penetrating" object at Z = 2. Right click into the Z field of its location and choose "Copy as new driver". Select the empty, right click into the Z field of its location and choose "Paste Driver".

The field should become purple. Right-click again in this field, choose "Edit Driver". Change the type from "Average Value" to "Scripted Expression" and in the expression field, type 2 - location. This should ensure the empty affectes the hole accordingly.

Move the penetrating object along the Z axis to see the effect :