VTK on the Oculus Quest 2: Ongoing

So just as a small update I’ve gotten some of the VTK.js examples to work on the Quest, progress is slow as I’m only working on this on weekends. Here are some initial findings:

The Quest 2 is surprisingly capable at rendering, the XR2 chipset and 6GB of RAM gives the HMD a reasonable performance. Volume rendering is a struggle but remains at least somewhat usable, I’d estimate that it’s rendering somewhat around 30FPS for complex DICOM data like what’s shown below. That’d probably be fine for normal screens but gets a bit nauseating in VR. Scenes without volume data render at the native 90FPS.

If you’re wondering it’s completely possible to stick your head directly into the chest, there’s no noticeable near-clipping so you can have a pretty freaky experience.

To use room-scale VR you have to utilize a secure connection so HTTPS is an absolute necessity, the current implementation of the web server used with the VTK.js examples is HTTP-only by default but can be converted my modifying the server config file. Additionally to actually use VR the render window must invoke a VR event after the webpage has finished rendering, the easiest way to do this is to use a JavaScript function tied to a HTML button.

Because of the secure connection utilizing functions that import local data has proven problematic (read impossible atm). I believe it’s something to do with how the HTTP proxy works however it’s a challenge to debug. Loading external datasets that are hosted with HTTPS seems to work fine.

Controllers have no input once within the VR render, the joystick is used for zooming when in a traditional render so presumably there’s still some functionality there. The controllers are only visible in the gif due to the recording method, in normal usage they’re completely absent.

I still haven’t been able to convert the ParaView export script into something usable by VTK, if anyone has a workable function for exporting all the actors in a scene into something that can be easily read by VTK.js that would be appreciated.

It turns out that ParaView Glance has a VR rendering option that works in a very similar manner to the vtk.js method, I didn’t notice it tucked in the global settings as it only exposes itself when inside a VR-ready browser. About half of the examples work fine (namely the opaque geometry), volumes are painfully slow to render and it looks like the eye spacing is set incorrectly. All the menu options seem to work well, the error dialogue presented “NS_ERROR_NOT_AVAILABLE” and failed to render, not entirely sure what that means.

All in I’m pretty happy, it’s obviously not as good as a PC-based render using VTK with VR bindings but for a standalone implementation with zero installation required it’s quite neat.