AR Portal

All instruction came from week7

  • On Github, download zip of ARPortal and extract and add it on Unity hub
  • Downlaod Smoking Room, Texture, and shader on google drive and drag the smoking room on your 3D folder, texture on texture
  • On the folder of Sponza, you would have to create a new material of SmokingRoom and drag the texture on Albedo, which is in SmokingRoomMat’s Inspector
  • On Sponza folder, drag the Sponza to SmokingRoomMat, on that inspector, you should see Stencil Comp
  • On 3D folder, drag a SmokingRoom on the scene. Reset the position
  • On the sample scene, right click the SmokingRoom and unpack Prefab. After that, separate the default and delete SmokingRoom. Rename default to SmokingRoom
  • Enable the Portal on the Inspector and in the scene, drag the SmokingRoom object to a spot where the you’ll see Portal in front of the door. Increase size of the Smoking Room if it doesn’t fit by using the scale
  • Once completing that, drag the SmokingRoomMat’s material on SmokingRoom object in the scene
  • Open your Portal prefab in sample scene and drag the SmokingRoom inside the Portal prefab. Put it under PortalPlane.
  • In Sponza’s inspector, disable it. Doing that, you’ll see a castle inside the door.
  • For SmokingRoom on the sample scene, you would to drag that on Prefabs folder.
  • On the Portal’s Inspector that shows Portal Manager (script), you would replace Sponza to SmokingRoom by dragging SmokingRoom from the SampleScene
  • Save it on HelloAR’s scene
  • Disable Portal from the Inspector
  • In addition, take a screenshot of the castle once going inside put yourself on the screenshot by using photoshop