Setting up UE5.3 to create a project for PICO4 headset

hi,

I have built a couple of projects using Unreal so far and it’s brilliant.

I recently got a PICO4 vr headset and would love to build a project that runs on it.
I spent several days going over documentation, trying to figure out how to set up a UE5.3 project for the PICO4 vr headset, but so far it’s mostly been very confusing.
I’ll admit that I part of that is probably because it’s a whole new area that I have no experience with but the PICO documentation isn’t very clear either.

The only video that looked promising turned out to be about UE 4.27, and following that for a lack of something more recent I ended up with the engine giving warnings about missing OpenXR plugins (that the video told me to disable) and a message that the project needs to be rebuilt on startup. Which fails.

Just to get my head around the basics, I would love to know if:

  • how AGDE + Visual Studio relates to using Android Studio: I cannot find out whether they are alternatives - or if one of them, or both, are needed
  • some pages say I need Visual Studio 2022, others say 2019
  • most Pico resources recommend configuring the VR project as a C++ project instead of a Blueprint based one, because “it could possibly cause the project to run in 2D mode”. Fair enough, but trying to do that resulted in “project needs to be rebuilt” - which fails. And it’s a rather vague recommendation anyhow: do blueprint projects always fail to run properly, or often, or just sometimes or rarely?
  • is it possible to specify a VR headset as “display device” without bothering about other VR features, like the ability to pick up items? Would this be easier to achieve than setting up a true VR project?
  • has anyone succeeded in setting up a PICO4 project with a recent version of UE - say 5.2 or 5.3?Is there maybe a resource or tutorial that targets this combination that I missed?

Any help greatly appreciated!

Thanks :smile:

1 Like

After posting the above message I decided to just give it a try, though it felt like trying to throw a dart in the bull’s eye in pitch dark.
So I just enabled the OpenXR plugins again and tried to package the default VR template. I did get a build error because I had made a silly mistake in configuring the Android sdk and ndk settings, but when I fixed that it built. Just like that.

I haven’t yet deployed it on the PICO but will try that later this weekend when I have some time. If it all works out I’ll note down everything I did, maybe it helps someone else :slight_smile:

PS though I answered the last of my questions above I’d still be interested in answers to the others :pray:

Im in the same boat atm. Followed the same tutorial, ended up trying a few things:

  1. Using Pico OpenXR plugin instead of PicoXR
    This worked but when I started the apk on the headset the controllers didnt work. Running it through SteamVR fixed the controllers but the tracking was very wobbly and behaving strange.

  2. Went back to PicoXR with the non-Pico OpenXR plugins still enabled (like you said above) but it would only run in 2D mode on the headset…

UPDATE:
I just managed to get the PicoXR plugin working correctly. In order to be able to build without the OpenXR plugins enabled you need to open the “B_AssetGuideline_VRTemplate” blueprint and delete the OpenXR plugin elements in the details panel. With that done you should be able to build :slight_smile:

3 Likes

Wow, good find! :ok_hand:
I haven’t had time in the past week or so but will try now myself.

1 Like

Alas, no luck. Getting “Platform Android is not a valid platform to build. Check that the SDK is installed properly”, though I followed this page to set up Android Studio & SDK to the last letter.

It’s just really confusing. These are my Android SDK Platforms settings showing that API v34 is installed, plus 10.0 (Q) - which is somehow also v29:

SDK build tools are versions 34.0.0, 33.0.1 and 30.0.3:

NDK “side by side” is v25.1…:

Screenshot 2024-04-05 164741

Trying to find a solution for the “SDK not installed properly” issue I found this page and Iooked at the Android SDK location (“edit” on the first image above) and this showed:

… I cannot check the first box before Android SDK - maybe because it is installed, but then I would expect it to show a greyed-out checked box?

Anyhow. Back to the Unreal editor, I have these versions listed in Project Settings → Platforms → Android:

that mentions SDK versions 24 and 26 - that last one being the target version. I cannot tell if that’s supposed to go together with any of the versions mentioned in the Android Studio settings, ie. 29, 30, 33 and 34: the Android versioning system sure isn’t the most straightforward ever :wink:

And here are my Android SDK platform paths:

Running platforms → Android → cook content ends hopefully with

UATHelper: Packaging (Android (ASTC)): Installed Sdk validity:
UATHelper: Packaging (Android (ASTC)): Android: (Status=Invalid, Allowed_Sdk=r25b, Current_Sdk=, Allowed_AutoSdk=r25b, Current_AutoSdk=, Flags="Platform_ValidHostPrerequisites")
UATHelper: Packaging (Android (ASTC)): Will install 'Android SDK r25b'
UATHelper: Packaging (Android (ASTC)): ----------------------------------------------
UATHelper: Packaging (Android (ASTC)): Running 'C:\Program Files\Epic Games\UE_5.3\Engine/Extras/Android/SetupAndroid.bat android-33 33.0.1 3.10.2.4988404 25.1.8937393 -noninteractive'
UATHelper: Packaging (Android (ASTC)): ----------------------------------------------
UATHelper: Packaging (Android (ASTC)): Scanning for envvar changes...
UATHelper: Packaging (Android (ASTC)): ... done! 
UATHelper: Packaging (Android (ASTC)): ----------------------------------------------
UATHelper: Packaging (Android (ASTC)): Finished with 0
  • though it says that it “Will install ‘Android SDK r25b’” (next to those versions it already has?) - how on earth it arrives at the conclusion that it needs to install version r25b while Unreal has min version 24 / target 26 specified, and Android Studio provides a half dozen more recent versions, I don’t know.

But to add the cherry to the pie, the package command finishes with:

UATHelper: Packaging (Android (ASTC)): Platform Android is not a valid platform to build. Check that the SDK is installed properly.
UATHelper: Packaging (Android (ASTC)): Took 0.45s to run dotnet.exe, ExitCode=6

Honestly, I have rarely been so immensely confused. And that’s not even considering what “ASTC” is (and if I need it) and what the difference is between OpenXR and “regular” XR.

Maybe it is also worth mentioning that I get a lot of weird paths during packaging, like this:


UATHelper: Cooking (Android (ASTC)): LogInit: Display: Warning/Error Summary (Unique only)
UATHelper: Cooking (Android (ASTC)): LogInit: Display: -----------------------------------
UATHelper: Cooking (Android (ASTC)): LogInit: Display: LogConfig: Warning: GConfig::Find attempting to access config with non-normalized path ../../../../../../BranikVR/Config/DefaultEngine.ini. Please use FConfigCacheIni::NormalizeConfigIniPath before accessing INI files through ConfigCache.
UATHelper: Cooking (Android (ASTC)): LogInit: Display: LogOnline: Warning: Pico: Pico SDK failed to initialize
UATHelper: Cooking (Android (ASTC)): LogInit: Display: LogPackageUtilities: Warning: Engine.ini:[Core.System]:Paths entry '../../../Engine/Plugins/Runtime/OpenXRHandTracking/Content' is not mounted. Skipping it.
UATHelper: Cooking (Android (ASTC)): LogInit: Display: LogPackageUtilities: Warning: Engine.ini:[Core.System]:Paths entry '../../../Engine/Plugins/Runtime/OpenXR/Content' is not mounted. Skipping it.
UATHelper: Cooking (Android (ASTC)): LogInit: Display: LogPackageUtilities: Warning: Engine.ini:[Core.System]:Paths entry '../../../Engine/Plugins/Runtime/OpenXREyeTracker/Content' is not mounted. Skipping it.
UATHelper: Cooking (Android (ASTC)): LogInit: Display: LogPackageUtilities: Warning: Engine.ini:[Core.System]:Paths entry '../../../Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Content' is not mounted. Skipping it.
UATHelper: Cooking (Android (ASTC)): LogInit: Display: LogPackageUtilities: Warning: Engine.ini:[Core.System]:Paths entry '../../../../../../BranikVR/Plugins/PICOEnterprise/Content' is not mounted. Skipping it.
UATHelper: Cooking (Android (ASTC)): LogInit: Display: LogLinker: Warning: [AssetLog] C:\BranikVR\Plugins\PICOXR\Content\DevTools\TileVisualizer\Source\MF_Value2Color.uasset: Asset has been saved with empty engine version. The asset will be loaded but may be incompatible.
UATHelper: Cooking (Android (ASTC)): LogInit: Display: LogDerivedDataCache: Warning: C:/Users/luthi/AppData/Local/UnrealEngine/Common/DerivedDataCache: Loading C:/Users/luthi/AppData/Local/UnrealEngine/Common/DerivedDataCache/Buckets/LegacyTEXTURE/98/41/b9ecbe081078e3add48e8372340b95700532.udd from '/PICOXR/Textures/G2Texture/G2_VolumeUp.G2_VolumeUp' is very slow (0.01 MiB/s); consider disabling this cache store.

That may be because I moved my projects to the drive root at some point to avoid the “path too long” errors"

Very strange. Looks like you have the correct versions of the SDK and Java installed. Assuming you ran the Android setup.bat with no errors? Also your logs seem to indicate you have some OpenXR plugins enabled still, make sure to disable and delete them from your project plugins folder.

As for the difference between OpenXR and the native XR plugins - OpenXR supports most headsets which means you can deploy the project to any headset you wish and it will just work. With PicoXR (or MetaXR and so on) it will only support this specific headset. Generally I would use OpenXR if possible but havent been able to get it to work in UE yet. Also ASTC is just a texture compression format :slight_smile:

Honestly the whole Android setup in UE is needlessly complicated. Other engines set it all up automatically during installation…

1 Like

Thanks, I’ll double check the plugins - or better maybe start a new test project with a clean slate. This was just the VR template anyhow for now.

1 Like