VR - dekay/vpinball-wiki GitHub Wiki

[!NOTE] At time of writing, only the Windows version of VPinball supports VR. That may change in the future as work is currently underway to port VPinball to the cross-platform OpenXR API.

Did you know that Visual Pinball supports VR Headsets so you can get your game on in 3D without a bulky cab filling up your basement?

The following sections documents some issues & quirks you might run into while setting up Visual Pinball in the context of VR play. This content largely comes from this post from Reddit's SuperFromND. He has more content on his personal site that also covers basic setup stuff as well.

[!TIP] The Virtual Pinball Chat Discord has a number of dedicated channels for VPinball VR enthusiasts where you can learn more: VR General Chat, VR Software, VR Hardware, and VR Tables.

Manually enabling VR mode for tables

A lot of recent tables (namely those by VPinWorkshop) can automatically detect if you're using VR and enable their VR-specific decorations and such accordingly. However, quite a few older tables don't so here's how to do that.

  • Open the table's .VPX file in the Visual Pinball Editor.
  • Go to the top of the window and open View -> Script. This will open a new window.
  • Press Ctrl-F to open the Find window, and search for either VRRoom or VR. The former is the standard used in VPinWorkshop's tables, but other names like VROn show up from time to time.
  • Once you find the variable with that name, change its value appropriately. Typically 0 means "VR is off", and 1 means "VR is on"; other numbers might also work if a table has multiple VR rooms.

Of course, there's also many tables that simply do not have VR-specific support (they'll run fine regardless, it'll just be a floating playfield in a black void without a backglass or DMD). There isn't really a catch-all solution to these tables without diving into modding VPX tables yourself, which is way beyond the scope of this page.

Improving performance for Oculus users: Use OpenXR instead of SteamVR!

For those on Oculus headsets (namely the Quest line, which are by far the most common VR headset according to Steam's hardware survey), normally you must run both their own Quest Link software and SteamVR simultaneously in order to run VPinball. As you can imagine, this ends up taking quite a hit on performance (which can be exacerbated if you're, say, trying to livestream VR pinball).

Luckily, there's an alternative: by replacing a DLL in Visual Pinball's data folder, it's possible to force the game to run via OpenXR, which massively improves performance since you can essentially bypass SteamVR this way. Here's how to do it:

  • Visit this Gitlab repository for OpenComposite/OpenOVR.
  • Scroll down to the section Per-Game Installation and click the download link for either a 32-bit or 64-bit DLL. The 64-bit DLL is most likely what you want.
  • Go to your Visual Pinball folder and find the DLL named openvr_api64.dll. Rename it to something else, like openvr_api64_steamvr.dll.
  • Drop in the DLL you downloaded from the above site.
  • Open Visual Pinball and go to Preferences -> VR Settings. Make sure that VR Mode is not set to VR autodetect, as otherwise Visual Pinball will crash upon starting any table.

Asynchronous Spacewarp; aka "Why did my FPS cut in half!?"

Most VR backends have a feature called Asynchronous Spacewarp (SteamVR calls this Motion Smoothing). Its purpose is to mask performance hitches when you're in VR by essentially rendering half as many frames and "making up the difference" and shifting around pixels of existing frames. For most VR games (especially ones where you're constantly turning your head and hands all over), this isn't really an issue, but it's very noticeable in Visual Pinball since your eyes are constantly tracking one or more silver balls moving quickly.

For Oculus headsets, you can turn this off by doing the following:

  • Open the Oculus Debug Tool. Assuming a default install, that should be located in C:\Program Files\Oculus\Support\oculus-diagnostics\.
  • Under Service, find the option labelled (PC) Asynchronous Spacewarp. Set it to Disabled.

For SteamVR, you can turn this off by going to your Video Settings and unchecking Motion Smoothing. If you aren't using the OpenXR mod described above, it is recommended that you disable this as well as Oculus ASW above.

Disabling the VPinMAME splash screen

On a stock install, every time VPinMAME starts a new ROM, you have to sit through a splash screen that only closes once you manually click on it. This turns into an annoyance really quickly if you're someone that switches between tables a lot. Here's how to disable it:

  • Open VPinMAME's Setup.exe / Setup64.exe.
  • Click Setup Defaults...
  • Enable Cabinet Mode. Click OK, then exit the setup program.

NVRAM Shenanigans

A decent number of later tables from Bally and Gottlieb / Premier will not accept coins or even really function without initialized NVRAM. You can do this manually by fiddling around in their Service Mode menus, but this takes a while and is pretty inconvenient.

To get around this, you can download this ZIP file (MediaFire mirror) and place its contents (a bunch of .nv files) into the nvram folder of VPinMAME. Now all of those tables should just work right out of the gate.