[Gear VR] What version of Unreal Engine are you using? — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

[Gear VR] What version of Unreal Engine are you using?

andrewtekandrewtek Posts: 971
Art3mis
edited March 2016 in Unreal Development
Hi All,

If you are using Unreal Engine to develop for GearVR, would you mind sharing the version of Unreal Engine you are using?

Thanks!

Comments

  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    4.10.4 here..

    Tbh, I don't think a lot of people use UE4 for Gear VR, and most of those who use it don't even come to this forum.

    I linked Oculus test cases to check before GDC, but I am not sure if they will get to test it until Rift is released (and probably a few month after that, until major kinks are sorted out).

    Sad situation really. Feels like Gear VR is now a semi-abandoned platform when it comes to UE4, from both sides, Oculus and Epic. Unity on the other hand is treated as beloved child :) (but I prefer UE4 due to Blueprints and tools).
  • andrewtekandrewtek Posts: 971
    Art3mis
    I really like UE4, but I need my tools to work. I just installed Unity and was able to get something deployed to my GearVR in less than 45 minutes. It worked perfectly.

    Sigh.
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    andrewtek wrote:
    I really like UE4, but I need my tools to work. I just installed Unity and was able to get something deployed to my GearVR in less than 45 minutes. It worked perfectly.

    Sigh.

    Switching to Unity?
  • artyom17artyom17 Posts: 319 Oculus Staff
    Hey guys,

    It would be great if you provide us with detailed feedback what is not working well in UE4 with GearVR and we'll do our best to deliver. It is true that up to very recent times GearVR+UE4 wasn't a high priority platform, but this is changing right now and we are interested to make UE4+GearVR at least as good as Unity+GearVR. Let discuss this!
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    Artyom17, you just made my day!

    Here are the reports I filed with Epic already:

    https://answers.unrealengine.com/questi ... les-2.html
    https://answers.unrealengine.com/questi ... scene.html
    https://answers.unrealengine.com/questi ... enabl.html
    https://answers.unrealengine.com/questi ... upted.html

    The last one isn't critical since Gear VR now can take screenshots and record videos (and I got bluetooth keyboard now, so..).

    It would be nice to have Oculus Social (including avatars and lipsync, likes, etc.) in UE4

    Instanced rendering would be nice, but I am not sure whether it's in Epic's or Oculus department.

    Having something like what Unity offers (VR Assets) for UE4 would be really nice to have. I went over this with vrdaveb here: viewtopic.php?f=60&t=30680 (closer to the end)
  • artyom17artyom17 Posts: 319 Oculus Staff
    It is great to know that Epic guys are already looking at the rendering issues you are having with mobile UE4. Do you know that UE4 has a command-line option '-featureleveles2' that basically supposed to reproduce mobile rendering on PC? It had some issues with stereo rendering before, I haven't tried it for awhile, but we need to make it work if it doesn't. This could significantly simplify reproduction and fixing rendering issues for mobile.

    Instanced rendering is definitely one of the high prio features, however, that requires support on hardware / graphics driver side first (and, of course, unreal engine forward renderer should support it too).

    GearVR templates is also a planned feature to add (both BP and C++, however, BP on mobile could be not the best idea due to perf hit).
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    artyom17 wrote:
    It is great to know that Epic guys are already looking at the rendering issues you are having with mobile UE4. Do you know that UE4 has a command-line option '-featureleveles2' that basically supposed to reproduce mobile rendering on PC? It had some issues with stereo rendering before, I haven't tried it for awhile, but we need to make it work if it doesn't. This could significantly simplify reproduction and fixing rendering issues for mobile.

    Torn mesh can be worked around with several meshes (each probably no more than 10k tris). Not hitting 60 fps is what bothers me :( Maybe Epic can add a special material type optimized for mobile VR (diffuse, norm, spec and emission only, no PBR) ?

    Nope, didn't know about that. Do I add it to UE4 launcher's shortcut ? Not really sure how to use cmd line arguments with UE4 due to it being launched through the launcher.
    artyom17 wrote:
    Instanced rendering is definitely one of the high prio features, however, that requires support on hardware / graphics driver side first (and, of course, unreal engine forward renderer should support it too).

    I see. So unless Mali GPU supports instanced rendering, it would be no use on S6 ?
    artyom17 wrote:
    GearVR templates is also a planned feature to add (both BP and C++, however, BP on mobile could be not the best idea due to perf hit).

    Well, that's the whole idea of using UE4. If I have to learn language, I'd rather go for Unity (since C# in Unity is easier than conventional C# amd definitely easier than C++), but making art/design/sounds/etc. and on top of that working on the game logic implies simplifying and streamlining certain tasks. Fortunately BP allows that, and with BP > C++ compiler that is coming with 4.11 or 4.12, performance shouldn't really be an issue, especially that I am not really planning on doing some heavy math in BP :)

    Essentially, I am starting with very basic experiences / games in VR, and by the time I need every millisecond of performance, I am sure I'll have a dedicated C++ programmer on the team. However, to get there, BP is what I have to use.
  • andrewtekandrewtek Posts: 971
    Art3mis
    Hi Artyom,

    I am really happy to hear that you are working on getting the UE4/GearVR issues fixed. The issue I am currently running into can be found here:
    viewtopic.php?f=60&t=30906

    I was able to do a build in Unity that did not have the problem. And I have never had the problem when building for DK2.

    As it relates to GearVR, the following would be super useful:

    1. Guidance on what version(s) of Unreal Engine are supported/should work.
    2. A List of repeatable steps that should be taken to get a UE4 project building a GearVR APK files. The documentation from Epic is out of date.

    The steps do not need to be ~easy~, but without steps it is nearly impossible to troubleshoot an issue.

    Thanks!
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    4.10.4 works, which is the latest stable. I wouldn't use 4.9 nor 4.11 preview. Just a common sense.

    Also, to be fair, I followed Epic's instructions and build/deployed to my S6 almost flawlessly. There are only a few small things that aren't in the docs there.
  • andrewtekandrewtek Posts: 971
    Art3mis
    I will reinstall 4.10.4 and Android SDK again and see if I get a different result.

    EDIT: When you say you followed their instructions, do you mean these?
    https://docs.unrealengine.com/latest/IN ... ms/GearVR/

    Those are what I followed. And, I am getting a build that works. It just plays horribly considering the only thing in my test scene is an unlit cube.
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    Yeah. I mean that. I used BP template, not C++ and I cleaned it out (removed HUD, skysphere, disabled all post processing, tweaked some settings.) But generally that guide worked for me.
  • moulder6moulder6 Posts: 29
    Brain Burst
    motorsep wrote:
    Also, to be fair, I followed Epic's instructions and build/deployed to my S6 almost flawlessly.

    Aside from the fact that even when u manage to build, no matter what's in the scene, u can't get above 58-59 fps, as u have noted alone.

    The thing is, however that after trying a few of my projects with 4.11, the performance is way worse, aside from the obvious bugs (character ignoring height and stuff). Not even with geo instancing I could see improvement, even though the scenes are rather bare and following all the requirements that are in the docs.

    Also, 4.10 doesn't come with the proper Oculus SDK that's needed for shipping the game. That's even still the case with 4.11 where they plan to update the SDK by the time they release the final version. Being quite technical I can manage a lot f things... I could also, in theory, swallow scripting in Unity, however building Unreal is way over my head, and in all honesty i wouldn't want to have to deal with it, even if I could sort it out.

    The lack of support for some rather basic stuff like fog is quite weird, too. They advice using depth fade material on mobile which uses pixel depth which has quite big hit on performance with VR.

    As everyone here mentioned, it would be really nice if Oculus can provide a template - one that only serves to provide that an empty scene hits the 60 frame mark without problems which I, and others haven't had any success with.
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    moulder6 wrote:
    Aside from the fact that even when u manage to build, no matter what's in the scene, u can't get above 58-59 fps, as u have noted alone.

    Yes, but there could be 2 things happening - fps is measured incorrectly (it might be 60 fps stable, but counter shows 58 fps; I don't feel any discomfort at 58 fps, but I've been doing mobile VR for a while now and might have develop some resistance to motion sickness) or/and rendering optimizations are not doing what they suppose to.
    moulder6 wrote:
    The thing is, however that after trying a few of my projects with 4.11, the performance is way worse...

    4.11 is not a release build. It's unstable and full of bugs, which should be reported to Epic (who don't seem to care much about mobile VR right now) I am not sure why you expect for 4.11pre7 work better than 4.10.4 :?
    moulder6 wrote:
    Also, 4.10 doesn't come with the proper Oculus SDK that's needed for shipping the game.

    True, but why do you care for it? You have a ready to be released product ? If so, I understand your concern. If not, just keep working on your game and upgrade when 4.11 is out (or better yet, 4.11 hotfix or 4.12). Or use fork of UE4 from Oculus. It's all the same as official UE4, but with latest SDK.
    moulder6 wrote:
    That's even still the case with 4.11

    4.11pre7 has Oculus SDK 1.00 already.
    moulder6 wrote:
    Being quite technical I can manage a lot f things... I could also, in theory, swallow scripting in Unity, however building Unreal is way over my head, and in all honesty i wouldn't want to have to deal with it, even if I could sort it out.

    I think it's an overstatement. I've compiled a lot of stuff, including game engines, on Windows and Linux, and cross-compiled apps on Linux for Windows. 99% of the time it's about setting up an environment, that is usually tedious process and that's my reason against messing with building UE4 from source. Just give it a try.

    Note that whether it's Unity or UE4, you still have to install JDK, Android NDK, SDK, and all that other garbage required for deployment to Android. Need to make sure your PATH environmental variable on Windows has paths to certain components spelled out. There is no way around that and it has nothing to do with UE4.
    moulder6 wrote:
    The lack of support for some rather basic stuff like fog is quite weird, too. They advice using depth fade material on mobile which uses pixel depth which has quite big hit on performance with VR.

    I was planning on using this fog https://docs.unrealengine.com/latest/IN ... index.html but haven't had time to try it. Is it performance heavy too?

    I am sure it's possible for Epic or Oculus (or a third party so that you don't rely on neither) to make a basic OpenGL-kind of fog that was using in many of modern GLQuake-ports. It's dirt cheap, performance wise, and looks good IMO.
    moulder6 wrote:
    As everyone here mentioned, it would be really nice if Oculus can provide a template - one that only serves to provide that an empty scene hits the 60 frame mark without problems which I, and others haven't had any success with.

    I don't think it's a good idea. A template scene should have some geometry where tris and draw call count is close to soft limits imposed by Oculus, and with that fps should be 60. It's a no-brainer to have 60 fps in empty scene (they can just do a small optimization to achieve that).

    Unity provides VR examples with geometry in the scene. While I don't think it's enough of it to get close to 100k tris and 60 drawcalls in the view, it's not an empty scene.

    Epic/Oculus can use my scene to make sure 60 fps is achievable (I can throw in a few animated characters and particles and fog to make sure all necessary ingredients are present - we wouldn't want to have 60 fps with static mesh and choke on simple particles effects or an animated character).
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    Forgot to mention that spatialized audio with HRTF in UE4 is a must have thing. It's like half, if not more, of the VR experience that UE4 is missing.

    I know they are rewriting audio system in UE4, but it would be nice for Oculus to remind Epic that Audio SDK needs to be there by the time of the release of UE4 with new audio system. Otherwise we won't see it until probably 2017 and by then new players will enter mobile VR space making Gear VR less relevant :/
  • moulder6moulder6 Posts: 29
    Brain Burst
    edited March 2016
    motorsep wrote:
    fps is measured incorrectly
    I don't think that's the case since as i said, I'm within the limits outlined by Epic/Oculus, and get quite some further frame drops every now and then.
    motorsep wrote:
    I am not sure why you expect for 4.11pre7 work better than 4.10.4 :?
    Since despite the bugs, it provide significant updates that should help with the performance - instancing geo on mobile being one of those.
    motorsep wrote:
    True, but why do you care for it? You have a ready to be released product ?
    Doesn't need to be a full featured product. A demo/concept still needs to meet this requirement. Plus with the attitude that Epic display with regarding to mobile & Gear VR in particular, there's no guarantee that even 4.13 would be usable enough, and by the time it's out the current Gear VR and the S6/7 would probably be irrelevant.
    motorsep wrote:
    4.11pre7 has Oculus SDK 1.00 already.
    Which also isn't the most recent version, specifically for mobile.
    motorsep wrote:
    I think it's an overstatement.
    I don't see why would u say that. In any case it shouldn't be needed, as is the case with Unity...
    motorsep wrote:
    Note that whether it's Unity or UE4, you still have to install JDK, Android NDK, SDK, and all that other garbage
    That's something else completely. I'm not expecting either Oculus or Epic to come set up my machine.

    motorsep wrote:
    I was planning on using this fog
    The effect on mobile is all but invisible, as u can see here, since on mobile it's rendered by vertex. U need really dense meshes to make it show up at all.
    motorsep wrote:
    I don't think it's a good idea. A template scene should have some geometry where tris and draw call count is close to soft limits imposed by Oculus, and with that fps should be 60. It's a no-brainer to have 60 fps in empty scene (they can just do a small optimization to achieve that).

    I'm not sure if that's the case, since i haven't had much luck with it. Even so, it'd be a starting point that we currently don't have.
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    Wow, fog sucks in UE4 for mobile.

    I keep my fingers crossed for Epic and Oculus to get UE4 where it should be for Gear VR (without dropping BP and resorting to C++ only; if that will be the case, I might as well just use Unity instead).
  • andrewtekandrewtek Posts: 971
    Art3mis
    So which Android SDK are you using? I have run into several possible sources:

    - C:\Program Files (x86)\Epic Games\4.10\Engine\Extras\AndroidWorks\Win64\AndroidWorks-1R1-windows.exe
    This one seems the most logical since it came with Unreal Engine.

    - http://developer.nvidia.com/tegra-andro ... pment-pack
    This one seems logical since it is in the documentation from Epic. This location is mentioned in the video at 2:15. What makes it less logical is that the URL redirects me to https://developer.nvidia.com/codeworks-android.

    - http://developer.android.com/sdk/index.html
    This one seems logical since it is the official android SDK from. When I did a sanity test build with Unity, I got the SDK from here based on eVRydayVR's great setup video.
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    It's all here: https://docs.unrealengine.com/latest/IN ... index.html (read 2 PDF files)

    Also, http://docs.unity3d.com/Manual/android-sdksetup.html It's all the same for UE4.

    Also, this is actual guide how to setup Android SDK tools: http://developer.android.com/sdk/instal ... ?pkg=tools (I believe that's what I installed, not Android Studio).

    I don't think I installed Tegra stuff.
  • andrewtekandrewtek Posts: 971
    Art3mis
    Okay, here is what I tried today:

    PASS ONE
    1. Uninstalled everything on my machine related to Android/Unreal Engine. This included binaries, environment variables, etc.
    2. Installed Unreal Engine Launcher.
    3. Installed Unreal Engine 4.10.4.
    4. Followed instructions from the PDF that motorsep referenced. Two PDFs were referenced, but their content related to Android is much the same. Note that the setup steps for these PDFs are outdated.
    5. Created a sample scene in Unreal Engine.
    6. Attempted to build APK. Received error stating that components needed for Android Build from Unreal Engine were missing.
    7. Error window pointed to documentation for the Android Install Instructions for Unreal Engine

    PASS TWO
    1. Uninstalled everything on my machine related to Android again. As before, this included binaries, environment variables, etc.
    2. Followed the instructions provided by Epic for installing the Android SDK.
    3. Created a sample scene in Unreal Engine 4.10.4.
    4. Built an APK and deployed to Galaxy S7 Edge. Application loaded, and I could look around. However, the scene was totally jumpy as I would turn my head.

    PASS THREE
    1. Installed Unreal 4.11.Preview7
    2. Created a sample scene in Unreal Engine 4.11.Preview7
    3. Built an APK and deployed to Galaxy S7. Application loaded and rotation/movement was buttery smooth!!!

    So, while I had wanted to avoid an experimental build, it would seem that the 1.0 mobile SDK in 4.11 is needed to get acceptable performance on GearVR/Galaxy S7.

    Thanks for the help motorsep. I ended up using the Android SDK provided with UE4, but your feedback gave me more things to try. I just wish I had tried 4.11.Preview7 sooner.
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    Interesting, I didn't have any issues :/

    Good to know your way worked for you ! :)
  • andrewtekandrewtek Posts: 971
    Art3mis
    motorsep wrote:
    andrewtek wrote:
    I really like UE4, but I need my tools to work. I just installed Unity and was able to get something deployed to my GearVR in less than 45 minutes. It worked perfectly.

    Sigh.

    Switching to Unity?
    Definitely not switching.

    After pulling my hair out trying to get UE4 working, I was willing to ~try~ anything. I needed to see something work. The fact that Unity did work was sort of a clue too. Unity's build actually compiled for Android SDK 23 (Marshmallow) and used a newer version of the Oculus SDK. That had me trying to get UE4 to build SDK23 (no luck) and gave me additional hope that trying 4.11.preview 7 might solve my runtime problem.

    The main reason I really wanted to get UE4 working is that I am working on something that has GearVR and Rift components. We really want to be able to share multiplayer logic between them.

    Thanks again for your time motorsep!
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    Oh, I didn't mean switching due to inability to build for Gear VR. I was wondering if you considered switching because of performance issues, lack of features and general lack of interest in Gear VR on Epic's part (now that Oculus expressed desire to change things around, Epic are the ones that hold back).

    For me, there are 2 things that make UE4 beat Unity any day (which makes it a really hard call, even with all the issues I mentioned in the past posts) - Blueprints and free multiplayer with dedicated servers. Even if I conquer C#, there is still MP that has to be paid for based on number of players and other stuff.
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    We are working with Epic on better Gear VR support and they are interested! Initial support was only added recently. The stock version of 4.10 comes with mobile SDK 0.6.2, which will not work properly with S7 as you have found. As you noted, 4.11 is not yet ready for prime time, but all new features and performance optimizations are being added there, so it is interesting if you are a strong programmer and interested in working around the open issues with it. Today, the only way to use 4.10 with Gear VR on S7 is to build from source in our Github repo (https://github.com/Oculus-VR/UnrealEngine/tree/4.10-0.8). In general, Gear VR UE4 development requires you to be technical. If you want to totally avoid coding, Unity is probably a better option.
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    vrdaveb wrote:
    If you want to totally avoid coding, Unity is probably a better option.

    That's not quite true, since that's what you have to do in Unity in general :) Good thing Unity's VR assets provide all non-programmer need to get started, but then Oculus Utils have to be merged into it which is quite technical. On the contrary, using Oculus Utils requires to do coding for everything else (locomotion, UI, etc.).
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    We have seen a number of projects use the Oculus Utilities for Unity without writing any code. However, especially on mobile, the ability to code will give you a lot more control over the app's behavior.
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    vrdaveb wrote:
    We have seen a number of projects use the Oculus Utilities for Unity without writing any code. However, especially on mobile, the ability to code will give you a lot more control over the app's behavior.

    Indeed, being able to code is a power necessary to be able to achieve a better project.

    I am just noting that an artist/designer can achieve more, and quicker, using BP with UE4 than using Unity and C# simply because C# is actual programming language that needs to be known at a certain capacity, IMO. It took me less time to figure out how to make my UE4 project do automatic screenshots when running on Gear VR, than do something similar in Unity.

    I guess what I am saying is BP allows artists to get their prototypes up and running in shorter period of time, and provide that alpha/beta build of the game to either go for early access or/and recruit actual programmer into the project. It would take more time and effort in Unity, unless said person already know C# and general programming practices (using C++ or C#).

    And on top of that, having to pay for multiplayer services (Unity) isn't a good thing, when UE4 provides a better solution.

    Also, if I want to make a cross-over game, I'd want to stick with one engine and for me as non-programmer (or probably rather someone who doesn't know formal programming language) UE4 seems to be a better option.
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    What you're asking for (free, performant, cross-platform VR support on heavily resource-constrained mobile devices for non-technical app makers) is a goal of ours and Epic's (and Unity's). Unfortunately, these things take time. For now, I would recommend hiring a programmer or ramping up on C++ if you want to stick with UE4.
  • motorsepmotorsep Posts: 1,397 Oculus Start Member
    Sorry, I still don't see how BP, if used properly (especially if compiled in 4.11), can bog down performance on S6 :/
  • andrewtekandrewtek Posts: 971
    Art3mis
    vrdaveb wrote:
    In general, Gear VR UE4 development requires you to be technical. If you want to totally avoid coding, Unity is probably a better option.
    I don't mind coding or being technical at all. I don't use UE4 to avoid code. I do wish that I would not have needed to figure out, through trial and error, that 4.11.preview was required if building for Galaxy S7. Following are some things that would have helped to make that clear:

    1. When you run an app built using UE 4.10.4, instead of having the display shake when turning one's head, throw an "Unsupported Runtime" exception with a message like "This application was not built using Oculus SDK 1.0 or newer." That would have been super useful.
    2. Update the documentation to state clearly and prominently that the Galaxy S7 only works with 1.0. I checked the developer blog and this forum, as well as the Unreal Engine forum. I could not find a single mention of this.
    3. When someone posts a question to the forum asking what version of UE to use, and mentions they are having issues building for Galaxy S7, having someone at Oculus post a response would be nice too. I totally get that last week was GDC though, and that you are releasing CV1 in just a few days... so monitoring the forum is not (and should not be) the highest priority.

    Without at least one of the above, the best assumption I could make was that my own code/setup was broken.
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    andrewtek wrote:
    I do wish that I would not have needed to figure out, through trial and error, that 4.11.preview was required if building for Galaxy S7.
    Sorry for the frustration. We are setting up better documentation and looking at other ways to help people avoid these hazards when they exist.
    andrewtek wrote:
    instead of having the display shake when turning one's head, throw an "Unsupported Runtime" exception
    Good idea. I'll see if this is possible. At first glance, it looks challenging because 0.6.2 does not use our shared SystemActivities. That means the Gear VR service would probably have to catch and stop apps using 0.6.2. The VR service is hard to change, but I will see what we can do.
    andrewtek wrote:
    the documentation to state clearly and prominently that the Galaxy S7 only works with 1.0.
    Apologies, the docs for UE4 + Gear VR are very sparse right now. We are reviewing them and we expect to have a better offering and template soon.

    You're right - GDC and Rift launch have taken a lot of our bandwidth recently, but the UE4 + Gear VR developer experience is important to us. We are just getting started supporting this, but your feedback will help us make it better.
Sign In or Register to comment.