Unreal Setup for HTC Vive

We are using Unreal with the HTC Vive. I am able to run 4.8 with the VR preview and it works. We started with the First Person template. I removed all translation off the camera and it seems to track correctly.

I am not sure the scale of the world is correct. We build everything in CM but it looks a bit small.

Also, even with a simple blockout environment the framerate is pretty crappy and I believe there are some post effect settings that need to be disabled.

Is there any guidelines for setting up a scene for SteamVR? Also, is there information on using the Vive controllers with Unreal.

I can post to the SteamVR forum but since this is specific to Unreal, this seemed the right place.

I don’t think they have publicly put up any information on the Vive controller integration yet but I believe it is in there, maybe not blueprint accessible yet though.

You should be able to follow the Rift guidelines and pretty much get the same results im sure. Shadows are the biggest FPS killer that I have found on the rift by far. Check out the VR character template to get a good idea on the different settings and what tweaking them will do. You can probably still run that with the Vive and just have to tweak a few of the blueprint nodes

Thanks for the info Zoltan,

I got things running pretty well now. Will need to dig into the controller stuff. The strangest thing is I check the units in Maya and in Unreal and everything looks right, but I put on the headset and I am too big. Adjusting the worldscale down to 85 units = 1 meter seems to fix it. But I have no idea where that scale change is coming in.

Will post here if I get any more info.

I determined the thing jacking up the size was the camera was on top of the character capsule. I do need that or you fall through the world. So I reduced it down to 2cm.

But overall the scale is still off and I can’t get it all to align.

I suspect I need to adjust the default player setup from the C++ FP template or adjust cam FOV or something. We don’t want to use Blueprint templates since I need a lot of code changes in the character controller forAny ideas?

Thanks for posting this info… I’m looking to dive into this same topic this week. Although I don’t have any useful suggestions yet, when I dig into this I’m sure we will be the first few crossing this bridge. So any unreal/vive dev guys reading this… I hope more information is released on this topic specifically

Any updates with this? I’m trying to get the Vive working in UE4.9 and finding quite a few things not really working. I can’t get the headset position lining up with the UE Camera position and I can only get the controller location and trigger input captured. The thumb axis inputs seem to be missing.

We ended up exposing the VR World Scale via blueprint so we could script it if we needed. However, it does seem like the latest Steam VR update allowed us to drop the World Scale to the proper 100. So it may be fixed. We need to test at other installations. We are also adding a standard measuring stick calibration mode to our experience so it can be tested and calibrated to real world on site.

Thanks for the reply, . I started with the FP template and set the camera translation in the FirstPersonCharacter to 0,0,0 but for me the headset location doesn’t synchronize correctly with the location and orientation of the FirstPersonCharacter arms. When I run my test, I see the arms below my apparent view position. I got the impression that these are the settings that you used, but these are working correctly for you?

Further to my previous post, the attached image shows what I mean by the headset position lining up with the Unreal camera position. The three cones show the position and orientation of the HMD as returned from “Head Mounted Display / Get Orientation and Position”. The arms and gun are the default from the standard Unreal “First Person” project (ignore the two cylinders beside the gun).
The cones move correctly relative to the HMD - they translate and rotate as the HMD does, so it appears to be getting the correct input. BUT: why does the Unreal camera position not line up with the data from “Get Orientation and Position”?

Thanks in advance! Peter.

Hey guys. I recommend checking the SteamVR forums. We already have some solutions there. http://steamcommunity.com/app/358720/discussions/

For examples, for the controllers you have to use 4.9. And the following code worked for the controllers.

To do line traces and other stuff from the HMD, I use a similar setup as the controller, except that instead of getting the controller device I get the HMD.

And like other said, you hvae to set the camera on the floor of the capsule, as Vive gets the z value relative from the floor and then adds that back to the capsule component.

@Motanum: thanks for that - that’s helped a lot. I’ve got the Vive controllers appearing correctly in the HMD view. The only thing I’ve not been able to correctly place is the location of the HMD in world space. Following your suggestion I used the same approach as per your screen shot but using “Head Mounted Display / Get Orientation and Position” instead of “Get Hand Position and Orientation”. Is that what you are doing?