Well well well … I got it to work in UE5.4.4. But I needed to adjust some rendering settings, which are kinda contradictory to the best practices, but I don’t complain if it works.
The following things I have changed in DefaultEngine.ini:
Another interesting observation I made, is that you don’t have to have +ExtraPermissions=android.permission.CAMERA set manually in your Android - Project Settings. It will just ask for permission when you start the AR session.
Anyway, I hope this helps anyone else out there to get at least a working version up.
Especially you @GDXRStudio as you are in a particular dire situation (like us).
Edit: After having Mobile Shading set to Deferred Shading, packaging the project, reverting Mobile Shading back to Forward Shading and packaging again the camera feed has still worked. I have no clue what’s going on here.
Hi, this solution didn’t work for me. ARCore currently doesn’t support Vulkan. When OpenGL is disabled and Vulkan is enabled, my device gives the error below.
LogGoogleARCore: Error: StartARCoreSessionRequest ignored - ARCore requires an OpenGL context, but we’re using Vulkan!
hey. i tried your solution and it didn’t work. also tried several iterations. still didnt work. could there be other settings that actually made the impact that you may have skipped through?
I can confirm that 5.5 extended with this commit supports Vulkan and makes ARCore work again on my Android devices. However, the Google ARCore Services plugin has not yet been updated. When I add a “Config Google ARCore Services” node in blueprint right after (or before) the “Start AR Session” node, it stops the AR from running. This is only the case with Vulkan, but with OpenGL the ARCore Services configuration works fine (except for the black background due to missing camera passthrough). I hope this will also be fixed in 5.6.
Hm, not really sure to be honest, as people seem to get different results with the same settings. I have the following Android SDK settings (is one other thing I can think of):
But besides that, just creating a 5.4 AR Template project has also worked for me. It is really weird …
Another thing that helped in the past, is to manually request the camera permission right before starting the AR session.
Hi @VictorLerp, one more issue has come up on the ARCore with Vulkan topic. Reading the “ARCore Vulkan Support” commit mentioned earlier, I see that a YCbCr colour conversion is needed. This conversion has been included in the FGoogleARCorePassthroughCameraRenderer class, however the FGoogleARCoreXRTrackingSystem::OnGetARTexture function returns the raw image without conversion. This latter function is used by the UPassthroughMaterialUpdateComponent class, which unfortunately passes and renders a bad image without YCbCr conversion. If we want to get the same good image for the components as for the ARCore camera, we should do the same YCbCr conversion in /ARUtilities/Materials/M_ScreenSpacePassthroughCamera material. Could you please include this in the engine or can you suggest a workaround?
The error can be reproduced in the following way. Start from the Handheld AR Template with the new ARCore supporting Vulkan. Add a PassthroughMaterialUpdate component to BP_Placeable. In its EventGraph, after the BeginPlay node, add the SM_Object component to the PassthroughMaterialUpdate with the “Add Affected Component” function (see picture). If you start the application on an android phone and then place the object after plane detection, it will have a strange whitish-purple colour, although it should be transparent. (Repeating the same with UE5.4, the object is transparent.)