Ratcave: A 3D graphics python package for cognitive psychology experiments

  • PDF / 3,134,652 Bytes
  • 9 Pages / 595.276 x 790.866 pts Page_size
  • 58 Downloads / 161 Views

DOWNLOAD

REPORT


Ratcave: A 3D graphics python package for cognitive psychology experiments Nicholas A. Del Grosso 1 & Anton Sirota 1

# The Author(s) 2019

Abstract We present here a free, open source Python 3D graphics library called Ratcave that extends existing Python psychology stimulus software by allowing scientists to load, display, and transform 3D stimuli created in 3D modeling software. This library makes 3D programming intuitive to new users by providing 3D graphics engine concepts (Mesh, Scene, Light, and Camera classes) that can be manipulated using an interface similar to existing 2D stimulus libraries. In addition, the use of modern OpenGL constructs by Ratcave helps scientists create fast, hardware-accelerated dynamic stimuli using the same intuitive high-level, lightweight interface. Because Ratcave supplements, rather than replaces, existing Python stimulus libraries, scientists can continue to use their preferred libraries by simply adding Ratcave graphics to their existing experiments. We hope this tool will be useful both as a stimulus library and as an example of how tightly-focused libraries can add quality to the existing scientific open-source software ecosystem. Keywords 3D graphics . Python . Stimulus software . Vision . 3D Cognitive psychology and neuroscience experiments use software that presents stimuli to a subject, detects subject responses, and logs events for future analysis, all with high temporal accuracy. An ever-expanding list of other features included in this software are compatibility with third-party hardware devices (e.g. button boxes, amplifiers, eye tracking systems), support for custom experimental designs, and online analysis for adaptive stimulus sequences; these tools are available both as selfenclosed software solutions (e.g. Neurobs Presentation, BCI2000, SuperLab, E-Prime) and open-source libraries (e.g. Psychtoolbox by Brainard, 1997; PsychoPy by Peirce, 2007; VisionEgg by Straw, 2008; Expyriment by Krause & Lindemann, 2013; for a review of psychophysics libraries, see Kötter, 2009). However, these popular libraries are missing 3D graphics support, needed for a wide range visual psychophysics Electronic supplementary material The online version of this article (https://doi.org/10.3758/s13428-019-01245-x) contains supplementary material, which is available to authorized users. * Anton Sirota [email protected] 1

Bernstein Centre for Computational Neuroscience, Graduate School of Systemic Neurosciences, Faculty of Medicine, Ludwig-Maximillians-Üniversität München, Großhaderner Straße 2, 82152 Planegg, Germany

experiments, such as 3D mental rotation or object recognition, virtual reality in spatial navigation research, to name a few. While 3D graphics libraries do exist in Python (e.g. Panda3D, PyOgre, Vizard) and other languages (e.g. Unity3D, Unreal Engine), the stimuli, logging, and hardware support of all of these libraries are designed to work with the windows and event loops they supply, making it difficult to integrate 3D graphics functionality into different