Display image slideshow on an image target using vuforia

Augmented Reality has reduced the space between imaginary and real world. In this tutorial you will learn to Display Image Slideshow on an Image Target. The video below will help you for better understanding of this blog.

For better understanding make sure to read the previous blogs i.e. DISPLAY 3D MODEL ON IMAGE TARGET USING VUFORIA IN UNITY3D and DISPLAY IMAGE ON AN IMAGE TARGET OR MARKER USING VUFORIA .

Create a new unity project:

In augmented reality creating a new unity project requires some of the things to be done. For creating a new unity project you need to write project name and then click on create project.

creating new database in unity

Adding new image:

For adding a new image target you need to go to vuforia engine. After going to vuforia engine click on image and re position it. Now go to vuforia portal. For opening vuforia developer portal make sure that you are sign in. Click on develop and after that go to click on target manager. For adding the target click on single image. Now choose the image by clicking on the browse button, then add certain width and rename it. Then click on add.

Adding target

Scene Setting:

Now we have to set scene for augmented reality. For that you have to delete main camera and add AR camera and image. As you can see this warning sign, go to build settings then go to player settings. Go to the bottom click on XR settings and check the vuforia augmented reality.

Warning sign during scene setting

Downloading the database:

Now download that data base. Click on unity editor then click on download. When it is downloaded drag it to the unity timeline put it in assets. Make sure that all the items are selected and click on import. Go to image target and select your database. Now you can see your image has loaded.

Downloading Database

Making Buttons:

Right click on an image target and click on create empty. Now right click on game object then go to UI and select Canvas. Right click on canvas go to UI and then click on image. Now right click on image, go to UI and then click on buttons. We need two buttons one for next and one for previous. There fore, we will right click on image and go to UI . Then, click on button for the second button. We need two buttons one for next and one for previous. Therefore, we will again right click on image, go to UI and then click on button.

Changing positions:

Now go to canvas and change the render mode to world space. Drag AR camera to the event camera and change the positions of x, y and z axis to 0. We need to reduce its width and height. Now click on left, top, pos Z, right and bottom as 0. Now go to button and reduce its height.

Settings positions of image

We want one button on right and one button on left. So clicking on button and we want it on the right. Now click on right and set its Rect Transformation as 0. Now we need to do the same procedure with the second button. We will reduce the height and width of second button and then we will click on left because we want to show it on the left side. That’s why we will click on left and set its Rect Transformation as 0. Now go to canvas and rotate its x axis as 90 degrees and it is fix on the image. Go to image and delete this component (named as image script) and add a component Sprite Renderer.

Settings rotation

Dragging images:

In order to display images we need to put them in resources folder.Now we will drag the images into the resources folder. We will drag the images into the resources folder. Now select these images . Go to default in Texture Type then click on sprite (2D and UI).

Dragging images

Importing Script:

Now we are going to import a script. You can download the script from here. After downloading script in unity and import it in assets and then open it.

Importing Script

You have to right the name of images in new string. We are naming and adding only three images. If you want to show more images you can just add them in the same pattern.

Naming Buttons:

Now going back to unity. Go to assets folder and dragging the script on in image. Now naming the one button as “next” and naming the second button as ” previous”. Dragging the next and previous buttons in slideshow (script). Now importing the arrow image to design next and previous button. in assets.

Display image slideshow on an image target:

Click the texture type and select sprite( 2D and UI) and click apply. Now select both buttons and drag them to the source image and check the preserve aspect. Now we have to rotate this button, click on the next button. Change the z axis in rotation as 180. Now extend the next and previous button and delete the text. We need to drag the first image which we want to display on sprite. Click on image and change the scale of x, y and z axis as 2.

Now move this button close to the image and also move second button close to the image. By clicking the next button we want to show the next image. So click on next button. Click on + in on click and drag image in on click. Now click on no function, then go to slide show and click on next (). For previous button click on no function, then go to slideshow and click on prev(). Now we don’t want to show this previous button on the first image. So, click on previous button and uncheck it.

image slideshow

Export Application:

From top menu click on file, then click on build settings. Check the platform is android if not switch it. And then click on add open scenes. Now click on player settings. Go to other settings. Change the package name according to your choice. Unchecked x86 and Android TV compatibility. Change the stripping level to low. Click on XR settings and make sure vuforia augmented reality is selected. And then you can insert the icon of your app. That’s all for settings now connect your android mobile with your computer and click on build and run. Now name it and save it.

Read More
CEO October 29, 2019 0 Comments

display YOUTUBE Video on an image target using vuforia

Augmented Reality has minimizes the distances of imaginary and real world. In this tutorial you will learn to Display YouTube Video on an image target. The video below will help you for better understanding of this blog.

For better understanding make sure to read the previous blogs i.e. DISPLAY 3D MODEL ON IMAGE TARGET USING VUFORIA IN UNITY3D and DISPLAY VIDEO ON AN IMAGE TARGET USING VUFORIA IN UNITY 3D.

Create a new unity project:

In augmented reality creating a new unity project requires some of the things to be done. For creating a new unity project you need to write project name and then click on create project.

create a new unity project

Adding new image:

For adding a new image target you need to go to vuforia engine. After going to vuforia engine click on image and re position it. Now go to vuforia portal. For opening vuforia developer portal make sure that you are sign in. Click on develop and after that go to click on target manager. For adding the target click on single image. Now choose the image by clicking on the browse button, then add certain width and rename it. Then click on add.

Adding target

Scene Setting:

Now we have to set scene for augmented reality. For that you have to delete main camera and add AR camera and image. As you can see this warning sign, go to build settings then go to player settings. Go to the bottom click on XR settings and check the vuforia augmented reality.

Warning sign during scene setting

Downloading the database:

Now download that data base. Click on unity editor then click on download. When it is downloaded drag it to the unity timeline put it in assets. Make sure that all the items are selected and click on import. Go to image target and select your database. Now you can see your image has loaded.

Downloading Database

YouTube video plugin:

Now what we have to do is to display YouTube video on an image target. For that we need a YouTube video plugin. The link of YouTube video plugin is available here. You can buy YouTube video plugin from it.

Importing the YouTube video plugin:

Drag the YouTube video plugin in unity and import it. Now click on console and click on clear. You can see an error here and double click on it.

error

Change the “LOW” word into “STANDARD”. Now press Ctrl S to save. We need to go back to unity. Now in Assets. Click on the plugin folder “Light Shaft” and go to resources.

changing LOW word into STANDARDS

In the resources go to prefabs and then click on YouTube player. Now crop it in image target.

Settings positions and rotations:

We need to set its positions and rotations. All x,y and z axis are set as 0 in the rotations and positions. Now click in YouTube player and then click on Video Render Area and make the positions x,y and z axis as 0.

YouTube video Render Area
settings positions and rotations

Go to Canvas and make the rotations x,y and z axis as 0. We need to set the positions of Y axis as 0.01 in YouTube player.

positioning y axis as 0.01

Now we need to rotate it also. Set the y axis of rotation as 180. You can set it according to your choice as well. Now paste a YouTube URL that you want to display on an image target in the YouTube player URL.

Scanning the image target:

Now the thing is when we will scan the image target video will start playing but when the target is lost video will not stop. Video will continue playing in the background. Thus, we will continue listening to the sounds of the video. So, in order to avoid that we need to code few lines. So, go to create and click on C# script and name it as track able event handler. Open this file by double clicking on it.

Coding of track able event handler:

The code of this track able event handler file is totally same as to the default track able event handler file that is attached to our image target. We will open this file. We only have to do few minor changing in code. Press Ctrl A and then Ctrl C and paste it to the track able event handler file.

Now in the track able event handler file delete the default placed code and press Ctrl V to paste the default track able event handler code in this file. Coding of track able event handler:heck the name of the file which is track able event handler file and give the same name to the class.

Adding unity engine event:

So, basically what we have to change in this file is that we are going to add unity engine event. So, we will be using codes as:

using Unity Engine. Events;

Declaring public variables:

We need to declare two public variables onTrack and onLost.

public UnityEvent onTrack;

public UnityEvent onLost;

Unity events
Declaring unity events

The event onTrack needs to be called when tracking is found. So, here we will write

onTrack.Invoke();

The second unity event onLost needs to be called when tracker is lost. So, here we will write

onLost.Invoke();

Adding track able event handler:

Now in image target we have to declare this delete this default track able event handler and add the track able event handler . Now in these events click on + in onTrack () and drop in the youtube player here. Click on + in on Lost in the YouTube player here.

Selecting functions:

Select YouTube player from the drop down and select play () function. Select YouTube player from the drop down and select pause() or stop() function according to your choice.

YouTube player

Export Application:

From top menu click on file, then click on build settings. Check the platform is android if not switch it. And then click on add open scenes. Now click on player settings. Go to other settings. Change the package name according to your choice. Unchecked x86 and Android TV compatibility. Change the stripping level to low. Click on XR settings and make sure vuforia augmented reality is selected. And then you can insert the icon of your app. That’s all for settings now connect your android mobile with your computer and click on build and run. Now name it and save it.

Read More
CEO October 20, 2019 0 Comments

display text on an image target using vuforia in unity 3d

Augmenting digital and real life together augmented reality is used. In this tutorial you will learn to display text on an image target or marker using vuforia in unity 3D. The video below will help you for better understanding of this blog.

For better understanding make sure to read the previous blogs i.e. DISPLAY 3D MODEL ON IMAGE TARGET USING VUFORIA IN UNITY3D , and DISPLAY IMAGE ON AN IMAGE TARGET OR MARKER USING VUFORIA.

Create a new unity project:

In augmented reality creating a new unity project requires some of the things to be done. For creating a new unity project you need to write project name and then click on create project.

Creating database

Adding new image:

For adding a new image target you need to go to vuforia engine. After going to vuforia engine click on image and re position it. Now go to vuforia portal. For opening vuforia developer portal make sure that you are sign in. Click on develop and after that go to click on target manager. For adding the target click on single image. Now choose the image by clicking on the browse button, then add certain width and rename it. Then click on add.

Adding target

Scene Setting:

Now we have to set scene for augmented reality. For that you have to delete main camera and add AR camera and image. As you can see this warning sign, go to build settings then go to player settings. Go to the bottom click on XR settings and check the vuforia augmented reality.

Warning sign during scene setting

Downloading the database:

Now download that data base. Click on unity editor then click on download. When it is downloaded drag it to the unity timeline put it in assets. Make sure that all the items are selected and click on import. Go to image target and select your database. Now you can see your image has loaded.

Downloading Database

Adding text on an image target:

Now we need to drag the downloaded in unity. Click on import and go to the image target and name it. Make sure that your image target is selected. Now right click on the image target and go to 3D object select 3D text.

selecting 3D object

Now, I am scaling it as 0.005 with x, y and z axis. Same scale size with all the three axis. Now you can see that Arial font is selected and we can not do changes with Arial. So, we have to select another text. So, go to format. I am selecting Source Sanserif font.

font selection
choosing the font-text

Click on selected font and give it 300 font size and change the character to Unicode and click on apply.

Font size

Now click on apply and then go to New text and add text of your choice and rotate it 90 degrees. After rotating positioning the text.

Positioning the text

Export Application :

From top menu click on file, then click on build settings. Check the platform is android if not switch it. And then click on add open scenes. Now click on player settings. Go to other settings. Change the package name according to your choice. Unchecked x86 and Android TV compatibility. Change the stripping level to low. Click on XR settings and make sure vuforia augmented reality is selected. And then you can insert the icon of your app. That’s all for settings now connect your android mobile with your computer and click on build and run. Now name it and save it.

Purdue Pharma ratkaisee alustavasti tuhansia opioiditapauksia (julkaistu 2019) before and after steroids oxycontin maker purdue pharma hakee konkurssiin 2 000 oikeusjutun poistamiseksi

Read More
CEO October 12, 2019 0 Comments

play audio on an image target using vuforia in unity 3d

In real world to augment virtual objects augmented reality is used. In this tutorial you will learn to Play audio on an image target using vuforia in unity 3D. The video below will help you for better understanding of this blog.

For better understanding make sure to read the previous blogs i.e. DISPLAY 3D MODEL ON IMAGE TARGET USING VUFORIA IN UNITY3D ,DISPLAY IMAGE ON AN IMAGE TARGET OR MARKER USING VUFORIA and DISPLAY VIDEO ON AN IMAGE TARGET OR MARKER USING VUFORIA IN UNITY 3D.

Create a new unity project:

In augmented reality creating a new unity project requires some of the things to be done. For creating a new unity project you need to write project name and then click on create project.

Creating database

Adding new image:

For adding a new image target you need to go to vuforia engine. After going to vuforia engine click on image and re position it. Now go to vuforia portal. For opening vuforia developer portal make sure that you are sign in. Click on develop and after that go to click on target manager. For adding the target click on single image. Now choose the image by clicking on the browse button, then add certain width and rename it. Then click on add.

Adding target

Scene Setting:

Now we have to set scene for augmented reality. For that you have to delete main camera and add AR camera and image. As you can see this warning sign, go to build settings then go to player settings. Go to the bottom click on XR settings and check the vuforia augmented reality.

Warning sign during scene setting

Downloading the database:

Now download that data base. Click on unity editor then click on download. When it is downloaded drag it to the unity timeline put it in assets. Make sure that all the items are selected and click on import. Go to image target and select your database. Now you can see your image has loaded.

Downloading Database

Importing the audio clip:

Now as we want to play audio on an image target. Go to audio and then audio source. Let’s import it in unity first and drag this into the audio clip section.

Audio
clip  importing

Playing the audio:

We want to play the audio only when the image target is visible. So unchecked the play on awake. If you want to loop the audio means you want to play the audio again and again when it ends. So, check the loop checkbox. We want to play audio only when the target image is found and we want to stop the audio when the image target is lost.

Coding of track able event handler:

The code of this track able event handler file is totally same as to the default track able event handler file that is attached to our image target. We will open this file. We only have to do few minor changing in code. Press Ctrl A and then Ctrl C and paste it to the track able event handler file.

Now in the track able event handler file delete the default placed code and press Ctrl V to paste the default track able event handler code in this file. Coding of track able event handler:heck the name of the file which is track able event handler file and give the same name to the class.

Adding unity engine event:

So, basically what we have to change in this file is that we are going to add unity engine event. So, we will be using codes as:

using Unity Engine. Events;

Declaring public variables:

We need to declare two public variables onTrack and onLost.

public UnityEvent onTrack;

public UnityEvent onLost;

Unity events
Declaring unity events

The event onTrack needs to be called when tracking is found. So, here we will write

onTrack.Invoke();

The second unity event onLost needs to be called when tracker is lost. So, here we will write

onLost.Invoke();

Play, stop and pause audio:

Save the file. Now attach this code to the image target and delete the default attached component. After that you will see the two events which are the public events that we have initialized onTrack and onLost. Click on the + icon in onTrack event. Here onTrack event drag the audio source. OnTrack we want to play the audio, audio source.play() and onLost repeat the same steps. Drag the audio source and go to audio source.pause() or audio source.stop().

Adding audio in unity

Export Application :

From top menu click on file, then click on build settings. Check the platform is android if not switch it. And then click on add open scenes. Now click on player settings. Go to other settings. Change the package name according to your choice. Unchecked x86 and Android TV compatibility. Change the stripping level to low. Click on XR settings and make sure vuforia augmented reality is selected. And then you can insert the icon of your app. That’s all for settings now connect your android mobile with your computer and click on build and run. Now name it and save it.

Eating for the Bodybuilding Physique of the 70s anavar pills review old school bodybuilding workout | old school labs

Read More
CEO October 9, 2019 0 Comments

Display Video on an image target using VUFORIA in unity 3d

Augmented Reality leads us to the combined path of digital and the virtual world. In this tutorial you will learn to Display Video on an image target. The video below will help you for better understanding of this blog.

Unisex fitness and bodybuilding wiggle.com swimming magnum clen 40 bodybuilding room in matoury, professional high school de balata – (guyana).
Augmented Reality : how to Display Video on an image target or marker using vuforia in unity 3d

For better understanding make sure to read the previous blogs i.e. DISPLAY 3D MODEL ON IMAGE TARGET USING VUFORIA IN UNITY3D and DISPLAY IMAGE ON AN IMAGE TARGET OR MARKER USING VUFORIA .

Create a new unity project:

In augmented reality creating a new unity project requires some of the things to be done. For creating a new unity project you need to write project name and then click on create project.

creating new database in unity

Adding new image:

For adding a new image target you need to go to vuforia engine. After going to vuforia engine click on image and re position it. Now go to vuforia portal. For opening vuforia developer portal make sure that you are sign in. Click on develop and after that go to click on target manager. For adding the target click on single image. Now choose the image by clicking on the browse button, then add certain width and rename it. Then click on add.

Adding image in vuforia

Scene Setting:

Now we have to set scene for augmented reality. For that you have to delete main camera and add AR camera and image. As you can see this warning sign, go to build settings then go to player settings. Go to the bottom click on XR settings and check the vuforia augmented reality.

Warning sign during scene setting

Downloading the database:

Now download that data base. Click on unity editor then click on download. When it is downloaded drag it to the unity timeline put it in assets. Make sure that all the items are selected and click on import. Go to image target and select your database. Now you can see your image has loaded.

Downloading the database and dragging it to unity

Display video on an image target:

So, we will go to our target then click on 3D object and move to plane. After clicking on plane resize it to fit on image target.

Adding video player:

Our next step is to add video player on this plane object. We need to go to add component then click on it and after clicking on it type video player on it. then go to video player by clicking on it. Lets import a video clip, now for importing video clip drag video clip into the unity. After dragging click on plane and then go to video player. Drag the video into the video player. Now unchecked the play on awake. We don’t want to play the video as play on awake because we want to play it only when the target image is visible through camera. If you want to make the video loop you can select loop other wise unchecked loop. In case of loop its totally your choice whether you select loop or does not select loop it doesn’t matter.

Adding video player into image target

Scanning the image target:

Now the thing is when we will scan the image target video will start playing but when the target is lost video will not stop. Video will continue playing in the background. Thus, we will continue listening to the sounds of the video. So, in order to avoid that we need to code few lines. So, go to create and click on C# script and name it as track able event handler. Open this file by double clicking on it.

Coding of track able event handler:

The code of this track able event handler file is totally same as to the default track able event handler file that is attached to our image target. We will open this file. We only have to do few minor changing in code. Press Ctrl A and then Ctrl C and paste it to the track able event handler file.

Now in the track able event handler file delete the default placed code and press Ctrl V to paste the default track able event handler code in this file. Coding of track able event handler:heck the name of the file which is track able event handler file and give the same name to the class.

Adding unity engine event:

So, basically what we have to change in this file is that we are going to add unity engine event. So, we will be using codes as:

using Unity Engine. Events;

Declaring public variables:

We need to declare two public variables onTrack and onLost.

public UnityEvent onTrack;

public UnityEvent onLost;

Unity events
Declaring unity events

The event onTrack needs to be called when tracking is found. So, here we will write

onTrack.Invoke();

The second unity event onLost needs to be called when tracker is lost. So, here we will write

onLost.Invoke();

Play, stop and pause video:

Save the file. Now attach this code to the image target and delete the default attached component. After that you will see the two events which are the public events that we have initialized onTrack and onLost. Click on the + icon in onTrack event. Now drop the plane game object. Click on the function and go to video player and select Play() as we want to play video when target is found. No drop the plane game object. Click on the function and go to video player and select Pause() or Stop(). As we want to pause or stop video when target is lost.

Adding video in unity

Export Application:

From top menu click on file, then click on build settings. Check the platform is android if not switch it. And then click on add open scenes. Now click on player settings. Go to other settings. Change the package name according to your choice. Unchecked x86 and Android TV compatibility. Change the stripping level to low. Click on XR settings and make sure vuforia augmented reality is selected. And then you can insert the icon of your app. That’s all for settings now connect your android mobile with your computer and click on build and run. Now name it and save it.

Read More
CEO October 2, 2019 0 Comments