IMPORTANTOn initial release there were some incompatibilities found with an existing BepInEx plugin packaged with the Vortex manager version of the game. I've added a workaround to this mod as of version 0.1.2. If you have trouble loading the mod, it would be very helpful if you can add a post here with what mods/plugins you have installed as well as any logs from the game! Thanks!
This mod requires BepInExPack Valheim. BepInEx is a mod framework for Unity games that allows modders to inject their code into the game's runtime. It also includes Harmony, which is a tools used to patch existing methods in C# libraries.
Additionally, you need an HMD that supports OpenVR/SteamVR. I've only tested it using a Valve Index, but it should theoretically work on anything that meets those requirements. Please feel free to create issues if you find incompatibilities and I'll work on any problems related to specific headsets if possible.
Note: This mod doesn't yet support any mod manager installation. I am looking at what is involved in supporting Vortex. I'm hitting some issues figuring this out because this mod has some files that need to go under valheim_Data, but Vortex wants to make everything go into BepInEx - looking for a workaround.
Unzip the contents of the mod file directly into your game's installation folder. It contains a BepInEx plugin file as well as numerous assets/DLL files.
Make sure SteamVR is running BEFORE starting the game and close the SteamVR dashboard as this seems to cause problems.
Due to some graphical glitches, disable Bloom and Anti-aliasing in the graphics menu. I'll work on seeing if I can fix these effects, but right now they produce all kinds of artifacts on the screen. I also recommend turning off Motion Blur for VR. Finally, SSAO looks great, but is very demanding on performance. I've included a third party post processing effect called "Amplify Occlusion" that can be used in place of it (See configuration section). I strongly recommend using amplify and disabling SSAO. Other settings you can configure to your liking/adjust for performance needs (turning down shadows to the lowest level actually doesn't change the graphics that much but is way better performance-wise, so I recommend doing that - but just experiment and see what works for you).
It’s not all going to be plastic. Today, virtually everyone loves everything about VR, which accounts for the magnitude of its success. But the technology continues to evolve at a breakneck speed. One focus of technological advances related to VR is the engineering and design of the headset. Expectedly, there are ultra high-tech and complicatedly designed headsets out there. But some tech wizards have taken it one step further, thereby making it way more accessible to everyone. Now, there are tutorials about making VR headsets out of pieces of cardboard. Not only has this opened a plethora of possibilities for VR, it has gotten people to think in creative ways to upsize their experiences.
Due to what I needed to do to get the mouse cursor to work in game, the "real" cursor is locked to center of the screen. You need to make sure the game window is focused for the in game mouse cursor to work - you might need to alt-tab into the window if it doesn't load on top.
Vulkan is not supported - so make sure you run without Vulkan activated.
Disable "Use Desktop Game Theatre while SteamVR is active" under Valheim properties in Steam.
After running the game for the first time, a config file will be generated in <valheim install directory>\BepInEx\config\org.bepinex.plugins.valheimvrmod.cfg
The following options can be configured:
Setting that can be used to disable the mod without uninstalling it. The mod will load, check this setting, and immediately disable itself if you set this to off.
This setting causes the GUI to be displayed on an OpenVR Overlay, which provides a high performance clean surface for the GUI canvas to be displayed on. This will not be compatible with Motion Controls once they are fully supported, but highly recommended to be on for mouse & keyboard controls.
This allows you to set the mirror mode that is used to display the contents on the desktop. You can select, None, Left, Right (for left or right eye images), or OpenVR. OpenVR is needed if you want to be able to see the Overlay GUI that you see in the HMD displayed in the desktop view (just a consequence of how the Overlay works) - the problem is though that I've found that with OpenVR mirror mode causes some issue that makes you have to restart SteamVR or the game freezes up after restarting it - so for that reason I don't recommend using it unless you really need to see the GUI in the desktop mode for some reason (like capturing video or something). Alternatively if you want to see the GUI in the mirror with Left or Right instead, you can disable "UseOverlayGui", but that GUI mode just doesn't look as nice.
This is a setting from 0.0-1.0 that sets the amount of curvature applied when using the Overlay GUI. A default amount of 0.25 is used and is probably sufficent, although you can adjust in game using the -/+ keys.
This is not fully useful to configure right now since motion controls aren't really supported, but it is used to select which hand you as the player wish to use for GUI inputs (i.e., you will be able to use your controller as a laser pointer for the mouse as well as for object placement in building mode.)
I have not yet found a good way to programmatically perfectly center the camera over the player model's head in first person mode, so I try and get close enough, but you may need to adjust these offsets to get the head centered correctly... I'm still working on trying to find a good solution to this so this is not needed.
Set this to true (default is true) to enable using the arrow keys to reposition the head while in first person mode without having to manually update the config file, which would be way inconvenient. Settings you adjust using the arrow keys in game will be be updated and saved back into the FirstPersonHeadOffsetX/Z config listed above.
This is used to enable a post-processing effect I've included with the mod that can be used in place of SSAO. SSAO has a very high performance impact, which is bad for VR. You can use the built-in SSAO instead if you prefer, but I highly recommend using this instead, as the effects are very similar but the performance impact is way less severe. If you enable this, make sure you disable SSAO in the graphics menu.
The First Commercial VR Devices – The EyePhone Head-Mounted Displays. In the late 1960s, the virtual and augmented reality terms were coined, describing the field of technology we know today. This also encompassed the appearance of two of the very first commercial virtual reality devices in the 1980s in the face of the EyePhone 1 and the EyePhone HRX. Developed by VPL research, a company by Jaron Lanier, the devices were extremely expensive, costing as much as $9,400 for the 1 version and $49,000 for the HRX. Customers could also buy gloves that costed $9,000. While the devices didn’t really take off, which is understanding, having in mind their price, they were a major step forward in the development of virtual reality haptics and virtual reality goggles and head-mounted displays.
- This mod is almost certainly not compatible with any mods that affect the game camera, as that is central to how it works.
- The mod is also highly unlikely to be compatible with anything that adds or modifies post processing effects
- Mods that make changes to the GUI may not work properly, but it depends on the specifics
- Mods that mess with the controls - probably fine but could be some issues. Feel free to report specific problems
- Texture mods and other non-post process effect graphical mods should work.
- Most content or gameplay mods I expect to work fine.
More About the ModThe mod will let you play using native Open VR support in full stereoscopic 3D. Motion controls are not yet supported, but they are in the works. Some limited GUI interactions are currently supported (you can point/click on the GUI with a laser pointer assuming you have UseOverlayGui off and you can point the placement mode stuff but it's not yet fully functional). Aside from that though, the GUI is compatible with M&K controls.
The mod is primarily meant to be played in first person, but it does support zooming out using the mouse wheel to a third person overhead camera if you prefer. I mainly included this to help get better angles when building stuff, but play how you like :)
When in first person mode, I've made the head invisible. There are some animations that cause the character model to lunge forward sometimes, such as chopping wood. This results in seeing a headless character model lunge out in front of you. I initially had the camera tied directly to the head location, so the camera was dragged along with these animations. While more realistic in a sense, it was quite uncomfortable to be moved around in this way, not to mention other slight movements like head bobbing while walking etc. Therefore I disconnected the camera position from the head and just place it at a fixed height above the player model - this results in smooth walking and no more uncomfortable motions - with the tradeoff being that you see some goofy animations sometimes - but the tradeoff for VR comfort is definitely the right tradeoff.
There are more than 230 companies working on virtual reality products.
As stated in the configuration section, I'm still trying to find a good programmatic way to find the exact coordinates of where the player model's head should be - right now I can get very close, but have to apply a constant offset to get it just right. As a result, based on your tracking setup, it might be offset off the character when you start the game. You can use the arrow keys to adjust the head position in game if you keep EnableHeadRepositioning turned on in the mod's config. This is not an ideal solution and I hope to be able to find a way to accurately find the center of the player model body going forward.
This is an experimental mod and almost certainly will contain a bunch of bugs and glitches. Additionally, Valheim is currently an early access game, so there is a high probability that patches will be released for the game that break this mod. Please be patient as fixes are worked on and feel free to report any issues you find :)
It should only be played seated and with a mouse and keyboard (motion controls WIP!!!).
I've never played this in multiplayer - I have no idea what happens! :o
As Valheim was not made for VR, this implementation isn't going to be as comfortable as a built-for-VR game. If VR tends to make you feel queasy, then this mod probably isn't for you.