LogGoogleARCoreAPI: Error: Failed to build augmented image database


I’ve been unsuccessful in packaging my app for ARcore. The app works fine targeting iOS ARKit. I understand there are some differences in setting up the AR session config and have added the AR Augmented Images Database. I have also tested the images with arcoreimg and got a score of 100.

I’m not sure what else I can try. I kinda hoped this would be fixed in the release version of 4.20 but I’m still stuck.

Thanks for the awesome work!


PS: Can we get an AR section in Answerhub, please?

Google’s own AugmentedImages example project also fails in 4.20.

This is caused by a missing .exe. You can view this in the Output.log, filtering for errors after attempting to perform a build.

You can workaround the issue by:

  1. Downloading the Google AR SDK (1.2.1 for UE4.20)
  2. Copying arcore-android-sdk-v1.2.1.zip\arcore-android-sdk-1.2.1\tools\arcoreimg\windows\arcoreimg.exe to UE_4.20\Engine\Plugins\Runtime\GoogleARCore\Tools\Windows. You may need to create the Tools\Windows folders. Obviously adjust for your installed engine path.
  3. [Possibly] Clean out your UE4 project folders (intermediate etc.)
  4. Perform a new build

I reckon this should be logged as an issue, but I’m not sure how to do that.

EDIT: Logged as https://issues.unrealengine.com/issue/UE-62277

I should’ve added that I’m on a Mac.

I tried that workaround but it still doesn’t work.

Using the workaround, the AugmentedImages example project builds.

The Google AR SDK contains the binaries for Linux, Windows and Mac. I cannot test on other platforms, but perhaps try the same process and of course choose the Mac binary. You can hopefully validate the path unreal is expecting the binary to be in by checking the Output.log

Can you post your Output.log?

Hi, I’ve tried to copy the .exe into the engine folders and now I should “Clean out” my project.
can you specify what I have to delete in the Intermediate?
Do you mean starting over the whole project?

Hi, i’ve just managed to succesfully build and run AugmentedImages project on android using custom images for tracking. I’ve used bone-stock-straight-out-of-the launcher 4.20.3 WITHOUT the arcoreimg.exe. The trick for me was to use sample images that had the same parameters as those in example, so i’ve used 4728x3264 8bit RGB jpg on compression level 9, and it worked like a charm on SGS7. When i’ve used 2k res png it failed to build, so maybe the file format is the problem in this case. Hope this helps anybody.

I tried updating to 4.20.3 launcher version, re-downloaded augmented images project and packaged everything. it still doesn’t work :confused:
Did you edit the project in any way?

nope, clean install of 4.20.3 (and clean install of android works 1R6u1 from extras folder), extracted google sample to my usual projects folder, opened by double-click the uproject. Then i’ve opened the augmented images data asset and cleared it by clicking the bin icon, and then i’ve added there my image (which was prepared as i described above). Packaged for ASTC and installed via USB cable and install.bat. Tested on SGS7 and SGS8.

I’ve had the same problem building an Imaged database. I dug a bit into the code. in the directory (UE4 4.20.3) UE_4.20\Engine\Plugins\Runtime\GoogleARCore\Source\GoogleARCoreBase\ you can find the file GoogleARCoreBase.Build.cs.
In this you can see where arcoreimage.exe is located and should be. On line 88 there are the following code
RuntimeDependencies.Add ("$ (EngineDir)/Plugins/Runtime/GoogleARCore/Binaries/ThirdParty/Google/ARCoreImg/" + ExecName);
There ExecName = “Windows/arcoreimg.exe”.
I also tested manually running arcoreimg (according to Google’s documentation The arcoreimg tool  |  ARCore  |  Google Developers)
I created a list file and copied in the current image directly to the directory where arcoreimg.exe exists.
Showed that there was no problem creating an imagedatabase. So what was the problem ???.
UE4 creates a temporary directory where it converts images to PNG as well as creates a file image_list_file.txt that contains name and filename (size if entered).
You can see where temporary directory location is by open CPP file …UE_4.20\Engine\Plugins\Runtime\GoogleARCore\Source\GoogleARCoreBase\Private\GoogleARCoreAugmentedImageDatabase.cpp
temporary directory is …\UE_4.20\Engine\Plugins\Runtime\GoogleARCore\Intermediate\ARCoreImgTemp.
The problem I can see is that the entire path for me to this directory is "D:\Program Files\Epic Games\UE_4.20\Engine\Plugins\Runtime\GoogleARCore\Intermediate\ARCoreImgTemp\ it contains a space so arcoreimg.exe batch command look like this
arcoreimg build-db --input_image_list_path=D:\Program Files\Epic Games\UE_4.20\Engine\Plugins\Runtime\GoogleARCore\Intermediate\ARCoreImgTemp\image_list_file.txt
–output_db_path=D:\Program Files\Epic Games\UE_4.20\Engine\Plugins\Runtime\GoogleARCore\Intermediate\ARCoreImgTemp\something.imgdb

when UE4 tries to build with this string it will cut it right at the first space, it should be arounded with “” !!!
So I uninstall UE4 and install it again but now with C:\EPIC\UE_4.20 … … no space! now the path is C:\EPIC\UE_4.20\Engine\Plugins\Runtime\GoogleARCore\Intermediate\ARCoreImgTemp\

Now I have No trouble creating an image database with the example from google (AugmentedImages project).

Well this could be it. On all my machines i have UE installed to a ‘custom’ path without spaces.

you can download the newestUE4Core Version atlink text
and the UE4.20.3Version,copyGoogleARCoreandGoogleARCoreService from UE4.20.2-arcore to UE4.20.3,then build UE4.20.3. and then copy GoogleARCore To Official version.I sucessed by this method. good luck!

Help Anyone !!!