12th July, 2022

INTRODUCTION

Augmented reality is an interactive experience of a real-world environment where the objects that reside in the real world are enhanced by computer-generated graphics.

OBJECTIVE

Building environments with a high level of involvement and interaction is the goal of augmented reality in the project, allowing students to interact, design, change, experiment, and become much more actively involved in the learning process is the main objective.

ASSETS USED [REFERENCE]

Software: https://unity.com/download
AR sdk: https://developer.vuforia.com/downloads/SDK

13th July, 2022

I have gathered the resources that I will need for the project. 3D model assets (.stl,.obj,.fbf files). Additionally, we determined what object size will be appropriate and which won’t cause our project to crash. Later, using the software Blender, I tried to decrease the 3D models’ polygon count.

Steps I took to reduce the polygon counts : 

Step 1. Select all the objects/Mesh.

Step 2. Click on modifier and add “Decimate” Modifier.

Step 3. Adjust the slider according to our needs and then apply the modifier.

14th – 20th July, 2022

With the assistance of Mr. Prasad Patil sir, I tested a number of methods after gathering the required data for the project. We then decided on the workflow and the method of delivering the content through augmented reality.

 Working with Unity

The project’s primary goal was to do this. So, until it worked, I tried applying the project logic of the custom 3D shapes. I basically tried two approaches for moving my objects around and placing them into the scene.

1. Remove the object’s mesh, and then set the original mesh as the child. In this case, the colloidal object’s position is set to origin, and the script was written in a way that causes the child object to reset its position and move in the direction of the colloidal object [parent object] when the button is hit.

 

 

Video Demonstration [Trial]

Testing Script and logic on Custom shapes

Code

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace SecondProject
{
public class GameManager : MonoBehaviour
{

public float _disappearTime;
public int _counter;
public GameObject[] _cubes;
public Text[] _text;
private void Start()
{
_text[0].text = “”;
_text[1].text = “”;
_text[2].text = “”;

}

public void StartButton()
{
if (_counter > 0)
{
return;
}
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText1());
}

public void NextButton()
{
if (_counter == 1)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText2());

}
else if (_counter == 2)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 3)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 4)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 5)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 6)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 7)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 8)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 9)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 10)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 11)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 12)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 13)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 14)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 15)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 16)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 17)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 18)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 19)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 20)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 21)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 22)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}
else if (_counter == 23)
{
_counter++;
_cubes[_counter – 1].GetComponent().StartMove(_counter);
StartCoroutine(DisplayText3());
}

}

public void PreviousButton()
{
if (_counter < 1)
{
return;
}
_cubes[_counter – 1].GetComponent().ResetPos(_counter);
_counter–;

}

IEnumerator DisplayText1()
{
yield return new WaitForSeconds(1.2f);
_text[0].gameObject.SetActive(true);
_text[0].text = “hello “;
yield return new WaitForSeconds(_disappearTime);
_text[0].gameObject.SetActive(false);
}
IEnumerator DisplayText2()
{
yield return new WaitForSeconds(1.2f);
_text[1].text = “Object ” ;
yield return new WaitForSeconds(_disappearTime);
_text[1].text = “”;
}
IEnumerator DisplayText3()
{
yield return new WaitForSeconds(1.2f);
_text[2].gameObject.SetActive(true);
_text[2].text = “Object ” ;
yield return new WaitForSeconds(_disappearTime);
_text[2].text = “”;

}

}

}

Code Logic

  • First, we are using public variables to gain access to the objects. After that, when the button is pressed, an animation is played based on the index of “GameObject[]” that was accessed in the start method.

                      if (_counter > 0) {
                      return; }
                      _counter++;
                      _cubes[_counter – 1].GetComponent<MoveAnimation>().StartMove(_counter);

  • If the _counter value is 1 [i.e. 1-1 = 0] then the zeroth object will be activated and the animation will be played in our scene. Here, as the button is pressed, the counter increases and is stored in the _counter Variable. 
  • Additionally, the animation is played on counter increment in the “NextButton()” function.
  • The previous button uses the same logic as the next button, and finally, the wait functionality of the IEnumerator function is used to access the text’s visibility.
21st – 28th July, 2022

Developing Actual Content

The actual project required the use of augmented reality, so I added the AR capabilities of the Vuforia Engine, including the AR Camera, Plane Finder, and Ground Plane Stage. The device camera in this case received AR camera functionality, and the plane finder was used to locate the plane and alert the ground plane stage when it was discovered. The main scene, which included the UI, script, and 3D Model, was described as the parent of the ground plane stage.

This is how the “GameManager” script appears graphically. It contains a list that allows access to the “Grey water system’s” objects and components.The components were set up in the order of assembly according to the output needed. and there was the counter function, which was used to record button clicks in accordance with the code.

Every object had a link to an animator that added the necessary animation, and another script called “Move Animation” was used to number the objects in order of appearance. Additionally, the animator was granted access to the animator controller, which managed the animation upon button click.

There were two phases of animation for each object: empty and moving. The Move animation contained various positions animated for the object, while the Empty phase was for the object’s idle position. The object began out in position X=0.887, moved to position X=-325 and waited there for three seconds before coming to rest at X=-340.

30th – 31st July, 2022

Exhibition

On the anniversary of Dr. S. S. Kalbag’s passing, Vigyan Ashram hosted an open house exhibition. where I discussed my work on augmented reality. As they learned about the technology for the first time, everyone, including the students, was quite impressed. Thanks to an emphatically positive response, I was able to spread awareness of the Augmented Reality technology.

Exhibition Photos

Reviews From Guest/Visitor