◆VR AR/AR : 공부

AR: Recognize the floor with the main camera

진2_ 2024. 7. 26. 02:12
728x90
반응형

 


Add the AR Plane Manager to the AR Session Origin object to recognize the floor.

AR Plane Manager: A component that sets the object (vertical plane, horizontal plane, both) that the AR camera should recognize and specifies the game object to create on it.

 

Modify Detection Mode to Horizontal because we are going to create a floor recognition function.

 

 


To check if the floor detection works well, I will mark the floor with a translucent white object.

 

Create an empty object called Plan and align it to 0,0,0. Then add the Mesh Filter component and the Mesh Render component to show the face. Also add the Mesh Collider to detect collisions.

 

After that, adding the AR Plane Mesh Visualizer component automatically creates the AR Plane component as well.


AR Plan Mesh Visualizer: Create mesh based on the currently recognized floor area and shape.
AR Plan : The role of recognizing the floor from the screen taken by the device.

 

 

After that, create a translucent white material to create on the floor and put it in the Mesh Render.

 

 

Now prefab the Plan objects you have worked on so far and delete them from the hierarchy window

 

 

Register the prefab you just created in the AR Plane Manager - Plane Prepab entry of the AR Session Origin object for execution.

 

 

 

 

If you then build the project as an apk file and check it out, you will see that the floor is recognized as follows.

728x90
반응형