VR + mocap prototype
Combining VR and full-body motion capture for highly physical virtual experiences.
tl;dr
This is a prototype VR game where two players fight with foam swords on a motion capture stage. The mocap data is streamed to the VR headsets to drive lightsabers and full-body characters in VR.
![](mocap/fight2.png)
I work with some pretty awesome people. VR light saber battles at the @PurdueRCAC Envision Center 20th anniversary open house today 🤖 ⚔️
— Paul Branham (@BoilerPaulie) April 17, 2024
Best use of PVC pipe and pool noodles that I’ve ever seen, but the VR goggles and mocap suit obviously take it to a whole other level 👌🏼 pic.twitter.com/jqHgVm2TUJ
tracking & calibration
![](mocap/fight.jpg)
OptiTrack's official plugin for Unity supports neither 1:1 skeletal tracking nor Android & Meta Quest. I instead modified an old third-party plugin compatible with Android to support 1:1 skeletal tracking and the latest version of OptiTrack's NatNet API.
![](mocap/swords.jpg)
While OptiTrack supports VR headset tracking, the Meta Quest already tracks itself and with less latency. I wrote a system to initially calibrate a headset's spatial orientation to the mocap stage's. Once calibrated, the headset is responsible for its own tracking.
visuals
![](mocap/snapshot1.png)
Bright light trails are a lightsaber signature. I wrote a simple mesh trail script that moves vertices behind the sabers as they swing.
![](mocap/scene1.png)
I used several CC0 assets from PolyHaven.com and AmbientCG.com to create a placeholder lava planet environment. The robot model is a Unity standard asset.
thanks
I'd like to thank my friends Hazel & Matthew for testing and also coming on a late-night run to buy pool noodles for the swords. Thank you!