ARCore Camera Feed Issue - UE 5.2.0

Hy there!

I have a problem - constantly pursuing me from version to version - with receiving the Android device camera’s feed by the application.

The situation is next:

I deployed the default Handheld AR project to the Android device. It does work and receives the camera feed. I can scan the desired plane and place an object.

But the only things I see are:


I see that camera does work, but it seems like an overlay covers the camera view.

Going further, after all the UIs have been removed, I can only see a default brick texture:

1 Like

Hey, I’ve just run into the exact same problem when updating my Project… Have you had any luck solving it? I’m thinking about following this guide to set it up from scratch: Setting up a New AR Project in Unreal Engine | Unreal Engine 5.2 Documentation

If that fails it would have to be something in the D_ARSessionConfig right?

Hey!

No luck and no time, tbh.

I used the Handheld AR template, dedicated for Android and iOS devices, and the only version that does work - 5.0.3.

The production versions like 5.1 and 5.2 are unable to provide a camera feed.

In terms of the source of the issue - I would suggest checking the materials first. I am not sure about the configuration session file, but the overlay on my screen is a texture.

I’m assuming the problem is somewhere within the materials involved. Anything related to the camera’s feed passthrough functionality. But I’m only shooting. Will be working on it soon, so, if I will be able to solve this problem - I will update the topic.

Hi, is there any way to get the feed working, I#m having the same Problem.
It is working with Unreal 5.1 but in 5.1 the media player for android is broken. it just crashes the opengl driver when playback is started.

Ar development has been pretty fustrating so far with Unreal…

The issue seems to be tied to the materials bundled with the AR template. The culprit seems to be “M_SceneDepthOcclusion” in the plugin content for ARCore. Here is the solution that worked for me:

Getting Camera/AR Working in Unreal 5.2 w/ Android

  1. Create new Unreal Handheld AR App from template
  2. Configure Android (Project settings)
    a. Change build target to 33
    b. Package game data inside apk
    c. For Android SDK I used NDK 25.1, JDK 1.8/18
  3. In Content Browser settings, be sure “Show Plugin Content” is checked
  4. In Content Browser, search “M_SceneDepthOcclusion” and double click the material to open in editor
  5. Break a node and then reconnect it, apply, and save material

As a side-note, the first roadblock I encountered with deploying Tabletop AR Template with v5.2 was regarding permission writing externally. Once I got around that, I was faced with this camera feed issue.

3 Likes

That’s odd, I still can’t seem to replicate your fix… When you say “Change build target to 33” I’m guessing you’re referring Target SDK version? I’m unsure which NDK/JDK I’m using but I’m pretty sure they’re similar.

I found the materials, is there a specific node you broke the connection to perhaps?

Thanks again for posting!

This is interesting…I had this working last night after I made those changes and packaged, but today when I went to rebuild for Android, I am not seeing the camera feed again. I will repeat and try to re-create this again.

Hi, thank you for your answer. :slight_smile:

I did try this solution earlier and had no positive results. And this time it did not work too. The settings are the same as you described.

The texture is associated with several basic materials and is deep inside the basics of logic. This makes debugging hard without a better understanding of the engine functionality.

Yeah, it’s quite funny. I recognised the texture cause one of my friends was using it in his game.

I expect the problem to be with the materials, considering some of the major features of the update are in that area.

I built an AR project from scratch and no luck there either, so it’s something to do with the engine/plugins, not the template.

Thanks for your progress!

1 Like

I could not get the camera material working for Android in v5.2 again. I could successfully deploy in v5.1.1 though.

2 Likes

Well, I have two projects associated with AR technology - I am interested to have this problem solved. :slight_smile:

By using the solution you described previously? Will try this engine version later.

Actually out of the box (using same settings as above), 5.1.1 camera feed worked after I was able to get past permissions. I didn’t have to mess with materials.

did you find any solution ?

Not yet, we’re still trying to figure it out. I just submitted a bug report with a link to this forum, hopefully we should find a solution!

Hi gents!

It seems like one of my project buddies found several issues associated with the SDK/NDK versions.

I will update the topic as fast as I will catch up with the team next week.

I am facing the same issue since I upgraded my game to ue 5.2 (which was necessary to meet the lastest in-game-purchase requirements for uploading to google play).

Will try setting target to 33 to see if it helps. Please let me know if you find any working solution to this.

hey guys . good news here .
i was trying on it about 1 month and finally think found the answer.
1-using UE 5.0.3 with NDK r21e (21.4), SDK minimum 26 and target 31,java 11 (you also will need java 17 )
2- go to this link and follow for install AGDE Debugging Unreal Engine Projects for Android in Visual Studio with the AGDE Plugin | Unreal Engine 5.0 Documentation
3-create an empty c++ files editor > tools > new c++ class and generate visual studio file project
4- set up your environment variable and add ‘AGDE_JAVA_Home’ to java 17 location (keep JAVA_HOME on java 11)
5- open visual studio file and set solution configuration to debug game and solution platform to android and launch it on device or emulator
u will see some errors u must fix them mine was this : platform toolset not set to MSVC visual studio 2019 (v142)
6-open project and package full project in appropriate location (not launch on device )
7-install packaged project on android device and run issue is gone and you can even change code and launch it through android device (directly)
good luck

Yes, it works in UE 5.0.3. The issue for me is that google play requires building with 5.1 or 5.2 to for in-app purchases functions to work. So my project is in 5.2 now… :frowning:

Hey gents!

In terms of the 5.2.0 production version of the engine - we are still not able to run the template or even the AR session.

In terms of the 5.1.1 production version of the engine - my project buddy solved the black screen issue with the specific SDK/NDK settings. But the engine/ARCore is constantly yelling that there is a problem with these SDK/NDK settings. And still has several other stuff - like flipped screenshots - that make the version unusable in the AR context.

In terms of the 5.0.3 production version of the engine - it does work with specific SDK/NDK settings.
The version of the SDK/NDK - is 21.1.6352462.

I don’t believe we have much more time to tinker with these versions, but in case there will be any other options/solutions - will be keeping you posted, guys.

1 Like