Support Thread: Oculus VR Production for Unreal Engine

I have seen very little discussion for this Unreal Learning course. Figure we should start a support thread and discuss issues we run in to?

So my first problem is a missing blueprint. I am on the final video of Hand Presence & Interaction called Building a Dart Game. I seem to have a missing blueprint BP_Dartboard. Anyone else run in to this?

3 Likes

Thank you for starting this thread. Iā€™m only a few steps behind you and would love to compare notes, but Iā€™ve been truly stumped by ā€œIs Guardian Activeā€, so I take it you succeeded?

If so, may i ask, are you not seeing this in your output log?:

Iā€™ve been stuck on ā€œIs Guardian Activeā€ for over a week, and I assume that error is the issue (though Verify Entitlement works just fine), but having rebuilt the project to this point twice and downloaded the demo, I consistently get it thrown each time, in 4.24.3, 4.25, and 4.26.1

I just realized a moment age I hadnā€™t signed both legal agreements in setting up my Organization for my test account, though that hasnā€™t yet fixed anything. But I just would love to know what your setup isā€¦

Iā€™m
Windows 10
UE4.24.3
Quest 2 w/Oculus link, Oculus app running w/ Dev mode enabled

The only possibilities I can think of are a hardware issue, or something to do with the setup of my Organization, as I think Iā€™ve ruled out everything else. Iā€™m at the point where I may try the Unity path to see what the equivalent of ā€œIs Guardian Activeā€ is there, and see if I can isolate whether it is a UE or Oculus issue.

Oh, and I do see the BP_Dartboard blueprint in top level Dev folder of the OculusVRDartsGame projectā€¦

I skipped the Guardian section actually, I am more interested in the course as a general VR dev point of view rather than specifically for Oculus.

Here is an interesting issue someone might encounter with PickUp.

In ā€œGrabbing Objectsā€, I was unable to pick up the Dart until I added both PickupActorInterface_Dart (which is in Darts/VRPawn and that I had set up earlier) in addition to PickupActorInterface (from the VirtualRealityBP/Blueprints folder) to Class Settings. Even though the Pickup Event Iā€™m calling is definitely from the PickupActorInterface_Dart. This is unlike what is depicted in the tutorial and the setup in the OculusVRDartsGame project. I can only imagine I did something wrong in ā€œSetting Up Our Pawnsā€ and may revisit later.

2 Likes

I actually had the exact same issue - if I remove PickupActorInterface I can no longer pick up the darts. Since we had the exact same issue I am inclined to believe this is on their end. Iā€™m really not sure about this course.

Iā€™m muddling through very gradually, almost at the end of ā€œBuilding a Dart Gameā€, though Iā€™ve been waylaid by OculusLink stability issues since the software update this past weekend and am trying to fix that today.

I did manage to solve one of two related issues Iā€™ve been having, which is the ā€œOculus: Failed Oculus login.ā€ warning. This didnā€™t yet resolve the issue of my accessing Guardian functions, but if Iā€™m ever going to access it, there is a way to get rid of the warning that you must first do.

You can read here:

But basically, you have to go into the Oculus Dev Dash, go to ā€œEdit Detailsā€ in the App, and take a look at the API section to see if you have a UserID. If you donā€™t, it needs to be requested by going through to Data Use Checkup, and requesting User ID and optionally User Profile. It prompts you to make your case to Oculus when you make the request, but I think those are automatically granted once you hit submit the request because I got mine immediately and it resolved the warning message.

Anyway, that didnā€™t actually fix my ability to access Guardian, but Iā€™m going to mention it to the instructor regardless.

Another significant complication in this course will be encountered in the ā€œCommunicating Between UMG and Blueprintsā€ section, due to the fact the Darts Assets imported from Epic already have UI coding that the course instructs the user to do, so this section involves out of sequence steps and some debugging.

Creating certain variables (ā€œButton Actionā€ and ā€œValueā€) and custom events (ā€œUI_CoreButtonPressedā€) at the outset that already exist in W_CoreButton will not be possible, and will crash Unreal if you donā€™t realize what is happening. The key tell is an alert message in opening W_CoreButton that "following member variables in blueprint /ā€¦/ have invalid type. Would you like to remove them?, and a number of compiler errors already in the provided asset.

Capture.PNG

Anyway, to get your bearings, look in the DartsAssets project youā€™ll have imported from, and be aware that there is functional code in there that the tutorial presumes doesnā€™t exist, and this makes life difficult. Iā€™m still needing to take a few steps back to work around it, as there are a number of compiler errors that can follow on from this if you donā€™t take stock at the outset.

1 Like

Thanks for posting these, ooghe. Do you think these errors might be unique to your project? I wonder if anyone else has had the same problems.

Do you recommend continuing with the course?

Hi Slim- sorry for not seeing this sooner

So I did manage to make it through the ā€œ**Implement UI with Unreal Motion Graphicsā€ **section as of Monday, so yes it took me awhile and yes it was a pain. But Iā€™m soldiering on so farā€¦

The best technique for what I posted above is to have the clean copy of the downloadable OculusDartsVR project on hand (I run an instance while Iā€™m working on my Darts project) for reference, and do not hesitate to remove any imported code creating compile errors (I mean literally, just remove any code like what I posted there that youā€™ll be rebuilding anyway), and just methodically go through the lessons and youā€™ll get through it. There are at least two bugs you might discover in the code youā€™ve imported that do not cause compilation errors but still affect functionality, in one case I think an EButton Action variable was miscategorized as something other than EButton Action, and later in the Determine Quadrant function used for creating Bonuses, thereā€™s an exec that still needs to be hooked up. I mean, in some ways itā€™s not the worst thing to practice some bug hunting, mind you, this is the first time Iā€™ve used Blueprints so it really is putting me through my paces in an ultimately beneficial way.

Right now Iā€™m on the section about the PSO Cache System, which is about creating a reserve of the most critical shaders. But my current challenge is that this minor task is now becoming my introduction to ā€œcookingā€, which does not succeed due to:

This is apparently a pretty common error, but really raises what I hoped was the out-of-scope topic of Android, learning what practices are and are not kept from 4.24 vs 4.26, what needs to happen with Android SDK, NDKs, and so on.

Looming over this is my lack of clarity over whether the fact that Iā€™m using a Quest 2 complicates completing this course. I take it cooking happens differently for 4.26 than 4.24, and I installed Android.bat from the Extras folder in 4.26 and tried and failed (which was a bit demoralizing) at this mini-tutorial from December:

Sooooā€¦ Iā€™m still assuming what Iā€™m fundamentally doing is using a Quest 2 to build a Rift app, and this should be fine even if the course was created almost a year ago. But Iā€™m just a little leery of trying to line up my cooking learning with something created prior to Quest 2 being out.

1 Like

FYI, quick update on this.

I am still continuing with this, and made it through PSO Caching, and have many notes of what it took to get there.

Currently Iā€™m on the section about converting the project to C++ which, unlike the tutorial, generates many errors for me for some reason Iā€™ll be debugging this week.

I am hoping to, if I can get through it, post my notes on areas in each section where additional information would have helped, and what has changed since the tutorial was posted.

1 Like

Please do keep us posted on your progress and your notes for help.

1 Like

Happy to!

I did finish the course and I highly recommend it despite the hiccups.

That said, it wasnā€™t simple, and my decision to try and go a Quest 2/App Lab route that did not exist when the course was created added some complexity to getting through this. Not the courseā€™s fault of course, all of this is hitting a moving target, but maybe someone will read this and there can be an update for Quest 2/App Lab considerations.

In the end, I was able to get a functional and 72fps performant version to Rift, and a Quest version to App Lab that, while not performant (50fps), is proof of concept.

I was able to do the project in 4.26.2 and also I downloaded the 4.24 OculusVRDartsGame project from Epic (as well as DartsAssets), which I had side by side with my own Darts project in a second instance. I wouldnā€™t have been able to complete this otherwise.

Here are my notes (repeating some stuff from above) in one place broken out by section. I hope this is helpful to people beginning with that course, and again, Iā€™m really new to this and none of this is ā€œofficialā€.

Prepare Unreal for VR Dev/Identify Graphics & Rendering Considerations for VR

These two sections were fine, but if you do make it through the course I recommend coming back to Rendering Materials and VR Considerations once you start looking into analyzing performance

Understand & Implement Locomotion & Ergonomics

This is where I first ran into the Guardian issues, where I wasnā€™t able to see the Guardian Debug View and was getting the ā€œWarning: Oculus: Failed Oculus loginā€ message. The latter turned out to be because I had not done the Data Use Checkup.

Once I resolved that issue, I still wasnā€™t able to see the Guardian Debug View, and was not able to confirm ā€œIs Guardian Configuredā€. Only much later in the tutorial (PSO Cache System), when I learned how to launch the app to my headset, did I see the Debug View (when in Dev build). So it works, it just wonā€™t work from running it through VR Preview AFAIK.

Another thing to mention on the subject of Entitlement and AppID, is that if you are like me you were eager to build this as a Quest App Lab instead of Rift in order to be able to be able to share it to someone someday. This added challenges, but I succeeded (though, as I said, it is not performant). Do not necessarily treat this DefaultEngine.ini step as best practice for reasons that Iā€™ll go more into later:

I made two Apps, one Rift and one Quest, so that I could edit the DefaultEngine.ini and AndroidEndgine.ini as quickly as needed for A/B testing whenever I got errors.

In the end, my final DefaultEngine.ini looks like:

[OnlineSubsystem]
DefaultPlatformService=Oculus
[OnlineSubsystemOculus]
bEnabled=true
OculusAppId=[my Quest App ID]
RiftAppId=[My Rift App ID]

The reason they were not both the same ID is because of an error message I got much later in the tutorial, when I was using the Oculus Platform Tool.

Capture3

Incorporate Handpresence & Interaction

Capture4

I added ā€œOculus VR Assets Onlyā€ directly to my Darts project from Epic Store, but was worried when I was not seeing everything I saw in the Darts project the instructor was working from. So when he referred to something I didnā€™t have (like the C2 Lobby), I would migrate it from the OculusVRDartsGame project without overwriting anything.

Capture8

This worked out ok, but I saw compilation errors that would alarm any newbie like myself, but should this happen to you, donā€™t worry, it doesnā€™t affect anything in this section. I think it entirely UMG stuff addressed in the next section.

The most challenging thing to debug in this section was in ā€œGrabbing Objectsā€, where, as opposed to in the OculusVRDartsGame project, I needed to add both the PickUp Actor and Pickup Actor Darts Interface to the BP_Darts class setting. I still have no idea why this must be done differently than in OculusVRDartsGame.

Implement UI with Unreal Motion Graphics

Here is where the compilation errors I got when I imported assets come more into play.
Capture6Capture7

For these, I just located and ruthlessly stripped out any blueprint logic that generated errors because they are going to explain how to build everything.

I also feel like there were often, if not bugs, incomplete blueprints in both the OculusVRDartsGame/Darts Assets that were usually as simple as fixing some missing connection, a wrong datatype, or various references in dropdown slots. Almost(!) as if they wanted you to actually go through and understand the logic (or maybe these were somehow migration errors).

An example of this type of thing was in the Determine Quadrant function of BP_Dartboard, where my version the connection to ā€œSetā€ from Determine Quadrant of Hit was just not there, and I needed to set it myself even though it was not mentioned in the course.

Another example of this was when the tutorial had me create this (which did not work):

While both the OculusVRDartsGame and the provided Darts Assets Only has this (which did work):
Capture11

So yes, I need to revisit the missing Bonuses functionality, but as I am just learning Blueprints, it was a little weird that OculusVRDartsGame doesnā€™t actually demonstrate it working.

Capture9

One thing I learned when creating the UI_CoreButtonPressed function in BPP_Pawn_Darts is to make sure the ā€œButton Actionā€ and ā€œVariableā€ variables created here are of the same data type as the similarly named Enumeration in Dev. I think I was unable to create the variables the tutorial wanted because I was naming them the name of existing variables, and had not yet set the data type, and this led to some issues.

Demonstrate Level Load Optimization

This section was fine until I got to PSO Cache System, and, again, being very new to this, I did not even know the Quest 2 is Android OS (which I have never worked with before) so I spent a lot of time learning about Android and Launching to Quest.

In addition to what was in the course, this particular videowas very helpful:
https://www.youtube.com/watch?v=0tzrsEm6V9Q

then this boilerplate project helped me as proof of concept that I could get something onto the Quest 2:
[FREE]Oculus Quest Starter - a boilerplate project with environment setup tutorial

Additional learnings:

  • only use Android version 3.5.3
  • if you run the setupandoid.bat, it should have set your computers environmental variables for the SDK, NDK and java, and no need to set those paths in Unreal Project Settings (leave blank)
  • if you ever need to uninstall/reinstall Android Studio, read this including the comments
    How to completely uninstall Android Studio from windows(v10)? - Stack Overflow
  • If you need to relaunch your project, close project, delete Saved and Intermediate folders, and reopen
  • if you get a black screen, debug your project settings against the ones in the boilerplate project
  • When launching, if your project seems to take forever at ā€œLaunching Onā€, try putting on the headset and that may awaken it and complete the build.
  • Should you launch a custom profile for PSO caching purposes you must be sure to set the tick in Deploy.
Sound Design for Virtual Reality

I watched these, but I think this is more for general knowledge. I donā€™t think there is any audio in the Darts game.

Create a Social VR Experience

This section was straightforward until it got to the ā€œBlueprint to C++ā€ section.

Most importantly, when they have you import the Dart.Build.cs file, you will need to make a minor edit to it if you are using UE 4.26.2 and replace ā€œLibOVRAvatarā€ with ā€œOculusOpenXRLoaderā€, which has been renamed since 4.24, otherwise, the build will fail.

Using VisualStudio2019 is fine for this, I had never used it before, but I learned to ignore the many thousands of Intellisense errors, and only pay attention to Build Errors. I believe that one adjustment fixed every one of the 25 Build errors I got, but if anyone experiences issues beyond that, it may be that I had also needed to explicitly tell Darts.sln where the plugins were.

In the ā€œDestinations and Rich Presenceā€ Section, Iā€™m not sure this is still current with the Quest App Lab era. Grouping does not seem work as it did when the tutorial was made, and I have had no luck with Grouping my Quest and Rift apps together, so Iā€™m not sure if any of that is still possible, though I do see my Leaderboard stats are working and that the new C++ class I added works.

My Destination that I had added in this section is perpetually held at ā€œPending Reviewā€, so I do not know whether this is testable.

The next big learning was 7 minutes in to ā€œDestinations and Rich Presenceā€, when we are instructed to ā€œpackage the build and upload it into our Alpha channelā€, simple words that took much time to research, understand, and complete, and it might have been nice to have a few more resources included here.

But in fairness, much of this was because I wanted to build for Quest 2 App Lab. To be clear, Rift wants an .exe and Quest wants an .apk, which is mostly why this got hard.

As I mention in my other thread that I linked to above, the OCStarter project is again very helpful in showing me the Package Settings to export for Quest.

[FREE]Oculus Quest Starter - a boilerplate project with environment setup tutorial

I also think I watched this, from about 15 minutes in:
https://www.youtube.com/watch?v=4SY2Za6j7UY

You will also want to understand what an Android Manifest is, which is controllable through Unrealā€™s Advanced APK packaging section.

https://docs.unrealengine.com/en-US/SharingAndReleasing/Mobile/Android/AndroidManifestControl/index.html#androidmanifestlocation

And add the following Extra Tag to your package settings:
Capture14

Adding this application tag that sets allowBackup to false is a security measure that Oculus will want in a Security check, and I think may even be necessary to upload.

Also, Oculus now prefers an arm64 package as opposed to armv7, and to generate an arm64 build from Unreal you will need to enable the Online Subsystem GooglePlay plugin.

You will also need to learn about how to sign an APK for distribution, so watch this:
https://www.youtube.com/watch?app=desktop&v=-GSBX4ZdgCA

and I also recommend watching this as an orientation for what App Lab is:
https://www.youtube.com/watch?app=desktop&v=tj412PFUJiY

So when I built my Darts package (Shipping, for ATSC), I generated dozens if not hundreds of errors in my output log.
Capture24.PNG

And here were the debugging steps I had to take to get this project packagable:

  • turn off warning for ā€œengine versionā€
  • delete BP_C2UMGDemo.uasset, delete W_Module2Demo
  • repair ā€œRightHand_AnimBPā€ by rebuilding it to match the version in OculusVRDarts
  • M_Blend materials shaders needed to be fixed by adding the Linear Gradient texture in to a missing reference in the graph and parenting each material to the m_blend
  • I deleted the duplicated Grip enumerator (though I think that doing this caused my non-Dart throwing hand animations to be gone, and maybe this was not necessary since it was only a warning)
  • ignored ā€œon component hit warningā€, I assume itā€™s a 4.26 thing
  • and, note to self: get SSD to avoid the ā€œSlow Derived Data Cacheā€ problem, per this thread
    Very slow derived data cache problem - #8 by unit23

Capture16

Finally, once I had an apk build that was good (and this took many tries), I needed to learn about the OculusVR plugin that is accessible from Project Settings, in order to upload this to my Oculus Dev Dashboard.

Mostly the Oculus Platform Launch Window functionality is what matters, which is what allows you to upload to the Alpha Channel. This is a simpler way to do what is described here:
https://developer.oculus.com/distribute/publish-reference-platform-command-line-utility/?device=RIFT#access-token

And worked easily for Rift and less easily for Quest. This gets in to what I mentioned at the beginning, about my Entitlement settings probably not being best practice, where one was a Rift ID and one was a Quest ID. I feel like I was unable to upload this without having at least one valid Rift AppID regardless of whether my Target Platform was Quest or not. I would get an error that there was no valid App ID, which was really weird and I should retest this.

But I did get it onto the Alpha Channel for both Rift and Quest, and so I was able to be done with this section.

Oculus Mixed Reality Capture

I watched these, but do not yet have a 5ghz router, so Iā€™ll come back to that.

Tools & Principles for Project Optimization

This section is all still valid, and all these tools work as described. The one exception is Android Systrace, which did not work for me, but there is a now a tool called Perfetto that does. I was able to get this to work, but have not actually used it yet.
https://developer.oculus.com/blog/how-to-run-a-perfetto-trace-on-oculus-quest-or-quest-2/

This also helped me understand that a bit more:
https://www.youtube.com/watch?v=9kNhB_z704I

Analyze Performance & Apply Common Optimizations

All of this section was clear. So far, I have focused more on learning RenderDoc, which, in tandem with the OVR Metrics tool, seems to be a little easier for me to start with. In addition to what is covered in the course, I also found these helpful:

https://www.youtube.com/watch?v=aoqfzk-lQgY
https://www.youtube.com/watch?v=V5b32PPvlwY&t=494s

I also felt this link on Android Vulkan would be good to anyone creating for Quest 2 App Lab at this point, as I gather this is pretty necessary for understanding how GPU profiling would work for this.

Much of it was beyond me, but Android Vulkan must be enabled in APK package settings.

https://www.youtube.com/watch?v=piDcBkUY7aQ

Prepare Your Oculus VR App for Submission

This was all pretty straightforward too, and explained Quest performance targets and Draw Calls and why I donā€™t think this Darts game could easily become a Quest 2 app.

Capture22
Capture23

So, for now, Iā€™m satisfied that I was able to get my 50fps version of Darts onto my Beta and send invitations to a friend. I also downloaded the OculusAppStore.psd so that I can place the correct imagery for the app when I get a chance.

Iā€™ve now moved onto my own 3d environment. I think that, in addition to draw calls, the main performance issue with Darts may have been the complex lighting setup and maybe the translucent railing glass which I take it is very expensive on Quest2, but Iā€™m very curious about that.

Iā€™ve seen this video on high performance VR glass, which is allegedly the best possible approach to glass for Unreal to Quest, but I have so far been unable to achieve anything close to that through dithering.
https://www.youtube.com/watch?v=UJwHjIQs2fY

A final note, when I successfully uploaded my APK to the Alpha Channel, Oculus Developer Dash will do security tests on the build.

I donā€™t know how necessary it is to address those for App Lab, but I looked into the ā€œEnable Android NSCā€ vulnerability and was curious about creating a ā€œnetwork_security_config.xmlā€ and found these two threads

Network Security Configuration File

Android: how to add an xml file to res/xml - Mobile - Epic Developer Community Forums

So if anyone has any insight on if this fix is easy for a non- C++ programmer, Iā€™d be curious. The second OpenSSL issue I havenā€™t looked into, but suspect one would need to get an SSL license to address that.

Anyway, I feel like I know a lot more about Quest 2 than when I started the course and it is was very very helpful, and I thank those who created it!

5 Likes

Your OpenSSL is out dated is all. It gets updated often and yours is simply one of the old vulnerable versions.

1 Like

Hey thanks for the notes @ooghe, these are great. I am thinking of possibly giving it a second shot!

1 Like

thanks for the Tips,

I did encounter a problem as well in the adding hands iteractions, i was wondering if anyone had trouble in triggering the stop darts, when hits other actors? and how to solve it?

I do think I remember this, this being an example of one of those minor bugs that seemed almost designed so as not to make it too easy. I was in a situation where multiple darts were accruing and jittering all over the floor as I threw and missed, never disappearing. I think that within the Dart, there was a function for a time limit after throw (or hit) not ticked, or something very simple like that, that you could see was different than in the working versionā€¦

Hey @ooghe, did you mention before you got the project converted to C++ from Blueprints?
Would you be interested in posting the cpp files to Github? I would love to take a look at the code for this course without going through all 16 hrs of video and converting myself lol.

Just getting back from vacation and seeing thisā€¦

I still need to learn how to upload to Github, and when I do Iā€™ll update (I have a few things to get through first). But in the meantime, you can probably just download the working 4.24 Darts version from the Epic Vault and that will already have the Darts.sln they have you create, as well as the new Oculus.cpp class they take you through adding. Mind you, this only works correctly in 4.24.

What threw me was having to revise the Darts.Build.cs otehr than what the tutorial says to do, because they renamed the OculusOpenXRLoader to LibOVRAvatar in later releases. You can see on the left is what they give you, and on right is what works for 4.25+ But really, I think that was the only difference from the Demo version.

I had the same issue and thanks to you i was able to resolve it.

1 Like