[ARkit] Custom Material for Debug Draw Tracked Geometry

Hi guys,I just want to know how cound I apply a custom material for the tracked plane.
Any suggestion?

Maybe like this?

I would also like to know this

I managed to do this by duplicating what the ARCore Hellow AR sample project does (It has a working example of this but seems to use some custom ARCore functions). It creates and resizes a procedural mesh component to match the tracked surface geometry on each tick. It was not easy to recreate this in blueprints only so it also works on ARKit , but managed to work it out eventually after a lot of trial and error :smiley:

Here is the my surface mesh blueprint that works for ARKit and ARCore added to the default Handheld AR template:

https://www.filehosting.org/file/det…urfaceMesh.zip

It’s not 100% perfect but has faded edges like the google arcore material does it.

I added a custom function updatePlanes to the main AR pawn blueprint which loads a proceedural mesh blueprint. It is dynamically resized on tick.
It was good enough for my project and hopefully helps someone that also wanted to keep their project blueprints :slight_smile:

To put this in your own project:

  1. Migrate the asset: proceduralMesh_BP using the engine migrate function. It will copy the material and texture with it then
  2. Copy the updatePlanes function (located in BP_ARPawn) into your pawn and create all the required variables (just right mouse click on them and hit ‘create variable’)
  3. Call this function when required

PS: Someone that understands procedural meshes more could vastly improve that mesh creation logic I have in there I guess to better fit the area

Thank you so much for sharing this.

Tremendous! What a fantastic custom function you’ve built! Most grateful for this dude!!

The ARCore CloudARPin sample also provides a ARPlaneRenderer Actor class that convert ARPlaneGeometry to procedural mesh. It works on both iOS with ARKit and Android with ARCore.

You can check it out here: arcore-unreal-sdk/ARPlaneRenderer.h at master · google-ar/arcore-unreal-sdk · GitHub

Hi Bo,
Just did as you suggested, thanks for sharing. Looking forward to the new AR updates & samples coming up in 4.21, exiting time to be in AR!

Thanks for your contribution!! really useful!

Please can you post a screenshot of your blueprint as the download link isn’t working for me?

A big great THANK YOU from my side for sharing this :slight_smile:

… i wondered why all planes where drawing as horizontal planes…verticals where generated as horizontal planes, too.
I added the actor rotation to your UpdatePlanes-Function and now they are oriented correct for all…everything of your blueprint works really nice…great work.

that´s only my little drop to your hard work…

see:

Hi, can someone share the zip, as I’m in no way able to download it from the linke above. The strange site always tells me that email-provider is not supported !?

It’s normal if there is only some spot where the mesh applies on the floor? I’m using unreal 4.23.0 on IOS. It’s working well on Android as always.

Awesome stuff, thanks for posting this up it’s very helpful. I have a question for any of you all who can help me out, do any of you know of a way to stop the tracking after the BP_placeable actor is spawned?

Thanks in advance

@aussieburger Thanks for the project file !

Im currently facing an issue of the procedural mesh of it blinking out once it created.
The link below shows a short GIFs of what I meant by blinking out.

Was wondering is there anyone facing the same issue ?
I’m currently using UE4.23 and Xcode 11.

Thanks !

I am also experiencing this using an ipad pro, 4.24 and Xcode 11. Works fine on android devices though.

Have you found a solution yet?

Thank you for the project. Works fine so far on Unreal 25.1
BUT: I got the same issue DEDE_pig is describing.
I can only see the texture/procedural mesh in the first frame, after that it’s disappearing again. Check the gif from DEDE_pig to see the issue.

I try to debug this issue.
Seems like the map length is correct, but the mesh itself is not updating correctly again.
If I find any solution I will tell you guys.

I filed a bug report at this exact moment. I was trying to solve the issue as well, but had no luck. I’ve also tried the Runtime Mesh Component plugin from Koderz, because I thought maybe it’s just something broken with PMC. But no luck same result. I will let you guys know if there is an update on the issue from the bug report.
And also if you find the solution I would be more than happy to hear it :slight_smile:

Any luck with the mesh on iOS? I’m having the same problem currently.