Imagine yourself in a bar, a watering hole of the most generic persuasion. There’s a pool table and a cluster of screens broadcasting the game, and while the music is lame and the lighting way too bright, the atmosphere doesn’t seem to be bothering anyone. On the dancefloor, a handful of people are swaying along to a monotonous beat.

At the bar, a tall blonde man is having a drink. He spots you, his gaze persistent, unwavering, and deeply unsettling. You would like nothing more than for him to stop.

Then you remove your virtual reality headset and his image fades away. He is not real.

This man—like every other patron in this fictional bar—is an avatar, part of a virtual environment created by researchers at the Université du Québec en Outaouais, near Ottawa. His creepy vibe is not my own interpretation: This character is designed to make the user uncomfortable. Eventually, he will rape them.

*

At the Cyberpsychology Laboratory in Gatineau, Quebec, a small team of psychologists has created what they call the first virtual reality environment designed exclusively to help survivors of sexual assault.

“A woman who is traumatized by a sexual assault will often avoid parties or social events they associate with the attack,” explained psychologist Claudie Loranger, lead researcher behind this project. “The first step in getting over this is exposing yourself to the places you’re avoiding.”

The author with Claudie Loranger. Image: Matt Joycey

For many survivors, this can be a daunting task. As such, Loranger and her team have devised virtual environments—a bar, which leads outside to a bus stop—to help ease patients into the process. Over the course of several sessions, people are able to progress through the scenes, triggering memories along the way. The final step is a VR version of a sexual assault.

The approach is based on a century-old method called exposure therapy, wherein those who’ve experienced trauma or people with phobias learn to cope by reliving the scarring incident or exposing themselves to what they fear. Exposure therapy is a well-established treatment option (with and without virtual reality) for veterans of war and many studies have shown the technique can alleviate symptoms of post-traumatic stress disorder, like anger and depression.

Montreal-based psychologist Mireille Lévesque specializes in the treatment of anxiety disorders. While she has never worked with virtual reality, she says exposure therapy is often the most effective part of a treatment program. With women who are survivors of sexual assault, however, Lévesque explained that the method must be introduced gradually and with utmost care.

“All trauma is difficult, but cases of sexual abuse are even more challenging because it’s the person’s intimacy that has been affected,” she said in an interview. “So the exposure has to be done in an extremely respectful manner.”

The VR bar environment. Image: Matt Joycey

Post-traumatic stress expert Dr. Bessel van der Kolk, one of exposure therapy’s most vocal detractors, would disagree. His take is that the approach doesn’t heal the person but rather dulls and desensitizes them from the experience.

“The premise that the trauma needs to be relived over and over in order to heal has questionable scientific merit, because the brain areas that go offline during a traumatic experience and precipitate PTSD are once again deactivated when people are pressed to recreate the horrors of the past,” van der Kolk wrote in 2015.

Iraq war vet David J. Morris has argued this treatment can actually make things worse for individuals, likening exposure therapy to something out of Clockwork Orange. “The problem with prolonged exposure is that it also has made a number of veterans violent, suicidal, and depressed, and it has a dropout rate that some researchers put at more than 50 percent, the highest dropout rate of any PTSD therapy that has been widely studied so far,” Morris wrote.

Putting on the 3D goggles. Image: Matt Joycey

In our conversation, Loranger acknowledged the different schools of thought when it comes to exposure therapy, but said the efficiency and safety of this approach has been well-documented. “There is a temporary discomfort but it’s really therapeutic in the long run,” Loranger told me. “That traumatic memory is too big for the brain to swallow in one shot, there’s like a blockage.” By retelling the story or visiting the site of the incident, she added, a person can progressively re-live the emotions it triggers, “which allows them to digest it in small bites.”

This brings us back to virtual reality, which is opening new doors in this field. The environments developed by the UQO team also feature a spider or snake-filled house to treat people with arachnophobia or ophidiophobia, respectively, and a grocery store setting to help people with social anxiety disorder, among others.

These VR environments are safe and controlled by practitioners, “so we can do a lot more than we would be able to in the real world,” Loranger said. The lab’s creator, Stéphane Bouchard of UQO, added that the VR environment—in this case, a bar—doesn’t need to be the same setting as the one in which the survivor experienced their assault, as long as emotions are being activated and discussed with the therapist.

The group’s studies are conducted in a dark windowless room which spans three stories, to accommodate the gigantic VR vault that sits in its centre. The $6 million cube boasts six video screens on which the virtual worlds are projected, providing a completely immersive experience. No VR helmet is required, but users must wear 3D goggles to make the images pop.

The aggressor in the simulation. Image: Matt Joycey

This setting is where I first met my would-be avatar aggressor, the sleazy blonde man with features reminiscent of a Sims character. Bouchard told me it’s important for the environments and their inhabitants to have a bit of a cartoonish feel. Roboticists call this phenomenon the “uncanny valley”: Humans typically distrust robots that look nearly human.

The concept also applies in VR, according to Bouchard, who holds the Canada Research Chair in Clinical Cyberpsychology, a field at the intersection of tech and psychology. “In virtual reality,” Bouchard told me, “when you attain a certain level of realism people start to focus on details, they’ll say, ‘Oh, the hair isn’t moving properly,’ and it will kill the experience.”

*

Over the course of my virtual journey, the blonde man followed me out of the bar, lurking, before coming to sit beside me on a bus stop bench. This is where the encounter is designed to become much harder to bear, first with verbal harassment, and then, the final assault. This part of the interaction is—thankfully—not seen. The projections faded to black, leaving me to process the sounds of unzipping clothing and heavy breathing.

Read More: Hoarders Are Confronting Clutter in Virtual Reality

“It’s like you dissociate,” said Bouchard, describing this part of the video. “You can’t see anything, voices are distant, you really want to leave it up to people’s imaginations.” This is also mostly to avoid re-traumatizing or shocking the patient.

Going through the whole ordeal—from the bar to the bus bench—took me about 10 minutes, but when integrated with a patient’s therapy program, exploring the environment can take weeks or even months. “In a therapy session, some people just want to stay in the bar,” Loranger said. “If that’s already activating emotions, we can stick to doing only that.”

The author. Image: Matt Joycey

She said the project, which is easily transferable to virtual reality headsets, has garnered international interest. It’s being used by psychologists in Quebec and Ontario, according to Bouchard, though he added that the field has been slow to incorporate this new technology into treatment plans.

Lévesque, the Montreal psychologist who is not involved with the project, said that while VR-based therapy still hasn’t made its way into her office, she’s keeping an eye on this type of application and is hoping to see more research. “I’m intrigued,” she told me, “and if it’s done well, it seems like a promising treatment option. I just want more information first.”

Until then, Loranger stressed that this is not an experience people should be doing at home, without the supervision of a professional. “You really have to be accompanied by a psychologist, who will be able to gauge what you’re ready to experience.”

Get six of our favorite Motherboard stories every day by signing up for our newsletter.