x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Delete or clear tracked geometry and images when using ARKIT?

Is there a way to delete the tracked geometry and tracked images?

I'm using an augmented image as a trigger for another object being placed somewhere else in the scene and I need to be able to restart the whole process without closing the app. Stop AR Session doesn't seem to clear the tracked planes because when I start the AR session again it immediately has the previously detected planes, and the image as well, causing my object to be created before the user has actually looked at it.

What is the best way to flush out the current ARKit tracked data and force it to begin again?

Product Version: UE 4.20
Tags:
more ▼

asked Sep 07 '18 at 10:00 AM in Blueprint Scripting

avatar image

PfazFWC
26 2 4 9

avatar image BladeMaster Oct 23 '18 at 07:43 PM

Were you able to figure this out?

avatar image zukun_jon Oct 24 '18 at 05:00 AM

Not OP, but what I ended up doing is spawning a blueprint actor that I can find via a line trace (since you can't use an AR line trace to find tracked images) as soon as the image is recognized, and then run the trigger once a line trace grabs that item successfully. For my purposes running the check fairly infrequently is fine, so every half second I first line trace for any "trigger" blueprints that have been spawned, and then I check if there are any new images in the list of tracked geometry and spawn trigger blueprints for those images. Waiting a half second gives the system a little time to correct the location of the AR image and fix jitter if needed before running the trigger.

avatar image BladeMaster Oct 24 '18 at 09:23 PM

Okay! Thanks for the info!

avatar image jstantonsmith Dec 12 '18 at 06:38 AM

Did anyone solve this? I am trying to create an AR book and need the spawned geometry to disappear when the tracked image is no longer visible.

avatar image PfazFWC Dec 12 '18 at 03:22 PM

I've not found a solution to this yet. However in 4.21.1 the Image only session type now works and I think this would mitigate my need to purge the tracked data. It doesn't answer my previous question but it is an option that may work for your book project.

avatar image seraniz 3 days ago

You could do a "Line Trace Tracked Objects" per frame and see if any of the trace results match your tracked images, instead of querying whether or not something is in the list of tracked geometry? At least that's what I'm attempting to do right now, since I ran into a similar problem. https://cleanmaster.me/ ,https://www.oovoo.com/adam4adam/, https://mathway.vip/

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

So, this isn't an answer to my question but it is a method to get around it.

At the start of an AR session create and array of the current tracked geometries. Each tick, or however often you are running your updates, compare that array to the current list of all geometries. Those that aren't in that array are new so add them to a second array. Then do your position checks or whatever you need to do from that new array, not from Get all AR Geometries.

Now the only way this works is if you update that existing geometries array. For me I just stop the AR session, reopen my level and start the session again. I think stopping the session is required for it to recognise image as a "new" geometry for it to track, while the previous iteration of that image is now in the ignored list. If you can't just reopen your map you may need a more creative solution for deciding which tracked elements get put into your ignore list and when they are added.

Hopefully this helps someone else. I was maybe just being lazy about how I was using the Image detection system haha

alt text

ar-image-fix.jpg (652.0 kB)
more ▼

answered Jan 16 '19 at 09:23 PM

avatar image

PfazFWC
26 2 4 9

(comments are locked)
10|2000 characters needed characters left

You could do a "Line Trace Tracked Objects" per frame and see if any of the trace results match your tracked images, instead of querying whether or not something is in the list of tracked geometry? At least that's what I'm attempting to do right now, since I ran into a similar problem.

EDIT: It seems like Line tracing for tracked objects does not return images at this time, only normal tracked planes unfortunately.

more ▼

answered Oct 03 '18 at 05:27 AM

avatar image

zukun_jon
6 1 2

avatar image PfazFWC Jan 16 '19 at 01:39 PM

I've still not found a solution to this issue. Stopping and starting the AR session seems to clear the detected planes but the images seem to still exist in some form. I've still not found a way to clear this image cache

This is in 4.21 now

avatar image jstantonsmith Jan 16 '19 at 01:58 PM

Same boat. Unfortunately had to move the project over to Unity. There is still too much lacking/not completely implemented for us to use it for development. It is unfortunate since all of our VR work is done in Unreal. Can't wait for them to get it sorted!

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question