
When a Dropped Frame Becomes a Clinical Problem
When a Dropped Frame Becomes a Clinical Problem What building a therapeutic VR environment taught us about performance, comfort, and realism
Spots 

When a Dropped Frame Becomes a Clinical Problem What building a therapeutic VR environment taught us about performance, comfort, and realism

We started building a virtual reality environment for de-addiction therapy expecting the hardest part to be making the virtual world look convincing.
The real challenge was making the environment convincing enough to feel real, while comfortable enough for someone to stay inside it.
The idea behind the experience is called cue exposure. A patient enters a virtual environment that resembles a place where they might normally drink, experiences the associated triggers, and practises refusing them with a clinician present. On paper, it sounds a lot like game development. But there's one major difference: The person wearing the headset isn't there to play a game. They're there for therapy. That changes how you think about almost everything.
A frame drop that a gamer might ignore can make a patient nauseous. A slightly unrealistic surface can break immersion. A camera movement that feels natural to a developer can make a first-time VR user uncomfortable. So we started looking at every technical decision through one question: Does this make the experience better for the person wearing the headset? Does this make the experience better for the person wearing the headset? Here are some of the lessons we learned. The Room Is Written, Not Just Built Most 3D environments are built visually.
You open an editor, place a building, move some furniture, adjust the lights, and keep tweaking until everything looks right. We took a different approach. The entire environment — building, yard, furniture and lighting — is generated through code. That may sound like extra work, but it becomes extremely useful when the environment keeps changing. For example, our ceiling fans are positioned based on the roof trusses. If the roof changes, the fans automatically move with it.
There isn't one person remembering where everything belongs and manually fixing it later. There is one shared definition of the structure. The same approach also keeps the reasoning behind decisions.
If we deliberately make a fan rotate more slowly than a real fan because faster movement could affect comfort, that decision can live alongside the implementation. Six months later, another developer doesn't have to wonder: "Why is this fan rotating so slowly?" The answer is already there. For a project that gets rebuilt repeatedly based on clinician feedback, that matters. Comfort Isn't a Polish Issue In normal software development, performance and visual polish can sometimes be treated as improvements that come later. In clinical VR, they are part of the experience itself. One of the biggest issues is motion sickness.
When your eyes see movement but your inner ear doesn't experience the same movement, your brain receives conflicting information. Even something as simple as turning can create this problem. Smooth turning vs. snap turning Smooth turning looks natural. You move the controller, and the entire world rotates continuously around you. The problem is that your head hasn't actually turned. For some users, especially people new to VR, this can cause discomfort. Snap turning works differently. Instead of continuously rotating the world, it turns the view in fixed steps. It isn't as visually natural, but it can be much more comfortable. We kept both options available, but made the more comfortable behaviour easy to enable. The important part isn't choosing one option forever. It's giving the clinician control over the experience.
Even the Ground Can Become a Problem We wanted the outdoor environment to feel natural. A completely flat yard looked too much like a game level. So we introduced uneven terrain. Then we discovered the problem. When the user walks over a bump, the camera moves up and down. In a normal game, that's expected. For a VR patient, that movement can contribute to discomfort. So instead of removing the realistic terrain completely, we controlled where it appears.
When a Dropped Frame Becomes a Clinical Problem What building a therapeutic VR environment taught us about performance, comfort, and realism
