Steam VR Template

@chille9 I’m not very fond of videos but I’ll do a very clear, noob-proof written sheet/pdf on everything
@estudiobarrera It’s for you! I just met friends architects last w-e and they also asked me to transform their Sketchup model into Steam VR. I know. Sketch up. A pity. Unless anyone has a miracle solution, last time I wanted to have a usable Sketch Up model in Unreal I had to spend hours in Maya redoing/UV mapping everything…

Disclaimer: I like people that so far put efforts into this template, so I’d like to contribute back a bit more before I move on and work on my own project. This takes me like a few nights to figure out, so it shouldn’t be too hard to implement. Now, since this can potentially become something on market place, I’d like to here by saying this: “Please don’t repackage and sell this in UE4 market place.” It’s my gift to the community, not for your personal gains. Please use it in your own GAME and I’ll probably even buy it without mention me in your credit!

So as promised, here is the video showing the VR action menu system I built and sharing with you guys.
https://.com/watch?v=jGPnBL5czuA
@Proteus, I save this whole setup into a separate folder, so it should be easy for you to test my pawn setup. I’ll need another night to properly document/comment the blueprint, I’ll upload tomorrow night for sure.
Yep, including the fireball particle. :smiley:

@PenguinTD That’s awesome! For my part I just fixed the controllers: now they are at 0,0,0 and scaled at 1,1,1 and match the correct size location, fixed the platform, fixed the closest hand pickup, fixed the grab system, etc. Thanks again I can’t wait to try your system!

Good stuff thanks. While working on things i’ve found it quite useful to have a visual guide for stuff like rough player size and eye height. I was thinking perhaps this might be useful to add to the template so devs can quickly see how the pawn compares to the environment?

The vive pawn could include a simple mesh human (invisible in game) with a variable to set eye height from floor and seated so devs have a more accurate visual guide while developing. It’s also helpful just to quickly see exactly where the ground and vive pawn’s feet are when first adding it to the level. It’s not obvious to new users with the current pawn camera position.

Great work guys. I’m still struggling to get the grabbing system working. I’m a n00b so please excuse the dumb questions. :slight_smile:

  1. I created a blueprint from a mesh and added a socket. The hand still doesn’t grab the actor/mesh.
  2. Do I have to create TAGs for the mesh to identify it as a grab-able object?
  3. How does one add actors into the array to define it as a grab-able object?
  4. Will you be doing away with the array in 1.9 and use interfaces?

Hope you guys can help! thanks.

@lokeuei Don’t bother with the array and stuff.

With 1.9 you just have to drag and drop a macro within each object you wish to grab. It will automatically use sockets if they are present. Optionally you’ll be able to select which socket you want if you have more than 1. It will be very clear in the instructions. I’ll release it tomorrow.

omg you guys are awesome! I’ll go work on my sounds for the time being. :slight_smile:

@Proteus

I do get what you’re saying, most definitely. Just getting this part to work correctly seems difficult enough, and I for one, appreciate your hard work into creating this!

With that being said, I don’t expect to put the entire template on your hands. I have a good workflow for Oculus Rift stuff, but it is lacking in the Oculus Touch control situation. That, and I have no idea how to do branches and submits.

Have you guys thought about submitting this to Epic as a built in template? I am sure that with various forks, it could be to create a “universal” template. There is a C++ class that does determine what headset the user is using, but for some reason, the guys at Epic have yet to expose this to blueprints (it’s been quite some time since I found out, and I forget the class/variable or whatever it is that parses this info, or I’d do it myself).

If this was enabled, and if there where 2 or 3 templates, it would just be a matter of 1-2 branches in the character blueprint to account for each of the 3 major headsets. Rift, Vive, GearVR, None.

edit: found it! https://docs.unrealengine.com/latest/INT/API/Runtime/HeadMountedDisplay/IHeadMountedDisplay/GetHMDDeviceType/index.html

Looking more in depth into this, here is the enumeration:

Hi @SaviorNT Good comments

I’ve never submitted anything to Epic but I think that is a probably a good situation for this soon. However, before submitting a “master” branch I would like some features to be enabled, e.g. multiplayer, interactive 3D menus, interchangeable teleport trace line, and include any interesting feature/content anyone can contribute to the project.
Also, I’ve been thinking on adding a switch for the Rift as you found it. So the plan is having a nice and clean template, include a switch, then submit it to Epic. I would foresee that in a matter of few weeks.

As for anything not PC-tethered such as Morpheus, Android and iOS, I (correct me if I’m wrong) thing a universal template with branching would cause problem. As an example, I think it’s important to set post-p/scalability settings optimized for PC HMDs, and having 3-4 different set of settings could be unmanageable. Unless we set a very basic “unspecific HMD” master branch and then branch for specific HMDs but as the template is 75% Vive/Oculus specific that could be hard…

As a alternative, we could just implement a solid way of capturing 360, 3D videos of scenes (there’s at least 2 working well) to export on mobile. And we’ve never developed for PS4 but we pre-ordered a PSVR so maybe that would be a good time to ask Sony for devkit…

So there’s what I propose: to have a solid Vive/Rift template in the short term, propose it to Epic then branching it for other sets, if it’s doable.

Finally, I think it’s really important to have good docs. I know not everyone is at ease with UE4 but indeed would like to have clear documentation. I’ll do my best to have it by tomorrow.

Finally, I remind everyone that any contribution is welcome. The commercial/fun value of VR projects is definitively not on who can use the Vive, who cannot. It’s in the whole experience, the universe you are creating, the feeling, the originality and the user experience. :cool:

@Proteus

Forgive me if my typing is a bit… bad, I think the biggest hurddle atm is developing a good solution for the Rift, since their motion controllers are not in the wild yet. With that being said, some dynamic scalability (detecting FPS, and adjusting rendering setttings for it) is the “most ideal” method we can hope for currently.

I for one, hope for a unified solution to interact with a Puzzle Box so that it feels natural. This will help with a multitude of projects I think. Allowing the user to interact with objects as if they where in the real world, no matter which platform they choose. This is paramount for my game that I am currently actively developing for.

edity: I have an active request to Rama to implement something that can detect which HMD platform the user is currently using.

@ SaviorNT that’s an interesting challenge. For the rift as Touch is not in the wild (or for very few select devs) yet I just thought for now to map inputs on the Xbone controller and maybe have some “aim” to look at to grab/interact with things. Maybe the leap could also help but the proportion of Rift user with a Leap is minuscule… Sacré Oculus you funny guys for not having Touch ready for launch…

To have an optimal experience with UE4-based game is to target the platform from the ground-up because there’s so many things platform specific… I think most games compatible with different HMDs have largely different builts. Again, Rift/Vive/OSVR/even DK2 maybe switch is ok but for the rest you need vastly different builts.

So here is the GateBase_Pawn subfolder that I worked on the action menu. Extract it under Vive folder and it should work properly.
I only include the extras I did, so you still need to download template 1.7 or above.

Here is the stream session archive where I try to tidy up graph, comment the graph and explain how stuff work.(except the teleportation part.)
(It might still be processing, so be patient if you saw this post right away. 1080p will come even later.)

Y-_hkuBc670

Gatebased_Pawn.zip (569 KB)

@Proteus, thank for all your efforts integrating features for everyone else. I might not be contributing for a while unless I think there is something worthy and helpful like action menu here.
Thanks to everyone else that also contributed to this thread and template, it paves the road for future developers so they don’t have to do the same thing, and don’t have to spend bucks just to get some basic things working.

And, good luck to you all, happy deving!!

Well, while Ramas function library is really nice and full of a lot of useful things. Adding a HMD checking UFunction could be with the motion controller plugin to keep its VR theme.

First of all thank you for all the effort you guys are taking to bring this up. I am really new to UE and trying to find my way into it. I have downloaded the Version 1.8 incl. Plugins and put it into my project folder. If I start this project I do get alot of “failed to load” messages. Can you explain maybe how to use this? Do I miss something?

Hi, After package project(Window), run project.exe, Display “Plugin VRGripMotionControllerPlugin failed to load…”,Why, please!

@NeoMiles @space326: To install as a template, just unzip into the appropriate Templates directory like C:\Program Files\Unreal Engine[Version]\Templates for launcher version or [ForkLocation]\UE4\Templates for source version. Launch a new project, and you’ll find it in the blueprint section. To install as a project file, unzip in your usual projects folder. Then, delete the file SteamVR_x-x/Config/TemplateDefs.ini and you’re ready to go. If you do otherwise you’ll have errors.
@PenguinTD cool. As I have finished everything I wanted for 1.9 I’ll watch your video tomorrow and integrate it into 1.9, together with new documentation. I’ll release then 1.9 somewhere in the night tomorrow.

Much appreciated! I wlil try out today.

Rama was nice enough to release his HMD enumerator today :slight_smile: The benefit of detecting the HMD rather than the controllers is for people that don’t have the controllers (or if you design for other input types).

This is a great way to get started, thank you so much for putting this together. Does anyone notice severe performance issues when enabling the animations on the Chaperone corners?

If you add any c++ to the project (thus generating a project file) then you’ll need to add the VRGripControllerPlugin to your projects dependancies in build.cs or it will not package. This goes for ALL plugins by the way, so you’ll want to remember it.

Yes I know, its just a lot of additional nodes to install for a HMD enumerator though, but I won’t be needing it so I guess I don’t really have an opinion on the matter anyway :p, also its full of useful functions so its not a bad thing.