PTVR : a user-friendly open-source script programming package to create Virtual Reality experiments


  • Castet Eric
  • Termoz-Masson Jérémy
  • Delachambre Johanna
  • Hugon Christophe
  • Wu Hui-Yin
  • Kornprobst Pierre


  • Virtual Reality
  • Vision perception
  • Software

document type



Using Virtual Reality (VR) to investigate visual processing is a growing trend due to the high scientific potential of VR (allowing experiments in highly controlled environments and ecological scenarios), and to the increasing power of ever cheaper VR headsets. However, implementing VR experiments requires non-trivial programming skills that are long to learn. Alleviating this implementation process is thus a great challenge and should be guided by the success of existing script programming packages used to display stimuli on 2D monitors (e.g. the free, and open-source package PsychoPy). A step in this direction was achieved by the «Perception Toolbox for Virtual Reality» (PTVR) package (first presented at ECVP 2018) with the ambition to follow the same Open Science philosophy as PsychoPy but applied to VR. At ECVP 2022, we propose a consolidated and extended version of PTVR with many new features. We will describe, from scratch to finish, how any researcher familiar with Python programming can create and analyze a sophisticated experiment in VR with parsimonious code. A 3D visual search experiment will serve to illustrate the easiness with which: (1) 3D stimuli are positioned thanks to different coordinate systems, (2) online positions of the head, gaze, or remote controllers are used to point at the target interactively, (3) all the data are accurately recorded across time. We will also present the resources allowing researchers to quickly learn PTVR, notably hands-on demos included with PTVR and a website ( offering an extensive user manual.

more information