Gear VR support?

Yep i’m pretty sure Hoesing didn’t mean C++ only, you just need to add a new empty code class to any blueprint project and it automatically becomes a C++ project. Blueprints will still work as usual.

Yeah, the key thing is that blueprint only Android projects will use a prebuilt executable that doesn’t contain the GearVR plugin. There just needs to be some C++ present to kickstart a compile and link with the plugin included. This may not be strictly necessary, but it works for now.

Phew, that is good news/info

I did not realize when I commented that you could mix the two without issues. Will give this a go tonight

AWESOME it is WORKING!!!

Excellent :slight_smile:

Tried it myself, all I see are rainbow-like colors in each eye (starting with green on top) with each eye the image being off center with black borders. It seems like the head tracking is working because the colors move when I look around, but I can’t see the actual environment. Not sure what’s going on there.

I did see something flash for when installing in the dos box the first time about “/storage/emulated/legacy/UE4Game/UE4commandline.txt no such file or directory” not sure if that could be playing a role. I have a 128gb SDcard in here. Followed instructions to the letter.

Very exciting. Launching the game from the editor is working for me as well as packaging it.

Were there any extra steps not mentioned in the post that need to be done? I followed them exactly but I just see those weird colors, they change when I move my head around. Seems like everyone is getting this going but me.

I didn’t use a template, just a blank C++ project. Maybe give that a try. Save the default map that it opens up with into your game folder and then set that as the startup map.

Just tried that blank template too, I had set the default startup map under maps and modes. I tried opening the phone from the GearVR while it was on to see better, it looks like the rift view is rendered 3 times with the rainbow colors. I’ll see if I can take a picture.

Edit: It appears I’m on 4.8.0, could that be the problem?

Ah, I would guess that’s the problem. I’m using 4.7.

Awesome it works, that was the problem. I just don’t follow directions… I wonder how to use the profiler in realtime with this since you have to unplug the wire to use the GearVR. I can see the asyncronous timewarp is taking effect due to dropped frames on the FPS template. (Default image quality also seem very blurry/lots of aliasing compared to Unity GearVR stuff)

Edit: I really like how the right thumb stick is disabled by default so you are forced to turn in a swivel chair. Good decision with that imo. VR Comfort mode turning with left bottom thumb stick might be a good addition for default alternative setup for the lazy though.

Edit2: It was the animated skyphere causing the choppiness, I also just temporarily did a level blueprint to execute ‘stat fps’ to see the framerate. Still trying to adjust clarity, screenpercentage in postprocess volume or ‘hmd sp’ doesn’t appear to work at all or have any effect. Breaks the stereo if any number above or below 100 used.

Hello everyone, hello JJ,

I am having issues : No lens corrections, and the eyes are reversed L/R
Tracking is working

(on a side note) Fade in/fade out in matinee don’t work and so are Particle trails…

I also got it working, but am seeing disappointing results. Aliasing, no shadows, 20fps, no transparency, no fade in/out effect, sluggish animations, no depth buffer stuff etc. Hoping this will be improved ASAP.

Try to delete the skyphere if using FPS template, it helped a lot. Although I could not improve the aliasing, yes I also noticed lots of effects appear to be missing also.

I was able to package my own project into Gear but I’m getting the anti aliasing and low framerates that everyone else is getting. I’m sure the low framerate is due to the need to optimize but what’s up with the anti aliasing? Is that on our end or is it an optimization of the sdk and is this a common issue that everyone that has the gear working in UE4 has?

Ok so I tried this approach but…
I have been trying to compile the master engine branch on 4.7 and am receiving the following errors:

Error 1 error C2039: ‘ClusterIndex’ : is not a member of ‘FFoliageInstance’ E:\UnrealEngineSource\4.7\master\Engine\Source\Runtime\Foliage\Private\InstancedFoliage.cpp 1787 1 UE4

Error 2 error C2084: function ‘void SAnimMontagePanel::OnAnimSegmentRemoved(int32,int32)’ already has a body E:\UnrealEngineSource\4.7\master\Engine\Source\Editor\Persona\Private\SAnimMontagePanel.cpp 672 1 UE4

Error 3 error C3861: ‘ShouldUseGetDynamicMeshElements’: identifier not found E:\UnrealEngineSource\4.7\master\Engine\Source\Runtime\Renderer\Private\ShadowSetup.cpp 1815 1 UE4

Error 4 error C2039: ‘InitializeAutoStartupModules’ : is not a member of ‘FModuleManager’ E:\UnrealEngineSource\4.7\master\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp 1881 1 UE4

Error 5 error : Failed to produce item: E:\UnrealEngineSource\4.7\master\Engine\Binaries\Win64\UE4Editor-Foliage.dll E:\UnrealEngineSource\4.7\master\Engine\Intermediate\ProjectFiles\ERROR UE4

Error 6 error MSB3073: The command “…\Build\BatchFiles\Build.bat UE4Editor Win64 Development” exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 UE4

Any ideas why this is happening and how I can fix this? I need to do this urgently…

The master branch and 4.7 aren’t the same thing. You need to compile 4.7 following JJ Hoesing’s steps at the third post from the bottom on page 1.

@mdhananjay Some of /u/MarcelBlanck’s instructions ended up being incorrect. For me Master branch didn’t work, so not sure how he got it going with that. Also appeared to be incorrect on where the Oculus signature file goes, (it actually goes in the main Unreal Engine directory under /Engine/Build/Android/Java) This is a lot more convenient location so you don’t have to paste sig file separately into every project you’re working on.

Follow JJ Hoesing’s instructions instead, (although some of that could still be useful). Also yes need the 4.7 branch not the Master branch, you’ll see it under the dropdown on Github page.

Edit: Also, not really sure why you would be getting that error. I think what you downloaded should have still compiled? Download 4.7 branch, make sure you ran the included Setup.bat first then the GenerateProjectFiles.bat afterwards. Then open the UE4.sln in Visual Studio. More detailed instructions on Epic Github page.

How many polygons do you guys have in your scenes? Anyone has gotten it to work with half decent performance?