Augmented Reality for UE4

Good news so far! What are you guys working on ?

Hi , Iā€™m looking at doing something similar at the moment, porting some of our Aruco code. I was wondering how you took control of the projection matrix so that it matches your calibrated instrinsic camera parameters? Last time I did something similar, I had to modify the engine itself (which is not an option now). Did you extend UGameViewportClient instead? UE4 really needs to expose some of these controls :frowning:

Great. Thanks for the info.

Looks like those wonā€™t be out for a while perhaps. Wondering if something will be available in the next month? I suppose a VR head set might work that we canā€™t see through as long as it has a live video feed that lets us see the real world in real time, similar to the windowless airplanes and cars of the future. Not sure if VR head sets with real time cameras exist either though? Seems like even Google Cardboard should be able to do that since the I-phones have a camera that lets you see its results in real time on its screen?

///Edit
Opps. Looks like the Epson glasses are available. Thatā€™s great.
Your motorcycle and matinee demo look awesome. Thanks for this Christmas gift!

There is no way to do that, you have to modify the engine. The plugin is set up for an ā€œaverageā€ webcam, and donā€™t do any camera specific distortion / lens correction. I am also waiting for this to be exposed in the engine.

Agree, your prices are insane as most part is open source software.
Show some respect to the ones taking the effort giving the source for free, the thing you did is just embed it into UE4 which probably is less then 5% of it.
You can ask money for that but $250 is just way too greedy.

You can download the binary version and use all of itā€™s features for FREE. If you want to create commercial apps and sell them, you need to buy the full version of the plugin with source code , I think itā€™s normal.
As you donā€™t have it, you have no clue how much work, and time I put into itā€™s development. Before posting such comments do some research! Similar solutions could cost $500-1000 /app /platform or /year or even more and you wonā€™t get the source code. If you donā€™t like the price, donā€™t buy it, you can always create your own integration of AR SDKs yourself.

Thank your for your support! :slight_smile:

Very normal and worth more than the price you set. This was my first time trying AR and it worked perfect out the box with my Logitech C300 webcam. It works great with Unreal Blueprint and Matinee so far just like you said it would. Awesome!

Camera failing to initialize on Android.
I tried running the sample project after compiling the engine from source with adding what is provided in the purchased plugin zip into the engine and my project while following the documents but when i run it on my phone i can only see the UI with a white background. The camera fails to initialize. Error is as follows: ā€œARToolkit is not initialized properly. Possible webcam init error. Webcam init error!ā€ Iā€™ve used both 4.9, and 4.10 on a galaxy note5. Any tips on how to debug this?

Iā€™ll try it on a different phones tomorrow.

I tried to run the free demo, but I have a problem when I open it in my laptop, it says webcam error (same when I tried on Desktop PC without Webcam), how can I fix this to make the program recognice the laptop webcam?

Hi,

To debug on android:

  1. Open a windows command prompt
  2. type adb logcat -s UE4
  3. run the app on the phone while connected to the computer
  4. you will see some debug messages from unreal
  5. the ones starting with artoolkit are related to the plugin

Also can you please check your phoneā€™s file system ? There should be /storage/emulated/0/UE4game/YOUR_APP_NAME/YOUR_APP_NAME/Content/ARToolkit/Data and DataNFT
If those directories are missing add them in your projectā€™s package settings -> additional non asset directories to copy

Open the demo project, and edit the ARToolkitBase blueprint. You will find a node Init. Try to change the dev num property from the default 1 to some other id.

logcat says
ARToolkit: Init starter
ARToolkit: Param load start
ARToolkit:Error: Camera parameter load error !!

ARtoolkit directory is already added in projectā€™s package settings -> additional non asset directories to copy.

I only see a saved folder in /storage/emulated/0/UE4game/YOUR_APP_NAME/YOUR_APP_NAME/

no content folder at all and if i manually copy it onto the phone, the logs shows that it got through all of the plugin loading but the game also never opens appearing to crash on some widget.

I successfully reproduced the problem on a borrowed LG phone. Now working on fixing the issue. Iā€™ll get back to you ASAP.

You sir are a 5 star dev, thank you.

In UpdatesForAndroid\UnrealEngine4\4.10\Source\Runtime\Private\Android\AndroidJNI.cpp

remove this line (739):
LocalJNIEnv->ReleaseByteArrayElements(data, buf, JNI_ABORT);

It solved the problem for me.

I tried but the problem still happening

Please make sure to not have any special characters in your project path.

Can you send me you logs from PROJECT_PATH/Saved/Logs to info@unreal4ar.com ?

I look forward your tutorial. I am trying to do something similar for an isometric game and I could not have shadows as good as you. I tried with keying but got a greenish shadow ā€¦ :frowning:

I have the same problem with Unreal Engine 4.10 and with a Galaxy S6 With Camera errorā€¦ Iā€™ll copy the log here:


D/UE4     (23758): [2016.01.06-13.22.26:213]  0]LogModuleManager:Warning: ModuleManager: Module 'GameplayDebugger' not found - its StaticallyLinkedModuleInitializers function is null.
D/UE4     (23758): [2016.01.06-13.22.26:213]  0]LogAIModule: Creating AISystem for world ARToolkitAdvanced
D/UE4     (23758): [2016.01.06-13.22.26:214]  0]LogWorld: Game class is 'Mouse_GameMode_C'
D/UE4     (23758): [2016.01.06-13.22.26:217]  0]LogWorld: Bringing World /Game/Maps/ARToolkitAdvanced.ARToolkitAdvanced up for play (tick rate 0) at 2016.01.06-10.22.26
D/UE4     (23758): [2016.01.06-13.22.26:218]  0]LogWorld: Bringing up level for play took: 0.002389
D/UE4     (23758): [2016.01.06-13.22.26:219]  0]LogGameMode: Warning - PATHS NOT DEFINED or NO PLAYERSTART with positive rating
D/UE4     (23758): [2016.01.06-13.22.26:221]  0]ARToolkit: Init started
D/UE4     (23758): [2016.01.06-13.22.26:222]  0]ARToolkit: Param load start
D/UE4     (23758): [2016.01.06-13.22.26:222]  0]ARToolkit:Error: Camera parameter load error !!
D/UE4     (23758): [2016.01.06-13.22.26:223]  0]LogBlueprintUserMessages: [ARToolkitBaseAdvanced_91] Webcam init error!
D/UE4     (23758): [2016.01.06-13.22.26:235]  0]LogInit:Display: Game Engine Initialized.
D/UE4     (23758): [2016.01.06-13.22.26:505]  0]LogAndroid: Passed GEngineLoop.Init()
D/UE4     (23758): [2016.01.06-13.22.26:505]  0]LogAndroidEvents:Display: DequeueAppEvent : 9, 0
D/UE4     (23758): [2016.01.06-13.22.26:505]  0]LogAndroidEvents:Display: DequeueAppEvent : 7, 0
D/UE4     (23758): [2016.01.06-13.22.26:506]  0]LogAndroidEvents:Display: DequeueAppEvent : 12, 0
D/UE4     (23758): [2016.01.06-13.22.26:506]  0]LogAndroidEvents:Display: DequeueAppEvent : 6, 0
D/UE4     (23758): [2016.01.06-13.22.26:506]  0]LogAndroidEvents:Display: DequeueAppEvent : 7, 0
D/UE4     (23758): [2016.01.06-13.22.26:506]  0]LogAndroidEvents:Display: DequeueAppEvent : 0, 4106950664
D/UE4     (23758): OnAppCommandCB cmd: 6
D/UE4     (23758): LogAndroidEvents: EnqueueAppEvent : 11, 0
D/UE4     (23758): [2016.01.06-13.22.26:545]  0]LogAndroid: Case APP_CMD_GAINED_FOCUS
D/UE4     (23758): [2016.01.06-13.22.26:545]  0]LogAndroidEvents:Display: DequeueAppEvent : 11, 0
D/UE4     (23758): [2016.01.06-13.22.26:545]  0]LogAndroidEvents:Display: ExecWindowCreated
D/UE4     (23758): [2016.01.06-13.22.26:706]  0]LogRenderer: Reallocating scene render targets to support 1280x720 (Frame:2).
D/UE4     (23758): Battery: status = 5, rawlevel = 100, scale = 100
D/UE4     (23758): nativeBatteryEvent(stat = 5, lvl = 100, t = 30.60)
D/UE4     (23758): Battery: status = 5, rawlevel = 100, scale = 100
D/UE4     (23758): nativeBatteryEvent(stat = 5, lvl = 100, t = 30.80)
D/UE4     (23758): Battery: status = 5, rawlevel = 100, scale = 100
D/UE4     (23758): nativeBatteryEvent(stat = 5, lvl = 100, t = 30.90)
D/UE4     (23758): Battery: status = 5, rawlevel = 100, scale = 100
D/UE4     (23758): nativeBatteryEvent(stat = 5, lvl = 100, t = 31.00)
D/UE4     (23758): Battery: status = 5, rawlevel = 100, scale = 100
D/UE4     (23758): Battery: status = 5, rawlevel = 100, scale = 100
D/UE4     (23758): Battery: status = 5, rawlevel = 100, scale = 100
D/UE4     (23758): OnAppCommandCB cmd: 12
D/UE4     (23758): LogAndroidEvents: EnqueueAppEvent : 12, 0
D/UE4     (23758): OnAppCommandCB cmd: 13
D/UE4     (23758): LogAndroidEvents: EnqueueAppEvent : 6, 0

About my previous error Iā€™ll send you an email laterā€¦ I donā€™t have my laptop here