Google VR?

True. But I would assume that the extra performance is worth the 20-30 minutes to build from source :slight_smile:

So I’ve added Tilt and Rotation Rate into the inputs section of Project Settings:
I’ve added the “Get input motion data” into my level BP but don’t know what to plug into it.

As you can tell I’m pretty green at this.

Thanks for any insights.

EDIT:

I got it rigged up in BP with a new player BP Class and now just need an offset so it stays centered when the iPad is held up.

Tom

Hi y’all! So, I’ve been struggling the last week to learn how to work a bit with blueprints to build an application for use with the Google Cardboard. So far, the best I accomplished used this quote from DRob:

And this other topic for use with Oculus VR: VR Game Template - XR Development - Epic Developer Community Forums

  1. For movement: with the “VR Game Template” and using the “Rotation Rate” in X and Y, I could move the screen up and down and sideways. I tried doing the same from scratch on a Blank Project, by just creating a character with a camera and that way only the side movement work.
  2. For duplicating the cameras: I tried doing the multiplayer thing that DRob said, but on the “VR Game Template”, I could see the split screen on my PC, but could not move the second player. On Android, however, I could see the first half black and the second half was ok, but it could not move.
    http://www.beenoculus.com/en/desenvolva-para-beenoculus/kit-desenvolvimento/ Here, there is a template for working with Google Cardboard on Unreal Engine, but it does not quite work for my Samsung devices (I tried on an S5 and on a Note 3). It keeps spinning out of control and the controllers are reversed. But the split screen seems to be working fine. It uses some kind of texture method, I could not figure out how to reproduce.

Could someone post a step by step tutorial, video tutorial, a project model or whatever to help us to run the apps on Google Cardboard?

This solution kind of worked for me, it seems to be trying to do the stereo rendering, but only on one side:

Any ideas?

I’ve made progress. If you look at this function of code in both GearVR and SimpleHMD:


void FGearVR::AdjustViewRect(EStereoscopicPass StereoPass, int32& X, int32& Y, uint32& SizeX, uint32& SizeY) const
{
    SizeX = SizeX / 2;
    if( StereoPass == eSSP_RIGHT_EYE )
    {
        X += SizeX;
    }
}

You actually seem to want the the offset to just be SizeX so you can comment out the line: SizeX = SizeX / 2;. Not sure why this is on my Galaxy S5, but this fixed the rendering error from the previous image I posted. This gives the following result on GearVR:

Since the GearVR has it’s own sensors, the head tracking does not work.

This is the display I get from SimpleHMD on Android:

As you can see though it does not take up the proper range (so it only kind of works) when I looked at the values, it is only rendering at 720p. I can not figure out why it starts rendering there (probably something deeper in the rendering I did not look at). The cool thing about SimpleHMD is that it picks up on the sensors of my S5 and does the tracking calculations. I am going to try and combine the SimpleHMD code for head tracking with the rendering code for GearVR and that should give a good enough UE4 Cardboard setup (without the ability to do the button which, for my purposes, I am not concerned with).

Hey RFL, I got Bee Noculus’ example to work. They had a strange rotation routine in their BP and I added my own instead as shown below. Now everything works excellente (as far as their system goes) For Android, be sure to add your rotation conversions. iOS reports in terms of float radians and you may need to convert to something similar to the way I did to get your android devices to report the inputs to UE4.

Please let me know how you do. I’d love to fiid out.

Hi pleaseluggage, thanks a lot for your answer, the controls work perfectly! Now, the problem I am having is the whole world is upside down! The sensors work when the phone is on Reverse Landscape as stated on Project Settings - Android. But then, the Splash logos also appear upside down and the controls work backwards. I think maybe if I rotated the screen in 180º, it would work just fine!
When the phone is on regular Landscape, it spins out of control.
You said you use iOS right? Do you have the same “upside down” problem? Do you know in which blueprint can I fix that? Is it on the sensor function or on the HUD where it generates the texture for showing on the phone?

So, I rotated 180 degrees over X0.5 Y0.5 in all the Render Textures (MyHUD) and it all worked perfectly! It is not the ideal fix, but it is OK. If someone could think of a better solution, it would be great. Thanks again pleaseluggage!

Look at the Set function (or whatever it is) in my BP to the right of the screen. The Roll pole is turned 180. That fixed it for me in iOS.

T

I’m also wondering how to elevate my camera or player in another gameMode up and down in world Z (up) Ever seen that? It’s on by default in the basic Game Mode and Player Controller but I’m mapping this one to the joystick and so need a discrete buttonPress or somehow need a function which can move the camera (Player) up and down onto which my mapping can target.

Ideas?

Once I add the SimpleHMD plugin to a project and restart the editor is there anything more that needs to be done to make it work? I’m getting an error

when I try to launch it on my Nexus 4 or Nexus 7.

I have noticed it only works if you are building the engine from source. After you restart it, I sometimes have to recompile it, and relaunch it from visual studio, not just let it restart.

OK excuse me for being a total noob about this.
I work in Maya, Houdini and Softimage everyday, but this unreal engine is pretty new to me.
Is it possible for you guys who have got this working, to share a file I can open up to use as a template?
I’m keen to create enviroments for google cardboard, using UE4.
It’s super simple to get this working in unity, but I hate how unity works. My brain likes blueprints.
Thanks

Here, from my quote:

I find the blueprints quite difficult to understand, but it seems to work if you set your screen to reversed landscape and use your phone that way.

OK, so I started working with iOS too and your controls really work for iOS and iOS only. The ones I got working on Android were the original ones from Beenoculus (they only work with the phone on reverse landscape though, on landscape, they keep spinning).

So now I am struggling with bad quality (aliasing). They use two Scene Capture Component 2D for both eyes, connected to a Render Target texture. I tried changing the values on the Texture files (Compression, LOD), on the Scene Capture Component 2d files (Motion Blur, LOD). I also tried changing the Rendering options (Motion Blur, Aliasing), but nothing seems to improve the quality on the mobile devices.

Is there really a problem with SceneCapture2D on mobile or am I doing something wrong?
Is there a better way to create these screen division? I tried using the multiplayer option, but on mobile I get only half screen. I tried compiling UE4 from source and using the Gear plugin, but I couldn’t generate the packages. My problem looks a bit like Katerpilet’s last image - there is a bad aliasing between the walls and the floor

This image also explains my problem, my project on mobile looks like the first image and I would like to have something like the second one 4cfc833fe98ac9e652c82778c763f3a09bc06d96.jpeg

Oh thanks RFL.
Don’t know how I missed that link :slight_smile:

怎么解决上下颠倒问题?我必须要将我的设备旋转180度才行

The Beenoculus template doens’t work on S6 Edge, the render target textures just won’t render in HUD! It works flawlessly with LG G3, MotoG 2nd gen, Nexus5 and Nvidia Shield.
Double checked everything: render targets textures/materials work properly, Draw Texture node in HUD works with any other texture (splash screen, etc…).
Tried with HDR enabled/disabled both for cameras and render targets, changing texture compression method (ETC1, ETC2), but nothing changes.
I can see the scene behind the HUD just like it’s invisible. Any ideas about that?

Really looking forward to a viable Google Cardboard solution.

The Beenoculus doesn’t seem like a great bet, as it’s seemingly closed source (please correct me if I’m wrong)

I also have to agree with MrPure, the dual camera split view seems it would be greatly problematic down the road.

I’m happy to help with any coding, testing or anything to flesh out something similar to Gear VR’s implementation for Cardboard to make this a reality.

I’ve been reading articles on android sensors, and it seems that people use magnetometer to compensate the inevitable errors generated by gyroscope, when they need more precise motion control. You might want to try that if you can code, as there is no such node in blueprint, which really ties our noncoding hands.

As for the stereo display, it seems simpleHMD is quite capable already, as long as you turn off Mobile HDR(or so they say) or choose Scalable 2D/3D(I’ve tested it and it worked). In fact it even tracks my head’s yaw movement.

I appreciate the following point is by no means everyone’s cup of tee, but I hope I wont offend anyone by simply raising it…

Google Cardboard is the only consumer released headset that is capable of running adult oriented apps today.

Samsung’s Gear VR devices is restricted to run Samsung approved and signed apps only. So the ONLY adult content available for Gear VR is sideloaded panorama videos. I think we all can appreciate the many shortcomings of video compared to real-time 3D, especially in VR.

So without Google Cardboard, there will be no UE4 adult content oriented apps available to consumers (whether or not that’s a bad thing is of course subjective :wink: