Download

Support Thread: Oculus VR Production for Unreal Engine

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.

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.

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:
Unreal Engine 4: PSO Caching (Pipeline State Object) to Reduce Load Times/Hitches - YouTube

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:
UNREAL ENGINE 4.25.1 PACKAGING FOR ANDROID TUTORIAL UPDATED! - YouTube

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

Android Manifest Control | Unreal Engine Documentation

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:
How to sign your UE4 Android game for distribution - YouTube

and I also recommend watching this as an orientation for what App Lab is:
Oculus Quest App Lab - Install App Lab Games Without A PC - YouTube

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:
Performance analysis using Systrace (Android Dev Summit '19) - YouTube

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:

How did I optimize for Oculus Quest (Unreal Engine VR optimization) - YouTube
Measuring performance of your GAME on Oculus QUEST (VR optimization with RenderDoc) - YouTube

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.

Vulkan! Powering AAA Experiences on Android | Unreal Fest Europe 2019 | Unreal Engine - YouTube

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.
High-Performance VR Glass - UE4 - YouTube

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

https://answers.unrealengine.com/questions/834581/android-how-to-add-an-xml-file-to-resxml.html

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!

4 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

Hi. I am working through this course right now. I am currently stuck on implementing standard controller motion in course 3. I think I have all the code in place, but for some reason I cannot get the motion to work. The oculus controllers return zero even if I move the thumbsticks.

Good afternoon everyone!

I wanted to drop in and let everyone know that the feedback in this thread has been brought forward, is being collected, and will be investigated. I also want to thank @ooghe for the very comprehensive list of issues they ran into while taking the course and possible solutions or work arounds to enable those struggling to continue on with their learning.

Also, if you do encountered bugs or issues with this course or any other, we ask that you please submit a ticket through our support page: [Unreal Online Learning]

Thank you!

2 Likes

my pleasure! I hope it helps.