How to Upload Unity Scenes to Github With Other Unity Scenes in the Same Folder

CU VRAR Club logo

Simple Unity Vuforia Application

The repository contains a simple augmented reality application using Vuforia, built on the Unity Platform. This app, deployed on a laptop, will apply the webcamera and Vuforia unity parcel to recognize a selected epitome mark and project a 3D model higher up the marker on the screen.

GIF OF RECOGNIZING IMAGE

Please download and install all software and annals for Unity & Vuforia accounts before attending the event.

Table of content

  • Installation and Account Registration

  • Unity Project Setup

  • Vuforia AR Camera Prepare

  • Vuforia License Key

  • Vuforia Target Image Database

  • Target Image Database

    • Upload the page tree file
    • Go to the import view
    • Import the uploaded page tree file
  • Target Image Setup in Unity

  • Projected Virtual Object Setup

  • Playing the AR App

  • Bonus: Changing animations with Vocalization Control

  • License

  • Links

Installation and Business relationship Registration

Install the post-obit programs/packages and create accounts for Unity and Vuforia. Unity Personal Version is a complimentary beginner friendly development platform for 2D, 3D, VR and AR applications. Note: When installing Unity 5.half dozen, it volition default to a Unity binder in program files. If you have downloaded a previous version of Unity and want to keep it, rename the default folder name.

  • Unity five.six Installation
  • Unity ID Registration
  • Vuforia Account Registration
  • Vuforia Unity Package Download

Unity Projection Setup

Get-go open Unity 5.6 and create a new projection in binder location and projection proper name yous desire. Make sure that the Unity project is selected as 3D.

Saving Project Screenshot

Once Unity has opened, nosotros will import the Vuforia Unity Packet to permit of our Unity Augmented Reality awarding the ability to recognize images/3D models using the laptop camera, and rails and brandish virtual objects on this image. Import the Vuforia Unity Packet past navigating to Assets/Import Packages/Custom Packages at the elevation of the menu toolbar.

Import Package

Locate the Vuforia Unity Parcel downloaded earlier, and click open.

Import Package 2

An import unity bundle popup menu will appear asking which files should be imported. Click on all, then click import.

Import Package 3

Some other popup message volition ask you lot have backed upwardly your project. Go ahead and click that you have fabricated a re-create.

Vuforia AR Camera Set Upward

Once the Vuforia packet has been imported, the Assets/Vuforia binder will appear in the Project Binder located in the bottom panel of the Unity programme. This folder houses scripts and "Prefab" gameobjects of the Vuforia components that can be dragged into your Unity application to build an augmented reality app. The AR Camera Prefab will give Vuforia access to a camera feed (either laptop, camera, HMD head mount display) and recognized images or "markers" set up in your Vuforia account. Navigate to the Assets/Vuforia/Prefabs folder and elevate the ARCamera prefab into either the Hiearchy window or Scene Window.

AR Cam Setup

When the ARCamera prefab is dragged into your scene or hierarchy, the gameobject volition announced in the hiearchy window indicating that it is at present part of scene of your Unity application. Configure the Vuforia settings to connect with your Vuforia account by get-go selecting the ARCamera in the hiearchy window to view its components in the Inspector, and then clicking on the Open Vuforia Configuration button in the Vuforia Behaviour Component.

AR Cam Setup 2

After clicking Open Vuforia Configuration, the Inspector view will show the Vuforia Configuration file where you volition paste your Vuforia License Fundamental

AR Cam Setup 3

Vuforia License Key

Log into the Vuforia License Manager page with the Vuforia Account you created. Click on Add License Key to create a complimentary cardinal enabling your Unity application to use Vuforia'southward epitome recognition services upward to a specified limit.

Vuforia License Key

Select Projection Type: Development, create a name for the app, and click adjacent to proceed.

Vuforia License Key 2

The next folio will have the Vuforia license primal for your app, which can exist copied and pasted into Vuforia Configuration App License key text field in the Unity awarding.

Vuforia License Key 3

Vuforia Target Image Database

Go back to Vuforia License Director folio, click on Target Manager link, and click on Add Database push to gear up a prepare of images your AR app volition recognize. Provide a proper name for the database of images that will be recoginzed past the app and make certain Blazon:Devices is selected.

Vuforia Target Images Vuforia Target Images 2 Vuforia Target Images 3

When the database is created, click on the database link and click on Add Target Push button to start calculation the images to be recognized.

Vuforia Target Images 4

Vuforia tin recognize different types of targets ranging from 2nd images, 3D objects, and shapes. For reliable image recognition and tracking, Vuforia suggests chosing images and objects with the post-obit characteristics:

Aspect Example
Rich in detail Street-scene, group of people, collages and mixtures of items, or sport scenes
Good dissimilarity Has both bright and night regions, is well lit, and not dull in effulgence or color
No repetitive patterns Grassy field, the front of a modernistic house with identical windows, and other regular grids and patterns

Farther information and suggestions for improving prototype recognition and tracking stability tin be establish here.

For this sample app, nosotros will choose the following image. Download this image or re-create it from https://github.com/jkredzvr/Unity-Vuforia-Tutorial/hulk/master/Screenshots/VuforiaTargetImage.jpg, and upload it the target Image field.

Vuforia Target Images 4

For the width input, enter the actual width (in meters) of the object or image that volition be recogized. Since I will be press the image on an eight.5" x eleven" letter of the alphabet paper, I'll input 8.5" -> .259m.

Lastly requite the epitome target a unique name that will exist saved in the database, before clicking on the Add together Push button

Vuforia Target Images 5

Back on the Target Director page, the uploaded target will appear with a star rating indicating whether the target epitome will be reliably recognized and tracked by the Vuforia software. If you cull to upload your own 2D images or images of objects, upload several unlike images and make certain that you take at least 4-5 star ratings or reliable tracking. Experience costless to upload multiple different image targets if you want your app to recognize more than one epitome/object.

Vuforia Target Images 6

After uploading your prototype targets, click on the Download Database(All) button and select Unity Editor to download image database files into a Unity parcel.

Go back into the Unity program and navigate Assets/Import Packages/Custom Packages and select the downloaded Paradigm Database Unity Package.

Vuforia Target Images 7

Later on importing all the database image Unity parcel, the VuforiaConfiguration component should prove up with a checkbox to select a database to be loaded. Click on this choice, and click on Activate checkbox that appears next.

Vuforia Target Images 8

Setting upwards Target Image in Unity

With the Vuforia Configurations loaded with the image databse set in your Vuforia account, we'll set up a virtual scene for our objects to announced when an paradigm or object is recognized.

In Unity, navigate to the Assets/Vuforia/Prefabs folder and drag the ImageTarget prefab from the folder to the Hierachy View. The ImageTarget prefab acts as the recognized epitome/object target for where our virtual objects will be tracking its position. If a virtual objects above the ImageTarget, when laptop camera sees our bodily epitome or target in the real world, the AR app will place and rails our relative to where the ImageTarget is virtually...

Unity Target

Selecting the ImageTarget in the Hiearchy view, select the image database that was imported from the dropdown menu next to Database.

Unity Target 1

Setting Upwards a Virtual Object to exist projected

Now lets project a virtual object over the our prototype target when our app recognizes the target. Click on the Unity Nugget Store Tab and click on the Log In button. After logging in you lot will access to download free and paid assets from the Asset Shop that can be added into your application. Assets can range from 3D Models, environments, characters, textures, shaders, scripts and many other components used to build a game or application.

Virtual Asset

Nosotros volition be downloading the free Unity-Chan asset, which is a rigged 3D model with animations. In the search bar, search for Unity Chan and click on the "Unity-Chan" Model link.

Virtual Asset 1

Click on the Import Push button and expect for it be loaded into your project. A popup box will ask which files to import, which you volition click All, and Import.

Later on Unity-Chan import is complete, navigate to Assets/UnityChan/Prefabs folder and drag the unitychan prefab into the Hiearchy Window.

Virtual Asset 2

You will run across the UnityChan model standing higher up the imagetarget, and then when the app recognizes the target in the existent world, the UnityChan model volition announced how it is currently placed in Unity. Right now the epitome target was prepare to be a width of .259m (8.5"), and looking at UnityChan in the Unity program, she will be as well large to appear on the app screen. To remedy this we will calibration down the size of UnityChan.

First click and select UnityChan from the Hiearchy Window. In the inspector window, change the Transform: Scale x,y,z values to shrink UnityChan. I chose .1, but you tin select modify it to your liking.

Virtual Asset 3

The last pace for setting up our Virtual object, is to drag our object and set up it as a kid of the ImageTarget. This lets the Vuforia know what gameobject or virtual object should announced when a target epitome/object is recognized. To set UnityChan as a child to the ImageTarget, simply drag the UnityChan gameobject in the hiearchy, and drib it on elevation of ImageTarget. Information technology should be located below the Image Target as a child gameobject.

Virtual Asset 3

Playing the AR App

To test out your app, yous will need to print out the target image for the app to recognize. Click on the Play button above the scene view to start the app in Unity. If the default photographic camera is properly recognized by Vuforia, y'all should exist able to encounter the live camera feed in the Unity Gamemode screen. Hold upward the printed target image in front of the camera, and your AR app should recognize the target and generate the Virtual object (Unity-chan for this demo) where you take placed it in your scene.

You lot will also notice several buttons on the sides of the Unity Gamemode screen. Those are pre-fabricated buttons provided by the Unity-Chan object to cycle through Unity-Chan'southward different facial reactions and poses.

Virtual Asset 3

Voila! Now y'all accept a Unity AR scene that generates a virtual object on a recognizes a target image. Use this project as a base of operations and modify it to your needs by doing the following:

  • Changing the target images with your own images or models in Vuforia
  • Irresolute the virtual model and animations
  • Decision-making the virtual model'due south animation with button presses or recognized voice keywords
  • Having multiple recognized images/models that generate unlike interactie virtual objects
  • Deploying the Unity scene as an .exe or mobile app

Bonus

License

johnsonouteriesself02.blogspot.com

Source: https://github.com/jkredzvr/Unity-Vuforia-Tutorial

0 Response to "How to Upload Unity Scenes to Github With Other Unity Scenes in the Same Folder"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel