Department of Psychology and Centre for Vision Research, York University, Toronto, Ontario, Canada.
Department of Psychology, Carl von Ossietzky University of Oldenburg, Oldenburg, Germany.
J Vis. 2022 Dec 1;22(13):1. doi: 10.1167/jov.22.13.1.
Virtual reality (VR) displays are an increasingly popular medium for experiments on visual perception. This presents the challenge of showing precisely controlled stimuli on devices that were not primarily designed for research. Here we describe methods for controlling stimulus luminance in VR experiments created in Unity using the Built-in Render Pipeline. We discuss the Gamma/Linear setting, measuring luminance in a VR headset, and using color grading in Unity's Post-Processing Stack to make stimulus luminance proportional to achromatic RGB value. We provide MATLAB code that uses luminance measurements from a VR headset to generate the lookup table that Unity requires for linearizing luminance. We emphasize that when creating experiments in this complex environment, it is important to experiment with the rendering process to confirm that stimuli are displayed as expected. We show results of several such tests and provide code as a starting point for readers who wish to run further tests related to their own research.
虚拟现实 (VR) 显示器是用于视觉感知实验的一种越来越受欢迎的媒介。这就提出了一个挑战,即在最初并非专为研究设计的设备上展示精确控制的刺激。在这里,我们描述了在 Unity 中使用内置渲染管道创建 VR 实验时控制刺激亮度的方法。我们讨论了 Gamma/线性设置、在 VR 耳机中测量亮度以及在 Unity 的后处理堆栈中使用颜色分级使刺激亮度与非彩色 RGB 值成比例。我们提供了 MATLAB 代码,该代码使用 VR 耳机中的亮度测量值生成 Unity 为线性化亮度所需的查找表。我们强调,在这个复杂的环境中创建实验时,重要的是要通过实验来确认渲染过程,以确认刺激是否按预期显示。我们展示了几个这样的测试结果,并提供了代码作为希望运行与自己的研究相关的进一步测试的读者的起点。