How can I exclude the hole made by an open door from AR planes in Unity's AR Foundation?

Hi,

As the title suggests, I have a problem where, If I am inside of a room with a door to another room open, that is still identified as a wall, although, there is nothing there (see pictures below).

Is it possible to fix this issue? I’m deploying to an iPad pro with LiDAR so it should not be a problem with the depth. It also creates additional walls behind the wall segment covering the door hole, further proving that it “knows” there isn’t a wall there.


If you are able to check the classification of the plane, can you check if it is a door? It’s possible for ARFoundation to report planes with the classification of a “door”, and perhaps that is what you are seeing? Plane tracking | Apple ARKit XR Plugin | 6.0.1 (unity3d.com)

If not, ARFoundation is not in control of how planes are generated or chosen, as we’re polling ARKit (on the case of an ipad) for planes and we’re not in control of what planes are detected in this instance.

2 Likes

Hi WyattBUnity!
Thank you very much for your reply!

I have not checked whether I can use the labels, will try it out. Thanks! But will the whole wall be considered a door, then? Or just the part that’s covering the “door hole”? Could you please clarify?

Reading between the lines in your last paragraph, “ARFoundation is not in control of how planes are generated or chosen, as we’re polling ARKit […]”, it isn’t possible to manipulate the planes to not include for example, door frames and paintings? Given this, is there a method within Unity for modifying detected planes to exclude certain elements, like door frames or decorations? For example, could developing a plugin, perhaps for ARKit, help achieve this, or would such modifications be more effectively handled by working directly with ARKit on a native level?

Thanks yet again for your insights!

The only modification ARKit allows you to make to the plane detection algorithm is whether it should include horizontal or vertical planes. There is no mechanism to “pre-filter” planes from your app based on their classification. Therefore, AR Foundation cannot filter door planes out for you.

Another thing you might want to try is Meshing. Mesh detection will be more successful at identifying the shape of your room, including open doors.

1 Like

Hi again,
Sorry for the late reply. The classifiation did not work and it was not precise enough, I’ll try meshing via the ARMeshManager! By the looks of it, it seems I have more control but also doesn’t get as much help from ARFoundation as with ARPlaneManager.

Thank you very much!

1 Like