Second Assignment

 

This week was about making the second assignment, a Markerless AR application. We decided to create a portal in which the user can enter and be “transported” into a different location. As described in the last weeks post, we proposed 2 themes, a museum, or a hospital. We decided to go with the museum idea, as it seemed more fun. With the theme established, we had to think about what we would do with the location, not to feel too empty. We decided to show the chronological progress of what warriors wore, from ancient times to modern days.

The first thing was to look for some assets for the location and for the warriors. We found some good assets and then created the AR application. The technology used was AR Foundation with ARCore. First thing was to setup the packages and set the build for android. We then created the ARSession and ARSession Origin objects. As for plane detection, we followed the official documentation, and created the AR Plane Manager and assigned an AR Plane to it. Unfortunately, we had problems with the detection when running the application on our android phones. The detection was working very poorly, not detecting the planes correctly, having random planes floating around the screen or even stuck to the edge of the screen when turning the camera.

For the portal, we followed parts of this tutorial, especially the masking of the room: https://www.youtube.com/watch?v=g78hQB8UKEM&list=PLPCqNOwwN794Gz5fzUSi1p4OqLU0HTmvn

For the functionality of placing the portal on a tracked plane, we used the script from the slides.

To make the room visible only through the portal, we had to use several shaders. While following the tutorial we saw that the asset we initially had for the museum was not working with the shaders provided, so we used the same asset as in the video. Each material of the museum asset was assigned the shader. We also had to create a plane, that sits directly on the door, which has another shader assigned to it. That shader enables the visibility of the room behind it.

Without any shaders

The last problem was that when you enter the portal and get past that plane, you are no longer able to see the museum. That is because the museum is normally invisible and can only be seen through the portal plane. To fix this, a collider is set on the camera and on the plane. When the camera comes close enough to the portal, then the shader is deactivated, and the museum can be seen normally.


    The final version of the project does not have video, because we had some issues with it. Instead of video, we made the gifs presented below:

With shaders and colliders
With shaders, without colliders










Video Presentation: https://www.youtube.com/watch?v=88jNVCQKtDs

Github repository: https://github.com/AlexJurj12/XRDSecondAssignment

Author: Alexandru Jurj

Comments