#Hololens2 – Project sizes using #MRTK

Buy Me A Coffee

Hi !

Quick post today. When I started with Hololens 1, Unity and the Hololens Toolkit a couple of years ago, I did this exercise to have a sense of the required disk space for my projects and tests.

I realize that I didn’t blogged this, so here is an updated version using the latest versions. Here are the tools and versions I’m using:

  • MRTK 2.4
  • Unity 2019.4.6f1
  • Visual Studio 2019 Preview (16.7.0)

And using this tools I follow the steps defined in “Initializing your project and deploying your first application” (see references). Let’s take a look at the disk usage.

  • Create an empty 3D project with Unity.
    Disk Size: 49 MB
  • 2. Build the project in Unity.
    Disk Size: 200 MB
  • Import the MRTK 2.4.0 Foundation package in Unity.
    Disk Size: 332 MB
  • Build the project in Unity.
    Disk Size: 668 MB
  • Build the output in Visual Studio 2019 for the HL2.
    Disk Size: 3 GB
  • Apply MRTK Configuration and Settings for a HL2 in Unity and Build.
    Disk Size: 3.10 GB
  • Build the output in Visual Studio 2019 for the HL2.
    Disk Size: 3.68 GB

So, as you can see, a ready-to-go final project will require around 3.5 GBs disk space. Get ready your credit card for a new SSD !

Happy coding!

Greetings

El Bruno


Resources

#Hololens – HoloToolkit Sharing: Share holograms between different devices (Post 1 of N, no idea right now the total amount of effort to make it work …)

Hello!

Now that I’ve found a 2nd set of Hololens to work here in Toronto, is the time to go back to Unity3D and the HoloToolkit. More specific: it’s time to learn and test on one of the less documented features: Sharing Holograms.

Once we have imported package of HoloToolkit Unity (in the right way), we can see in the Assets folder Sharing.

Clipboard03.jpg

This is the element that we must add to our project of Unity it to have “Sharing” capabilities with other apps on Hololens. In the properties of this element, we see that it uses a couple of interesting classes:

  • SharingStage.cs
  • SharingSessionTracker.cs
  • AutoJoinSession.cs
  • CustomMessages.cs

clipboard05

As always, in the absence of relevant documentation, I recommend you browse the source code since it is the simplest way to understand how this feature works. For now I only some of the [Sharing Stage] properties

  • Client Role: defines the type of customer for a Sharing app. According to the documentation of the class C#:

/// Set whether this app should be a Primary or Secondary client.
/// Primary: Connects directly to the Session Server, can create/join/leave sessions
/// Secondary: Connects to a Primary client. Cannot do any session management

  • Server Address and Server Port: You got this, this is easy: the IP address and port of the server that is used to coordinate the sharing of information between various devices
  • Auto Discover Server: Only enabling this check, our app should be able to discover automatically Sharing Server on the same subnet. In my case, and such time by my local network restrictions, not have been able to discover it automatically, by what I had to configure manually the IP address and port.

After reading all this, comes to ask yourself where you’re Sharing Service. The server is an executable app hidden in the bowels of the HoloToolkit package.

$\HoloToolkit-Unity-master\External\HoloToolkit\Sharing\Server\SharingService.exe

Now you can launch the executable and have our Sharing Service Up and Running.

Note: There is also an option to launch Sharing Service from Unity menus. I have not managed to work. However I could not make it work.

clipboard07

Now, more news, there are 2 ways to use the Sharing Service

  • local, running in app mode
  • service, running as a Windows service

clipboard09

For this example I run the app in local mode. At this time we can see the following in the command console

Clipboard11.jpg

C:\Hololens\Sharing\Server>SharingService.exe -local
Running Sharing Service locally. Enter ‘q’ to quit.
SharingService: ** Logging Session Began at 23:24:59, 10-6-2016
SharingService: ***********************************
SharingService: ****** Sharing Service OnStart ******
SharingService: ***********************************
SharingService: Server Info:
Build Version: 1.1.0.0
Schema Version: 15
SharingService: Listening for session list connections on port 20602 of all network devices of the local machine.
SharingService: Local IP addresses are:
SharingService: 172.16.80.1
SharingService: 192.168.0.19
SharingService: 169.254.80.80
SharingService: Created Session “Default” with ID 0 on port 20601

When we launched an app created that use the Asset of Sharing, with properly configured values, we can see that the server detects a new session and begins to show logs on it.

clipboard14

As well, in the next post about Sharing I hope to show how 2 apps share and work on a same hologram!

Greetings @ Toronto

El Bruno

References