During early prototyping of Shattered (Unity - Quest 3 Mixed Reality), we experimented with placing cracks on the player’s wall that would open up with water gushing in, eventually filling the player’s room.

I created some cracks in Blender and used Shape Keys to animate them opening. In the image below, the front-facing polygons are set to blue and the back-facing polygons to red.

Shattered Blender Wall Cracks

Here’s an example of a test crack opening from top to bottom using Shape Keys.

Shattered Blender Wall Cracks

To ensure that the front-facing polygons were only visible through the opening and hidden when the crack was closed, I created stencil mask meshes.

The stencil masks also needed Shape Keys to animate in sync with the cracks.

In this example, we have the crack mesh in a new scene. It disappears once we rotate it far enough that we can no longer see through the stencil mask.

Shattered Wall Crack Rotate

And here’s the final result in a new scene. When the stencil mask is closed, the crack’s front-facing polygons are completely hidden. Shattered Wall Crack Opens