Intro
You might have heard it – the Mixed Reality Toolkit folks are busy with a major rewrite. The original MRTK was intended to accelerate applications targeted toward HoloLens and (later) Windows Mixed Reality immersive headsets. The new version “aims to further extend the capabilities of the toolkit and also introduce new features, including the capability to support more VR/AR/XR platforms beyond Microsoft's own Mixed Reality setup”.
I’ve been quite busy but finally found some time to play with it. And while I am doing that, I am going to shoot off some smaller and bigger blogs about things I learned – both for myself to remember and you to enjoy.
Be advised: it’s still heavy in development. The first beta release explicitly states:
This is a pre-release version and is not feature complete.
- This release is not intended for production use.
- This release contains many breaking changes from previous HoloToolkit and Mixed Reality Toolkit vNext releases.
So let’s dive in. In this first blog post on this subject, I will simply describe how to set up an empty project.
Cloning the latest MRTK-vNext from GitHub
This is pretty standard procedure. I prefer to use TortoiseGit for this, as I seem to be of the dying creed that’s not particularly fond of command lines. The repo is here (as it has been for a while)
After you have cloned the project, check out branch mrtk_development. This is the bleeding edge. This is where the most things happen (and the most things break ;) ).
Creating a new Unity project
Also fairly standard. You will need Unity 2018.2.18f1 for that. Or, by the time you will read this, probably an ever newer version. After you have created the project, close Unity again.
Adding the MRTK to you project
From the MRKT repo, copy the following folders and files to the assets folder of your project:
- MixedRealityToolkit
- MixedRealityToolkit-SDK
- MixedRealityToolkit.meta
- MixedRealityToolkit-SDK.meta
Configuring the MRKT-vNext components in your scene
Configuring the MRTK has become a whole lot easier.
- Open and existing scene or create one.
- Click Mixed Reality Toolkit/Configure
- You will see two game objects appear in your scene
Now Unity starts to complain about there being no camera tagged as MainCamera. This can easily be fixetd by tagging it manually:
Basically you know have an empty project
Preparing a custom configuration
If you click the MixedRealityToolkit game object, on the DefaultMixedRealityToolkitConfigurationProfile field:
you will see this this appear in the inspector
If you then click the button “Copy & Customize” it will create a new folder MixedRealityToolkit-Generated, and in that a CustomProfiles folder. And in that a MixedRealityToolkitConfigurationProfile
Make sure to check that the new profile is actually applied:
You will now see that the settings are no long greyed out, and now you can change and swap out components.
The fun thing is, these are not longer all MonoBehaviours and (most of all) no longer singletons. The MixedRealityToolkit class is the only ‘singleton’ left. The MixedRealityToolkitConfigurationProfile is a so called ‘scriptable object’ that can hold the configuration of the whole MRTK. But the MixedRealityToolkitConfigurationProfile is more or less a hat stand for all kinds of other partial configurations, all of which will end up in a profile as well.
Concluding words
We have taken the first (very small) baby steps into configuring the MRTK-vNext. We actually did not write any code and therefore, unlike most of my other posts, this does not come with a sample project. The next one will, though.
5 comments:
I tried following your tutorial, but even though I don't get it to work on hololens,
is there any specific configuration I need to do?
I have not gotten that far. I just tried setting up a project and demonstrating a few basic concepts
Hi, I tried to use the MRtoolkit but It's not allowing me to reproduce the scene because I need to configure the camera in a specific way. Do you have a clue on this? Thanks
Hi @Javier things have changed a little during this project. Can you please explain your issue a bit more? Maybe mail or skype? Mail address is on this blog
Hi, Joost.
Thank you very much for your answer.
By now I have been able to make it work. Though, I'm not sure how and why (I am very new to software development).
2 days ago I was trying to configure the default setup for MRtoolkit and It was not working. Maybe I just needed to restart Unity. But, I'm not sure. If the problem persist I will send you a detailed email about my problem.
Thank you very much.
Post a Comment