Augmented Reality for UE4

Hi,

Thanks for the feedback! It’s good to know it was because of another plugin.

Great! I am glad it’s working now!

Thank you so so much for this!

No problem with developer mode,Android phone screen is white in shipping mode
I’m using a personal edition Please help me

Webcam does not give init error, I just get the white screen error

Android ScreenShot :


Log : Welcome m.yollayap.com - Hostmonster.com

Android screen in shipping mode does not show white camera,No problem in developer mode

Solution road does not work,Help please

I recently ran across a packaging issue with Android builds, so I figured I’d share my solution here.

The AndroidThunkJava_UnpackData method in ARToolkitPlugin_APL.xml assumes that the project name is the same as the last element of the android package name (a.k.a. the ‘appname’ in ‘com.mycompany.appname’).
If this isn’t the case, it unpacks /Content/ARToolkit to the wrong place on-device, causing AR initialization to fail during runtime.

So for instance, if you have a project called ‘MyAugmentedRealityApp’ and set its Android Package Name to ‘com.mycompany.MyAugmentedRealityApp’, then your application will work as intended.
If you then change the package name to ‘com.mycompany.augmentedreality’, the app will package and run, but as soon as you try to initialize AR it will fail and complain that it can’t load camera_para.dat.

This can be solved by modifying ARToolkitPlugin_APL.xml and replacing the following lines:



  String ProjectName = getApplicationContext().getPackageName();
  ProjectName = ProjectName.substring(ProjectName.lastIndexOf('.') + 1);


with the following:



  String ProjectName = getPackageName();
  ProjectName = ProjectName.substring(ProjectName.lastIndexOf('.') + 1);
  try {
	  ApplicationInfo ai = getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA);
	  Bundle bundle = ai.metaData;

	  // Get the project name from AndroidManifest.xml
	  if (bundle.containsKey("com.epicgames.ue4.GameActivity.ProjectName"))
	  {
		  ProjectName = bundle.getString("com.epicgames.ue4.GameActivity.ProjectName");
		  Log.debug( "Found ProjectName = " + ProjectName);
	  }
	  else
	  {
		  Log.debug( "Did not find ProjectName, using package name = " + ProjectName);
	  }
  }
  catch (NameNotFoundException e)
  {
	  Log.debug( "Failed to load meta-data: NameNotFound: " + e.getMessage());
  }
  catch (NullPointerException e)
  {
	  Log.debug( "Failed to load meta-data: NullPointer: " + e.getMessage());
  }


This is a modified version of Epic’s code from GameActivity.java, and thus guarantees that the plugin’s project name will be in sync with the engine’s.

Having shipped two projects with this plugin, I have to say- it’s good when it works, but needing to use a template project and having the plugin make assumptions based on that makes it quite frustrating to develop with, which kind of sucks given the asking price.
Unreal Build Tool provides all the functionality required to avoid this, so it’d be great to see it evolve in the future and become truly plug & play to the degree where you can simply drop it into an existing project and go.

Hi Axel,

Thank you for posting your solution! I’ll check this and update for the next version.

has anyone an idea how to change the default chair into a animation? i can change it into a static mesh, but no moving things? Is that because i use the demo version of the AR,… or do i miss something?

sorry,… missed a replymany pages ago, thanx a lot, it works great: I*t’s quite simple. Just import your skeletal mesh into UE4 , and drop into your scene. Then open the level blueprint and change the target of SetActorRotation/SetActorPosition/SetActorHiddenInGame to the SkeletalMeshActor you have just created. Change it only for one marker at the same time.

That is all!*

By purchasing the commercial version will the developers get updates on future builds?

Hello everybody, I have a commercial license, but I am a newbie in Unreal4AR and I would like to ask:

  1. how do I make it Multi-marker NFT?
  2. How do i tap into the marker events like On Marker Detected etc… so that I can play a sound when a marker is detected

Thanks in advance

Hi ,

I cannot make NFT tracking working on android (Galaxy A5).
It is working (but a little unstable) with PC and webcam.
I’m using same project and same resolution (320x240/640x480/800x600) on PC and on the phone.
On the phone, scene shows for like 1% of time, when on PC with same settings it’s working for like 95%.
I’m using pinball marker with custom generated NFT set.

Paweł

Hi. We are doing mobile application using your plugin with commercial license now.
Got few questions;

  1. Some devices get white screen with “webcam init error”. We got this problem on Galaxy S7 Edge and E5. Sometimes on Xiaomi Mi4. My HTC10 works almost perfect, but once I’ve got this problem too. What may cause this and how to avoid this problem? For now application was packed in one *.apk file. We are planning to use this application on a large variety of devices, so it’s very important it to work properly.

  2. Dynamic shadows doesn’t work well on small object. I mean small in unreal’s measure units. If I scale my model 10x times it’s shadows becomes detailed and correct but model doesn’t fit on screen. If I make it small it fits on screen but with ugly shadows. Is there any way to make your plugin work with much bigger objects?

  1. do NOT pack game in single .apk. You need APK and OBB files for app to work.
    Also, in init node You have to input index number of camera to use. We use a loop that tries indexes 0 to 16, and breaks on first success, so if the camera index on the device is different from 0, it would still work fine.

  2. Move camera further away from the object, so it will appear smaller.

Hi
I follow the guide, build ios successful, but it doesn’t run on my IpadPro(I’m using Personal 1.6 package). The app load but quit to the home screen right away.
If works well on android through.

Hi,
Can sb tell me how I could this function from are toolkit arSetPattRatio()?
I need it to set costum template markers width. Or is there any other way?
Thanks upfront.

This plugin looks really cool, I wonder, can it work with daydream or cardboard on android?
Thanks.


4.11 4.12 4.13 can not be used, only version 4.14 can be used.
My version is COMMERCIAL v1.6R3

Hi,

Yes, 1.6R3 is for 4.14 only. If you need a previous version please contact me in email.