Virtual Library Project
Tonight I'm going to look into developing a library in a mixed reality environment using the HoloLens.
You can download the Demo files here.
or copy and paste this into your browser:
In the beginning there were walls!
So far this is what I have showing up in my scene when I run the app in Unity.
You can see the blue lines that are the walls for this demo. The goal here is to try and get my 3d objects to appear on the walls.
As you can see in the inspector that there are three elements that are space object prefabs.
We will replace these Elements with our 3d objects.
Click on the RocketPoster.obj in Element 1 and you will see that the placement surface is set to vertical changing this field will result in whether the 3d object is placed on the floor or wall surface plane.
Next I'm going to import my 3d object files by navigating to the location of my 3d object files and moving them to my assets folder.
Make sure the 3d objects pivot points are the same Unity this will be really important when having the assets appear in your mixed reality environment.
As you can see my Shelf.obj has a transform rotation of x:0, y:0, z:0. You can edit the original pivot values of the x,y and z but I would suggest opening up 3ds max and just adjusting the object and leaving the xyz values to zero.
Select the hierarchy tab and select Affect Object Only and then right click on the object and rotate it to whatever position you want it to be initially set. Keep in mind that whatever position this is the SpaceCollectionManager.cs is going to make this object face outward towards the user when it is placed against a wall or floor.
This is what it will look like after the changes have been made correctly.
Now lets add some books to the bookshelf and later we'll add animation once a book is selected.
We are going to follow the same steps this time we are going to create a prefab that has all of the 3d objects in it so we don't have to place all of them inside of the scene individually.
Once your prefab is completed it should look something like this. You can create a prefab or place the books in the scene individually.
Next lets go ahead and deploy this to the HoloLens to see if it deploys and runs correctly.
In my next tutorial we will go over animating a menu when selecting the bookshelf and the book opening up.
If you have any questions please contact me here.