Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Converting Unity 5– Destroyed City FREE by PROFi DEVELOPERS to HoloLens

Jimbohalo10Jimbohalo10 ✭✭✭
edited April 2016 in Discussion

Converting Unity 5– Destroyed City FREE by PROFi DEVELOPERS to HoloLens
The audience to this is Visual Studio Developers with little or no experience in Unity 5.4.
This Project has been chosen to be easy to convert, because it was already originally targeted to Direct X11.

Using Unity HoloLens 5.4.0b10-HTP (64-bit) Open Unity Click 3D, New, then enter Destroyed City as the Project name. Set your path to your Unity Development area.

Using the Asset Store icon, above the Scene area, Open search bar and enter Destroyed City FREE and Search. Selected the project and click the Import button.
During the Import there will be numerous warning and informational messages, requiring you to click “Update”, “Accept”, “Continue”, “I have a backup, go ahead”.
When the import is completed, the yellow warning messages “UnityEngine.GL.SetRevertBackfacing(bool)' is obsolete:” appear ignore these.

Go to Project on the bottom area and double click on Assets.
In the Assets area double click on the Asset “Destroyed City FREE”.
The reveals more Assets, double-click on “Scenes”, double-click on the Unity icon “destroyed city. unity”. This updates the populates the scene area Hierarchy with the new items.

This is a good time to see the imported project running in Unity 5.4, Click the “Play” button at the top of scene. Press the keyboard arrow keys to move for around the display. This works well using NVidia GT750 TE 2GB video card.
Click the Play button again stop and return and continue to the build.

Now in Unity 5.4, click on the File menu, Select “Build Settings”.
Select Windows Store in the left pane, Click Switch Platform.
Select SDK as “Universal 10”
Select UWP build type “XAML”
Select Unity C# Projects (tick)
Select Development build (tick)
Click “Build”. A Windows Explorer Windows opens.
Right click white space and select “New”->” Folder”, enter the name UWP.
Select the folder UWP click Open.
The build will start and fail with errors, ignore these.
A Windows Explorer Windows opens.
Click back to Unity 5.4 and in File menu and click Save Project and Save Scene.

Click back to the open Windows Explorer, double-click on “Destroyed City”. Visual Studio Solution. Visual Studio 2015 Community Update 2, Release Install date 30th March 2016 should open, if installed correctly.

Look at how the Solution settings are wrong for HoloLens. They are Windows 8 target; they will compile but won’t run!
Now we will correct this easily.
File-> Exit Visual Studio, don’t save just exit.
Go to Unity 5.4 and File -> Exit.

Start “Unity HoloLens 5.4.0b10-HTP (64-bit)”. This time select the project “Destroyed City”. When this opens the default build will be Windows Store and this time Unity will create a Universal Windows Project, because that’s the default setting for this project.
Go to File -> Build
Now click on the File menu, Select “Build Settings”.
Select Windows Store in the left pane, Click Switch Platform.
Select SDK as “Universal 10”
Select UWP build type “XAML”
Select Unity C# Projects (tick)
Select Development build (tick)
Click “Build”. A Windows Explorer Windows opens.
Right click white space and select “New”->” Folder”, enter the name “App”.
Select the folder “App” click Open.
The build will take place with same warning, but there should not be any red errors.
A Windows Explorer Windows opens.

Click back to the open Windows Explorer, double-click on “Destroyed City”. Visual Studio Solution. Visual Studio 2015 Community Update 2, Release Install date 30th March 2016 should open, if installed correctly.

Look at Solution Explorer and you will see “Destroyed City (Universal Windows)”.This means that the HoloLens Emulator is available.
Set Solution Configuration to Debug, Solution Platform to X86. Select HoloLens Emulator as your Remote Target.
Now Debug “Start new instance”. The program compiles with warnings you can ignore. The HoloLens Emulator will start after about three minutes saying “tap here”. Press the space bar, wait then press the space bar further three times.
The full display appears use the keyboard arrow keys and the W, A, S, D keys to zoom in and out, left and right.

Summary

So this has shown how easy conversion of project tailored to Direct X11 are. There is still a lot of work to get this to commercial game standard. Most of this work could be completed by buying the more recent commercial code. This code appears to have been written four years ago for a competition, but the code was simpler and this has helped with conversion.

The main part of this conversion was to re-import the code into Unity 5.4 and then to re-export the code to Visual Studio.

There was on serious error unable to be solved and that’s in the HoloLens Emulator the Developers console is popping up with the error “Out of Virtual Finger IDs”

Above is screen of HoloLens Emulator playing/debugging Destroyed City, which looks like the version seen in the Unity 5.4 player.

Comments

  • This is an awesome tutorial. Thank you so much!

  • This just puts the game in a 2D window on HoloLens. This does not make it a 3D experience. Thanks.

  • Jimbohalo10Jimbohalo10 ✭✭✭
    edited April 2016

    @AceHack said:
    This just puts the game in a 2D window on HoloLens. This does not make it a 3D experience. Thanks.

    Yes I know that thank you. The purpose is to show how relatively easy to convert old Unity Assets to HoloLens.

    This is **not ** a 3D conversion process!. No company would allow me to take their 3D intellectual property to use as an example, without legal problems.

    Ask if you can do this with Microsoft IP, the first "Halo, Combat Evolved" the answer is still NO!, that why they streamed it to HoloLens at E3, but its capable of 3D!

  • Jimbohalo10Jimbohalo10 ✭✭✭
    edited November 2017

    Back in edited April 2016 @AceHack said

    @AceHack said:
    This just puts the game in a 2D window on HoloLens. This does not make it a 3D experience. Thanks.

    Well time to revisit this 3D Experience problem with Windows Mixed Reality Headset and Unity 2017.2.0p1-MRTP4 (64-bit) and Visual Studio 2017 are a considerable improvement over the original Unity HoloLens 5.4.0b10-HTP (64-bit).

    Currently still supported by Xbox Controller, because this was as Originally released: 18 January 2013.

    The graphics are DirectX 11 so when viewed on the headset they are rough and bumpy as they are the highest resolution retail 1024 x768 monitor of the time, so considerable difference with the HP WMR headset of 2880 x1440.

    So how to create this get Unity 2017.2.0p1-MRTP4 (64-bit) for PC

    Load the Mixed Reality Toolkit from follow Getting Started
    From the document
    2. "Download the MixedRealityToolkit-Unity asset packages"
    [Use the MixRealityToolkit](https://github.com/Microsoft/MixedRealityToolkit-Unity/releases/tag/v1.2017.2.0] or later.

    Each setup option is described below

    Mixed Reality Toolkit -> Configure -> Apply Mixed Reality Project Settings
    For Immersive headsets, check the Target Occluded Devices option

    Enable Xbox Controller Support option or you will get errors later on

    Got to Unity Asset Store and download a new version of Destroyed City FREE by Profi Developers. The paid for version has had latest graphics updates.

    Mixed Reality Toolkit -> Configure -> Apply Mixed Reality Scene Settings

    Untick "Move Camera Origin" before Apply. You will end up 5 miles away on a beach!, if you forget to do this.

    Follow the instructions for building with the Immersive Windows Mixed Reality Headsets.
    Start the Mixed Reality Portal and put on your WMMR Headset.

    Click Maximize size on play.
    Press Play

    In the headset the screen clears and you are in the forest near to remains of the Destroyed City. Use the Xbox Controller Stick to move you forward.
    Turn your head and the camera follows your head movement. Look behind and you can see in the distance more.

    This is only a 2D display but you have jumped, immersed yourself and by constantly moving your head you simulate this.

    Summary

    Look how far development in the community has come in just (November 2017) 19 short months.

    3D has become mainline and graphics are now assumed 4K !!!!

Sign In or Register to comment.