Using ARKit with 4.18 Preview?

Because the 4.18 Preview no longer has “AppleARKit Camera Texture” or “Apple ARKit Camera” (I believe because Epic is unifying the Apple/Android development process), the ARSample project is no longer relevant.

What the correct process for setting up a basic AR project using the new version of the engine?

Hello FlawsomeInteractive,

This was addressed in the 4.18 Preview 1 Announcement thread on the forums. Please see the following post for the information found by a user who was asking the same question:

https://forums.unrealengine.com/unreal-engine/announcements-and-releases/1357546-unreal-engine-4-18-preview?p=1358080#post1358080

Hey Matt, thanks for the reply.

I saw that post. It doesn’t say what those 2 items are or how to use them.

I’m looking for an explanation that’s more detailed than “I did find the stuff needed”.

Hi Flawsome, I just saw the post too, the information is very limited, should I replace Apple ARKit Camera (4.17.1) with ARKit Passthrough Camera (4.18.0)? And how I get ARKit Passthrough Camera?

This gets ARKit working with ios 11 and xcode 9 official versions. But the camera display will be , I have raised this with the devs.

Install 4.18 Preview 1.
Create new project → blank → set it to mobile, no starter content, scaleable 2d/3d
Apple ARKit plugin should be enabled as default but just double check under plugins.
Setup IOS so your provision/certificate are present. Setup bundle display/name/identifier
Change minimum ios version to IOS 11, I’ve kept Metal v1.2, Frame rate lock to 60fps
Under Project settings enable ‘Start in AR’
Under Additional Plist data add this: NSCameraUsageDescription This application will use the camera for AR
Restart if prompted

In your game world you should have a Directional Light (mine set to static), and add a and a large cube static mesh (mine scaled to 100x100x100) set its world location to 0,0,0
Create a new Blueprint of type pawn and add a camera component to it, compile. Now add this Pawn to your world at position 0,0,0
Create a new material. It will be a standard material opaque/unlit and 2-sided. Add a Screenposition node and plug this in to the UVs of a ARKit Passthrough Camera node, plug the output of the ARKit Passthrough Camera in to the Emissive Color of your material. Compile and save this.
Go back in to your level and add this material to the Large scaled cube.
Build lighting if necessary.
Connect your iphone/ipad and Launch
Game should start but as I mention, camera feed is currently !! I have raised this with the devs as a possible bug, alternatively I may have messed up the process, but this is as far as I have got ARKit working with ios11

I’ve put together a fix for the camera issue - details here ARKit 4.18 preview 1 - official IOS 11 and XCode 9 - camera feed red? - #7 by skyphyr - Mobile - Epic Developer Community Forums

I would like to use ARkit for basic positional tracking for a mobile VR project.
I don’t need the camera video feed but only the position of the camera in the real world (like with the Apple ARKit Camera component in 4.17). Now in 4.18 preview the component is not present.

Does anybody know how to achieve that in 4.18? Thanks in advance!

You can just use the pawn/camera location after you’ve enabled AR.

Thanks. I’m really new to UE. How can I enable AR for the pawn/camera?

Hey darinsmyth, I followed your updated guide here: ARKit 4.18 preview 1 - official IOS 11 and XCode 9 - camera feed red? - #5 by darinsmyth - Mobile - Epic Developer Community Forums

Looks like this captures camera rotation and applies it to an in-game camera. Sweet! Does anyone know how to capture physical movement? Or normalize the camera feed (mine also seems strangely calibrated)?

You can find the setting in Edit > Project Settings

It works. Thank you very much!

Hi Jodi - just to make sure - did you get position from the AR camera - and put it on the VR camera and that works ok?
Can you (or anyone else :-)) explain bit how you did this?

One of the mods closed this thread on me before everything (tracking, plane detection, camera setup, etc) could be totally spelled out. My guess is because the process is in a state of constant flux as they tweak things. Personally, I decided it’s best to wait for the official 4.18 release to come out which will almost certainly have a better documented process.

Good luck!

Hello FlawsomeInteractive,

Nothing has been closed and people are still free to comment as they see fit. If you do not believe that the issue has been resolved, you can unaccept the answer that has been marked as resolved.

I don’t have permission to unaccept the answer - see pic. I figured you locked it out for PR reasons or something haha! For the record, totally appreciate your help in the forums and the answer board. You and the rest of the staff are awesome.

216177-temp.png

That is not intended, so I’ve unaccepted it for you. We’ll look into why that was the case.

The APIs are changed for 4.18. Expect an updated AR sample project that exemplifies core features and functionality once 4.18 hits the street!

Hi! I followed the instructions using 4.18 preview 4, and It doesnt work. The scene is black, no camera image, nor is possible to move the camera. So, please, anyone knows if its possible to use preview 4 or it is broken?

Now 4.18 is released - anyone tried the google VR + ARkit with success?