Real-time surgical slicing in VR: lessons from Medical Surgery VR

How we built a VR surgical training scene in Unity where a scalpel cuts anatomy in real time, the halves separate like tissue, and models can be scaled, rotated and turned into holograms, plus what to plan for if you're commissioning one.

Medical training is one of the strongest cases for virtual reality. Students can handle anatomy at any scale, look inside it, and practise a cut as many times as they like, with no specimens used up and nothing to clean. The hard part is making the interaction feel right. A scalpel that clips through a model, or a cut that leaves two halves jittering on the table, breaks the illusion at once.

This article walks through how we approached those problems in Medical Surgery VR, a Unity 6 training app for VR headsets, and what to plan for if you’re commissioning something similar.

What the app does

Medical Surgery VR has two scenes.

The operating room. A fully dressed hospital room with an operating table, surgical tools and anatomy models. Trainees pick models up, scale and rotate them, switch them to an X-ray-style hologram to see inside, and cut them with a scalpel.

Brain Deep-Dive. A dedicated inspection mode for one high-detail brain model. The left joystick orbits around it, the right joystick zooms, and two buttons switch between normal shading and a glowing holographic scan.

It’s built on OpenXR, so it isn’t tied to one headset maker, and on Unity’s XR Interaction Toolkit for grabbing and controller input. AR Foundation is in place for a future augmented-reality version.

Problem 1: a cut that feels surgical

Real-time mesh cutting means taking a 3D model and splitting it into two along a plane, while the user watches. We used EzySlice, an open-source Unity library, to do the geometric cut. The scalpel detects when its blade touches a model that’s marked as sliceable, and the cut plane follows the blade.

The library only returns two raw pieces of geometry, though. Everything that makes them behave like objects had to be built around it:

  • A cross-section material. The newly exposed face gets its own material, so the inside of the cut looks different from the outside.
  • Colliders and physics. Each piece gets a collider and a rigidbody so it can rest on the table and be picked up again. We use continuous collision detection so fast movements don’t tunnel through surfaces.
  • A reset. Trainees practise the same cut repeatedly, so one action restores the original specimen.

The lesson: the slicing library is maybe a fifth of the work. Budget for the pipeline around it.

Problem 2: halves that separate cleanly

After a cut, real tissue opens up. In a physics engine, two pieces created in exactly the same place tend to push each other apart violently, or sink into the table.

Our solution keeps the lower piece fixed in place (kinematic) at its original position, then releases the upper piece to gravity after a short delay, so it peels away instead of exploding. Getting that right took careful offsets and checking over several frames that neither piece was clipping through the other or the table. It’s a small detail that trainees notice immediately if it’s wrong.

Problem 3: grabbing, scaling and rotating in 3D

Desktop 3D tools have gizmos: arrows and rings you drag with a mouse. In VR there is no screen to drag on, so we built a bounding-box manipulator from scratch:

  • 8 corner handles scale the model. The scale comes from the real-world distance between the controller and the model’s centre.
  • 12 edge handles rotate it. Each edge rotates around one axis, calculated from where the controller is relative to the model.
  • A wireframe box drawn around the model shows its extent while you work.

One subtle issue is drift. If each frame adds a small rotation to the last, rounding errors add up and the model slowly turns by itself. We calculate every frame’s rotation from the orientation the model had when the grab started, which keeps it perfectly stable.

Problem 4: looking inside

Seeing internal structures is half the point of anatomy training. A custom shader turns any model into a semi-transparent hologram with one toggle, and back again. In Brain Deep-Dive, the orbit camera had to glide over the top and bottom of the brain without the sudden flips that a simple “look at” camera produces at the poles. We orbit around the brain’s own horizontal axis for up-and-down movement and the world’s vertical axis for left-and-right, which keeps control smooth all the way round.

If you’re planning a medical VR simulator

Start with the learning outcome. “Practise a cut” and “learn the anatomy of the brain” lead to very different apps. Decide what trainees should be able to do afterwards, then design the interactions around that.

Check the anatomy with a clinician. We build the interaction and rendering. A medical expert should review models, labels and procedure steps before anything is used for teaching.

Plan for the headset you’ll use. Standalone headsets like Meta Quest are convenient for classrooms but have less graphics power than a PC. High-detail anatomy may need simplified models or a PC-tethered setup.

Think about measuring. Training apps get more valuable when they record what happened: time taken, steps completed, mistakes made. Our Hospital Ward Simulator and Lab Survey projects show other ways to structure scenarios and feedback.

Leave room for AR. If you might want to show anatomy on a real table or a mannequin later, building on OpenXR and AR Foundation from the start keeps that option open.

In short

A convincing surgical simulation comes down to small physical details: a cut that tracks the blade, pieces that separate the way tissue does, models that stay where you put them, and a quick way to see inside. None of them is a single feature you can switch on. They come from careful engineering around the core tools.

If you’re planning VR training for a hospital, medical school or med-tech product, tell us what you’d like trainees to practise and we’ll suggest how we’d build it.

Work mentioned in this article

Your next big idea.
Let’s build it together.

Share your vision with InfoTechsRealm. From websites and apps to immersive digital experiences, we bring design and engineering together to create something your users will love.