Half-Life VR: episode one on the way

We’re currently in the process of wrapping up the latest release of Half-Life VR, which will include HL2: episode 1 VR support.  Over the last month a lot of work has gone into the mod, in both new features and fixing bugs (many of which are just elements of the source engine that just didn’t translate to VR very well). While the razer hydra is perfectly fine for our current work, we’re really looking forward to adding sixense STEM support when the developer kits come out next year and have plenty of ideas for ways to utilize the additional trackers.

In addition to working out the issues in Episode 1, here’s a list of some of the features that’ll be included in the next release:

  • Hud integrated in-game – You’ll notice in the video the HUD is not integrated in-game and shows the weapon ammo information directly on the side of the gun.  On the back of gordon’s right hand you’ll see an HEV overlay showing health and suit stats (like looking at a watch).
  • Fixed aim vectors – the dirty little secret (or maybe obvious part if you played much ) of the last release was that the weapons were still shooting from eye center the same way they normally do in source games. This is corrected now (as it was in the older 2007 versions of the mod).
  • Reworked gravity gun and physical interactions to allow more control with hydras
  • Added dynamic lighting effects to muzzle flashes and tracers
  • New barrel smoke (Left4Dead style) added to pistols and submachinegun
  • Shell ejections fixed on all weapons and added to the pistol
  • A lot of rework on weapons and animations
  • FOV fixes for all cutscenes
  • A bunch of hydra initialization / calibration bug fixes

Half-Life VR with a Razer Hydra and Oculus Rift – Setup Guide

Update: This version of the mod is obsolete at this point, check more recent posts for information on the latest version of the mod.

 

As I’m about to release a very early version of my Half-Life VR mod updated with full positional tracking via Razer Hydra integration, I wanted to outline a few things that will hopefully help anyone interested in trying it get the best experience possible.

Installing the mod

You’ll need to have the Source SDK Base 2006 and 2007 installed via steam before installing the app.  You can download them for free under Library->Tools in steam  The installation process for the mod is simple, just download the installer from here and run it and it should take care of everything else.  There is a chance that you’ll also need to install a microsoft c++ runtime before the mod will work, if you try starting the mod and it just drops out on start, you can download the runtime here: http://www.microsoft.com/en-us/download/details.aspx?id=5555.  Once installed try to start the mod again and fingers-crossed, everything should load up fine.  If not, post a comment here, this is still very early and I’m sure there will be issues when running on some setups, I’ll do my best to sort through the issues.  Assuming the mod started up ok, you’re ready to configure a few things and start playing.

Configuring your Hydra

Use your razer hydra configuration utility to map the buttons on your hydra to the usual FPS keys you like for HL2.exe.  There are a few things you’ll need to make sure though:

  1. Don’t map anything to the analog sticks, you can do WASD emulation here but I’m already using the analog inputs directly through their api (so you get real analog movement) so anything you do here with them will conflict with that.  You can map the stick push down to a key.
  2. Don’t map any gestures or use the controller motions or this will conflict with the game actually trying to use the motion to directly control your weapons on screen.
  3. Map the right hand start button to the “L” key, this will be your recalibration control (more on that later)
  4. Map a button on your hydra to “J”, this will toggle walk mode (in tight spaces or non-combat areas this really helps maintain immersion where the standard movement speeds are unwieldy)

Assuming you’ve mapped all the controls you need, there should be more than enough buttons.

Configuring Vireio Perception

The most important part of the configuration is making sure you have vireio perception configured properly.  Assuming it’s set correctly you should be able to get a result that is near the level of native implementations but finding the right settings can be challenging.  First off, check out the vireio wiki for an in-depth guide to your one-time configuration: http://www.mtbs3d.com/wiki/index.php?title=Vireio.

Once you have the convergence and eye separation set to your liking, you may want to tweak the FOV depending on how near the lenses your eyes are.  I’ve got it defaulting to 100 degrees at install, but I actually have my rift set on the nearest adjustment and found that ~105 worked well for me.  Play with these settings in game by pulling up the console and running “fov_desired 110”.  Once you find something that really works, open up your Steam/steamapps/sourcemods/halflife-vr/cfg/autoexec.cfg and update the fov_desired and viewmodel_fov variables to the value that works best for you.

The one last thing I had to do was change the distortion factor.  You can do this in vireio (I’m using beta_11 at this point) with shift+F1.  What you’re trying to eliminate is any warping out around the edges, which is easiest to see by looking at a fixed object up and in front of you and turning your head up or down while following the object.  If it appears to warp away from you as it nears the edges, hold shift+f1 while continuing to watch it until the effect is corrected.  You can use F1 to adjust the other way if you go too far.

Unfortunately the distortion factor doesn’t currently save with your profile like the rest of the settings yet so don’t forget to do this again next time you start the game, it only takes a second once you know what you’re looking for.

Note: When running vireio perception for this mod, make sure you set tracking to “Disabled”.  I’m using the tracking information in the game directly so this vireio mouse emulation isn’t necessary (and will actually cause problems with the mod).

In-game calibration

Once your hydra controls are mapped and vireio is setup, you’re ready to play.  When you first load a map, you’ll want to calibrate your trackers so they’re all on the same page.  Make sure you’re facing forward relative to your hydra base with your head level and your right hydra controller pointed in the same direction as your head and press the start button on the right controller to calibrate.  You’ll generally want to hold it in line with your shoulder at somewhere near shoulder height and not too far in front of your shoulder.  Play with different positions to find what is suitable for you, calibrating higher means the gun is naturally lower, calibrate further forward and at rest the gun is closer to the screen.  It’s all a matter of preference from there.

You may need to occasionally do this again as rift current drifts since its magnetometer isn’t being used in the current rift apis.

If your weapon ever jumps from one spot to another (typically a fairly large jump) this means your hydra tracking wasn’t properly initialized and can’t tell which hemisphere your device is in.  Hydra sensor values are the same in mirrored locations on both sides of the base station which is why when you start up your hydra software it asks you to point the left and right at the base, which it can use to determine which of the two positions the controller is in.  I’m not sure if there is anything you can do in game here at the moment, I typically save and exit and restart my motion creator but there is likely a better way to handle this.

A Few Tips for Your First Play-through

  • Don’t expect to be amazing right of the bat (and play on easy).  It’s easy to forget how much time we’ve spent perfecting our ability to aim with a mouse, aiming with an actual physical object in 3D space is challenging at first.  It’s also really rewarding as you realize how much better you are after a few hours.
  • Try not to run and gun too much, take your time, use walk whenever you don’t need to explicitly run, take in the atmosphere, use cover and pick off the enemies, etc.  Sprinting around firing wildly and spinning around are all pretty disorienting with the rift, even though I don’t ever get motion sick it’s still just not an enjoyable experience.