Video Playback with Image Tracking

Learn to play videos on static images in AR using image tracking with AR Foundation.

We will explore how to play a video upon image (or markerA marker refers to a specific physical object, pattern, or image that an AR system uses to trigger the display of digital content or information in the real world. When the AR device’s camera detects this marker, it calculates its position and orientation to accurately overlay and anchor digital objects or animations in relation to the marker in the user’s view. Markers are crucial for creating interactive AR experiences because they provide a reference point for integrating virtual content with the physical environment, making it possible to spawn AR components, such as 3D models or information overlays, precisely where the marker is located.) detection by our device.

Scene setup

Given below are the steps to set up a quick scene:

  • Duplicate the “ARImageTracking” scene from the previous lesson and rename it to “ARVideoPlayback.”

  • Clean up the “Hierarchy” window by removing the Lean Touch component.

These steps will provide us with the necessary GameObjects in the scene to start with.

AR Tracked Image Manager configuration

Given below are the steps to configure AR Tracked Image Manager:

  1. Select the “AR Session Origin” GameObject in the “Hierarchy” window.

  2. Reset the AR Tracked Image Manager component by clicking the three dots and selecting “Reset.” This action removes the previous bindings for AR image tracking.

  3. Create a new Reference Image Library file in the “Reference Image” folder by right-clicking and selecting “Create” > “XR” > “Reference Image Library.” Rename the file as Video_ReferenceImageLibrary.

Get hands-on with 1200+ tech skills courses.