As an Associate of Unity Asset Store, this website earns from qualifying purchases & contains affiliate links: check the footer for more info.

AR Gallery (AR Foundation: ARKit/ARCore) — Unity Asset

AR Gallery (Unity Asset) — App Template in Augmented Reality that implements a Demo Gallery of AR Objects with real-time shadows (shader for transparent surfaces: works independently of AR).
AR Safety First.

Unity Asset Store — Download Button

Demo Gallery Template is an Excellent Starting Point to Create Apps and Games with Augmented Reality.


Package Contains

  • Complete Gallery Demo Scene with Tutorial, real Plane Detection, visual Plane Confirmation/Resetting, and Object Placing (Cubes) in a selected point on a detected plane:
    • Gallery: Selecting Target AR Object via Toggle Group System (UI is generated automatically based on AR Objects in the Scene):
      • Displaying Status Text: Show Name of AR Object on Activating.
      • Second Click on Toggle: Hide/Show AR Object.
    • Transform Control for AR Objects:
      • Scale & Rotation: with UI Sliders & “Reset” Buttons.
      • Position: Move Objects on Detected Plane with just a Finger.
    • Button “Show/Hide UI” (aka “Screenshot Mode”).
  • Menu Scene with AR Safety Tutorial.
  • Permission Scene with Camera Permission Request using free Native Camera.
  • Loading Screen to switch scenes seamlessly.

Check the Map of Unity Assets to choose the product that best suits your needs.

AR Features of Plane Detection Demo Project

Bring the enchanting Power of Augmented Reality into your amazing AR Game or App:

  • Real Plane Detection using AR Foundation Engine: ARKit, ARCore. AR Safety First.
  • AR Onboarding UX with Transparent Video Manuals & AR States.
  • AR Light Estimation: estimates light data in physical space and applies it to game space.
  • AR Safe Zone. The player needs to stay in the Safe Zone to avoid accidents during the game and continue the game itself! The player will be notified when leaving the Safe Zone.
  • For simplicity and flexibility, there is no using of XR Interaction Toolkit.
  • AR Foundation Support Checker allows assigning your own experience when AR is not supported (by default, it shows informational message and link to requirements).
  • Editor Testing with AR Foundation > XR Simulation.

AR Shadow Shader is a part of Unity Assets

Tutorial

This tutorial is relevant for AR Shadow Gallery 5.1+.
Tutorials for the previous versions can be found in the asset folder.

Getting started with AR Gallery

Folders & Files in the package by default:

  • Makaka Games,
  • XR.

Steps

If you have any issues with the first launch then just Reach Support with Invoice Number and Get Help.

If you read this tutorial from PDF, first check the latest docs online to get actual information.

  1. Create New Unity Project with Unity 2022.3.16 & “3D” Template.
  2. File > Build Settings > iOS/Android > Switch Platform.
  3. Next Packages must be manually installed with Git & Unity Package Manager:
    1. Native Camera 1.4.2.
  4. Download and import AR Shadow Gallery into Unity.
    1. Warning Windows:
      1. Click “Import” to overwrite the Project Settings with predefined ones.
      2. Click “Install/Upgrade” for Package Manager Dependencies.
      3. Click “No” when enabling the backends for the new input system.
  5. Next Packages are provided with Unity Package Manager, and they are already installed for this Asset by default. If packages are missing (Warning Window didn’t appear) then install them with Package Manager and advanced settings enabled: “Enable Pre-release Packages”:
    1. TextMesh Pro 3.0.6:
      1. Always Required: Window > TextMeshPro > Import TMP Essential Resources.
    2. AR Foundation 5.1.1;
    3. Apple ARKit XR Plugin 5.1.1;
    4. Google ARCore XR Plugin 5.1.1;
    5. Input System 1.7.0;
  6. Reopen Unity Project.
  7. Open Scene: Makaka Games > AR > AR Shadow Gallery > Scenes > Demo.
  8. Test in the Unity Editor with AR Foundation > XR Simulation using Navigation Controls or Build for Mobile.

Object Placing in AR

Simple Cubes are the Objects for Placing in AR by default. To set your own AR Game Objects in Unity Editor, place them under AR Objects On Confirmation game object as children instead of AR Objects by default in the same position on ARGround game object, keeping the hierarchy because the project is sensitive to it. Gallery Toggles will be generated automatically based on these AR Objects.

AR Safe Zone

The player needs to stay in the Safe Zone to avoid accidents during the game and continue the game itself! The player will be notified when leaving the Safe Zone.


Position & Form

By default, the Safe Zone is a Transparent Cube that can only be seen from the outside (that is, only when required to alert the player).

The Safe Zone is placed around the Player (AR Camera) on ARGround game object with a real approximate height of 2 meters and a real approximate width of 3.5 meters. It’s enough to place and observe your AR Objects from all sides. You can change the size of the Safe Zone by changing its scale.

Option: Every AR Experience is Unique, and you can also place the Safe Zone around the Placed Objects: just delete the function call which moves the Safe Zone to the Camera position:
Hierarchy View: $ > ARShadowGalleryControl.cs > arPlaneDetectionControl.MoveObjectXZLocalPosToCamera(AR Safe Zone).


Events

Reactions to Entering and Exiting the Safe Zone can be assigned in Hierarchy View:
XR Origin > Camera Offset > AR Camera > AR Player: AR Player Control.


AR Light Estimation

The mechanism estimates light data in physical space and applies it to game space depending on what is supported by a particular smartphone. All options are enabled by default:

  • Ambient Intensity,
  • Ambient Color,
  • Ambient Spherical Harmonics,
  • Main Light Direction,
  • Main Light Intensity.

On iOS, when AR Mode is not Face Tracking, then only Ambient Intensity and Ambient Color are supported.

You can turn it off in Hierarchy ViewXR Origin > Camera Offset > AR Camera: AR Camera Manager > Light Estimation. Control Script is attached to the Light game object.

AR Shadow Gallery - Unity Asset - Light Estimation

AR Shadow and Any AR Engine

AR Shadow Shader works independently and does not require a specific AR engine.

AR Camera Lite

For Example, you can transform your game scene into Augmented Reality in 4 minutes with AR Shadow Shader and AR Camera Lite (docs).


Vuforia Shadow

The next Video Demo shows the work of AR Shadow Shader with Vuforia AR Engine.


Testing

Test in the Unity Editor with AR Foundation > XR Simulation using Navigation Controls to imitate translational and rotational motions of smartphone: such way you can test the AR Safe Zone & observe AR Objects from all sides.

Use Fullscreen of Game View in Unity Editor while testing to get a seamless experience.

You can forcibly test the case when AR is Not Supported by checking the next flags in Hierarchy View on AR Foundation Support Checker:

  • Is Checked In Editor On Init;
  • Is AR Unsupported In Editor Test;
  • Is AR Unsupported Not In Editor Test.

Tested with Mobile Devices

  • iOS on iPhone XS Max.
  • Android on Samsung ‪Galaxy A71.

Support

First, read the latest docs online.
If it didn’t help, get the support.

Changelog

Check the current version of AR Shadow Gallery on Asset Store.
The latest versions will be added as soon as possible.

5.1 (AR Gallery Demo with Multiple AR Objects):

Features:

  • Gallery: Selecting Target AR Object via Toggle Group System (UI is generated automatically based on AR Objects in the Scene):
    • Displaying Status Text: Show Name of AR Object.
    • Second Click on Toggle: Hide/Show AR Object.
  • Transform Control for AR Objects (for flexibility, there is no using of XR Interaction Toolkit):
    • Scale & Rotation: with UI Sliders & “Reset” Buttons.
    • Position: Move Objects on Detected Plane with just a Finger.
  • Button “Show/Hide UI” (aka “Screenshot Mode”).

Improvements:

5.0:

Improvements:

3.1:

Improvements:

3.0 (Complete Template — Excellent Starting Point to Create AR Apps and Games):

Features:

  • AR Onboarding UX with Transparent Video Manuals & AR States;
  • AR Light Estimation: estimates light data in physical space and applies it to game space;
  • AR Safe Zone. The player needs to stay in the Safe Zone to avoid accidents during the game and continue the game itself! The player will be notified when leaving the Safe Zone;
  • AR Foundation Support Checker allows assigning your own experience when AR is not supported (by default, it shows informational message and link to requirements);
  • Editor Testing: “Spectator Mode” allows simulation of smartphone motion (translational (WASDQE keys) & rotational (Right Mouse Button));
  • Menu Scene with AR Safety Tutorial;
  • Start Tutorial after Plane Confirmation;
  • Using of Native Camera to check and request Camera Permission before the Demo Scene.

Improvements:

  • Unity 2021.1.20;
  • Plane Detection Tutorial: Loading Animation, Clearer Guidance;
  • Modern Standards of Project Settings (based on New Unity Project).

2.1:

2.0:

  • Unity 2021.1.

Russian Demo


Unity Assets

Support for Unity Assets

I am Andrey Sirota, Founder of Makaka Games and full-time Publisher on the Unity Asset Store. First, read the latest docs online. If it didn’t help, get the support.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

Back to top button