Git Product home page Git Product logo

holographicacademy's Introduction

HolographicAcademy

This will be the home of all code assets necessary for the Holographic Academy. All of the courses can be found in their own branches. This is so developers can download zip folders for these tutorials from the Academy documentation. There's also a link to MixedReality250, the tutorial presented at Build 2017, and MixedReality213, created for motion controllers, both in their own repos.

  1. Holograms-101 branch
  2. Holograms-210-Gaze branch
  3. Holograms-211-Gesture branch
  4. Holograms-212-Voice branch
  5. MixedReality213 repo
  6. Holograms-220-SpatialSound branch
  7. Holograms-230-SpatialMapping branch
  8. Holograms-240-SharedHolograms branch
  9. MixedReality250 repo

holographicacademy's People

Contributors

angelahillier avatar fieldsjacksong avatar jadack-msft avatar keveleigh avatar laurenbissett avatar microsoft-github-policy-service[bot] avatar msftgits avatar neerajw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

holographicacademy's Issues

Holograms-210 Chapter 6 - SimpleTagAlong sample is not working as described

I'm using the latest version of Unity. At the time of opening this issue the latest version was 2017.3.1f1

The sample in 210 Chapter 6 (https://developer.microsoft.com/en-us/windows/mixed-reality/holograms_210) is not working as described. That is, the "TagAlong" object is never made visible. I've verified that the PerformTagAlong() function is being invoked, and the "TabAlong" object is dynamically being inserted into the scene. However, the "SimpleTagAlong" class is not bringing the "TagAlong" object into view.

As a work around, I've inserted these "run once" lines, immediate after instantiating the "TagObject":

InteractibleAction.cs around line 29

Ray ray = new Ray(Camera.main.transform.position, Camera.main.transform.forward);
instantiatedObjectToTagAlong.transform.position = ray.GetPoint(2.0f);

Incompatible with Holograms 101E Tutorial (Spatial Mapping)

Hi guys,

I tried to finish the last part -Spatial mapping- of the Holograms 101E (https://developer.microsoft.com/en-us/windows/mixed-reality/holograms_101e#chapter_6_-_spatial_mapping), but I fail at the TapToPlace part.
Everytime I gaze at the stage and use the select gesture, only the spatial mapping mesh changes from visible to invisible and couldn't move the stage. Does this depends on the new spatial mapping prefab ?

Greetings,
Chris

[Holograms 101]Error SendMessageUpwards has no receiver

Hello,

Context:

Holograms 101
When I tap on a spatial mesh I have this error: "SendMessageUpwards has no receiver"
This error appear only when I use Holographic Remoting Player for streaming my application via Unity (not with debug or release version).

Suggested solution:

Add l.25 in GazeGestureManager.cs the option DontRequireReceiver to SendMessageUpwards()
FocusedObject.SendMessageUpwards("OnSelect", SendMessageOptions.DontRequireReceiver);

I think we can have the same problem when we use SendMessage() without option

Maxime

SimpleTagAlong not working

I'm just trying to get a simple tagalong test to work. I've added a main camera, a basic sphere, and then I've attached the SimpleTagAlong script to the sphere. When I run it nothing happens. The sphere just stays where I placed it (2m in front of me).

I read that Tagalong requires a Collider, which my sphere does.
I read that Tagalong requires an Interpolator. Tested with it unchecked (default) and checked.
I've tested in Unity, in the emulator, and on the device. Same result.

I don't know what I'm missing...

tagalong

Holograms-101 - need to stop playing the rolling sound on reset

  1. In catchup-chapter 7, position the stage on the floor and drop a sphere.
  2. Notice the sphere rolls off the stage and onto the floor.
  3. If the spatial mapping mesh is noisy enough, it will continue to roll with enough velocity to keep the rolling sound playing
  4. Issue the "reset world" command
  5. Notice, the sphere goes back to its original local position, but the rolling wave is still playing.

Tutorial code does not work with the latest stable HoloToolkit

Hi folks! These tutorials have fallen substantially behind the latest release of HoloToolkit, even without accounting for the MRTK v2 beta or the HoloLens 2. (I’m looking in particular at Holograms 240.) The current notice prefacing the tutorials is as follows:

“The Mixed Reality Academy tutorials were designed with HoloLens (1st gen) and Mixed Reality Immersive Headsets in mind. As such, we feel it is important to leave these tutorials in place for developers who are still looking for guidance in developing for those devices. These tutorials will not be updated with the latest toolsets or interactions being used for HoloLens 2. They will be maintained to continue working on the supported devices. There will be a new series of tutorials that will be posted in the future that will demonstrate how to develop for HoloLens 2. This notice will be updated with a link to those tutorials when they are posted.”

Although the code does work on HoloLens 1, the above notice is misleading: HoloToolkit 2017.4 does not work with these tutorials out of the box, even though it’s the current stable release for HoloLens 1 development. A few examples of how much has changed:

  • The gesture input workflow has changed dramatically since 2017.2 — GestureManager is now obsolete, and InputManager with the IInputClickHandler interface has replaced it. (The same goes for other input modalities.)

  • The hologram sharing scripts and prefabs have changed — e.g., AutoJoinSession isn’t part of the standard Sharing.prefab anymore. I’m still in the process of figuring out how to get the 2017.4 version working.

  • Even some basics like the Billboard.cs script semantics have changed — replacing the current version with the new version makes billboarded objects face constantly away from instead of toward the user.

Could the tutorials (especially 240) please be updated to 2017.4, for those of us looking to use the tutorial code as a general foundation for understanding and as a starting point for our own apps? Or, alternatively, could the aforementioned notice be updated to warn developers about the updates that have been made between 2017.2 and 2017.4? Thanks!

Academy needs to be updated to Unity 2017.2

Hi,

I'm getting the error

Assets\Holograms\Support\Fitbox\Fitbox.cs(43,46): error CS0246: The type or namespace name 'GestureRecognizer' could not be found (are you missing a using directive or an assembly reference?)

Moreover I'm getting the warning

Assets\Holograms\Support\Fitbox\Fitbox.cs(44,9): warning CS0618: 'GestureRecognizer.TappedEvent' i obsolete: 'TappedEvent is deprecated, and will be removed in a future release. Use OnTappedEvent instead'

I looks like some APIs have changed, and that some of the other tutorials might also be affected.

I'm using Unity version 2017.2.0f3 and Visual Studio 2017 (version 15.4.1).

Head Tracking using Hololens

Hello Everyone,

I am working on Hololens nowadays and trying to develop Head Tracking approach using microsoft Hololens.

I will highly appretiate your guidence.

Regards
Khawaja Samran

Cannot upload an anchor successfully and ipv4

Hey everyone,

I'm having trouble connecting two hololens devices to one network even after following the Microsoft tutorial/course step by step.

I have reached and completed the 3rd section 'Chapter 3 - Shared Coordinates' but with no successful results.

The application builds but I cannot upload an anchor to my environment even after waiting 30 - 60 seconds. I also redeployed and waited multiple times.

I have a few questions which may identify the problem.

  1. In the Unity inspector for the Sharing component, what exactly should the server address be? What does it mean by 'machine'. Is this the ipv4 of the primary Hololens device I want to use to host the application or is it my PC or is it the wireless router both hololens are connected too, I don't really understand it. How about the Sever port, should it be 20602 by default or 20601?

When I click holotoolkit tab on the top window bar in Unity I get these stats

SharingService: Listening for session list connections on port 20602 of all network devices of the local machine.
SharingService: Local IP addresses are:
SharingService: 172.24.11.65
SharingService: 192.168.1.213
SharingService: Created Session "Default" with ID 0 on port 20601
SharingService: User UnknownUser at address 192.168.1.214 joined session Default

This is the part that confuses me

I have 2 hololens both connected to a wifi router and both hololens have different ipv4s. The PC I am building on is connected through an ethernet cable not wireless and same as the hololens.

So the question is which ipvf4 address should my server address be?

ipv4 1st Main hololens:
192.168.1.214

ipv4 2nd hololens:
192.168.1.226

So which ipv4 is the right one??? It should technically be '192.168.1.214' which is the primary hololens but according to the the package it should be '192.168.1.213' which is for the 'Ethernet adapter Ethernet'

172.24.11.65 is the Ethernet adapter vEthernet

  1. I suspect that the problem may be my wireless connection because the signal is weak and in rare occasions it even fails to build wirelessly on Visual studio.

Instead could I just build everything with the USB on device and then just run the application? For networking in hololens do I have to build the applications via Unity through wireless or on remote machine or can I build them on the device?

  1. Finally to actually run the app properly do I have to build, run and open the application on both hololens before I can upload an anchor point? In other words can I just test it on the primary hololens to see if it works then connect the other one after?

unity projects can't be built when I put Holotoolkit in github and academy code together

When I import the resources on GitHub and the resources in the college into a scenario,Although there is a lot of bug but I can click play。But when I want to build it ,there is something wrong.

`Plugin 'PlaneFinding.dll' is used from several locations:
Assets/HoloToolkit/SpatialMapping/Plugins/WSA/x64/PlaneFinding.dll would be copied to /Plugins/X64/PlaneFinding.dll
Assets/HoloToolkit-SpatialMapping-230/SpatialMapping/Plugins/WSA/x64/PlaneFinding.dll would be copied to /Plugins/X64/PlaneFinding.dll
Plugin 'PlaneFinding.dll' is used from several locations:
Assets/HoloToolkit-SpatialMapping-230/SpatialMapping/Plugins/WSA/x86/PlaneFinding.dll would be copied to /Plugins/X86/PlaneFinding.dll
Assets/HoloToolkit/SpatialMapping/Plugins/WSA/x86/PlaneFinding.dll would be copied to /Plugins/X86/PlaneFinding.dll
Please fix plugin settings and try again.

UnityEditor.Modules.DefaultPluginImporterExtension:CheckFileCollisions(String)
UnityEditorInternal.PluginsHelper:CheckFileCollisions(BuildTarget) (at C:/buildslave/unity/build/Editor/Mono/Plugins/PluginsHelper.cs:25)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) Plugins colliding with each other. Build completed with a result of 'Failed'
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)`

As a beginner, this problem has troubled me for a long time,I do not know if there is a solution,thank you。

Selecting the Energy hub does not work in chapter 3

https://github.com/Microsoft/HolographicAcademy/tree/Holograms-240-SharedHolograms/Catchup-Chapters/3-SharedCoordinates . Selecting the Energy hub does not work . Cause: GestureManager sends OnSelect but active object is Base, not the root object, so OnSelect on HologramPlacement is never called. Simplest (but rather crude ) fix is to change in GestureManager
focusedObject.SendMessage("OnSelect");
to
focusedObject.SendMessageUpwards("OnSelect");

Does not work with MR-210

The code does not work with the MR-210 tutorial. For example there is no camera asset that i can find and the tutorial cannot be completed. This is very frustrating as the MR-101 does not work with unity 2018 either. Please update the tutorial(s).

FitBox math for repositioning holograms is incorrect

Prior to closing the FitBox in FitBox::DismissFitbox() the Hologram Collection object is supposed to get repositioned in front of the user. Unfortunately, there are several mistakes in the math for calculating the new position and rotation of the Hologram Collection.

The first problem is in the calculation of collectionStartingOffsetFromCamera inside Awake(). Here is the code as it currently exists:

// These are the holograms to show when the Fitbox is dismissed
 if (HologramCollection)
{
    collectionStartingOffsetFromCamera = HologramCollection.transform.localPosition;
    HologramCollection.SetActive(false);
 }

The hologram collection is not parented to anything so its localPosition will be the same as its global position. This calculation of the offset is correct if the camera is placed at (0,0,0), which it is for the scenes provided by the Academy. Now it is recommended that user's put the cameras at the origin, but that isn't a strict requirement. A more robust calculation would be:

collectionStartingOffsetFromCamera = Camera.main.transform.InverseTransformPoint(HologramCollection.transform.position);

This calculates the Hologram Collection's position in the local space of the camera and will work regardless of the initial placement of the camera.

Next, take a look at in DismissFitbox() and you will see this code which calculates the new position and rotation of the Hologram Collection:

// Update the Hologram Collection's position so it shows up
// where the Fitbox left off. Start with the camera's localRotation...
Quaternion camQuat = Camera.main.transform.localRotation;

// ... ignore pitch by disabling rotation around the x axis
camQuat.x = 0;

// Rotate the vector and factor y back into the position
Vector3 newPosition = camQuat * collectionStartingOffsetFromCamera;
newPosition.y = collectionStartingOffsetFromCamera.y;

// Position was "Local Position" so add that to where the camera is now
HologramCollection.transform.position = Camera.main.transform.position + newPosition;

// Rotate the Hologram Collection to face the user.
Quaternion toQuat = Camera.main.transform.localRotation * HologramCollection.transform.rotation;
toQuat.x = 0;
toQuat.z = 0;
HologramCollection.transform.rotation = toQuat;

Zeroing out the X coordinate of camQuat does not remove pitch as the comment suggests. camQuat is a quaternion but is being used like Euler angles. The X, Y, Z components of a quaternion tell us the axis around which the object is being rotated not the rotation of the object itself. So setting the X component to 0 means we have a rotation about some new axis in the Y, Z plane but does not mean that the object has zero rotation in the X plane. A more correct implementation would be to convert the quaternion into Euler angles and then remove the unwanted components. This guarantees we have removed the pitch and roll from the object itself.:

// Update the Hologram Collection's position so it shows up where the Fitbox left off. 
// Start with the camera's rotation in euler angles
var euler = Camera.main.transform.eulerAngles;

// Remove pitch and roll by zeroing out rotation around the x and z axes
var camQuat = Quaternion.Euler(0, euler.y, 0);

// Calculate the new offset by rotating the initial offset vector
var newOffset = camQuat * collectionStartingOffsetFromCamera;

// Add the camera's position to the new offset to get the new position of the collection
HologramCollection.transform.position = Camera.main.transform.position + newOffset;

I should note that the original code did not remove roll when calculating the collection's position, but I think that was the desired behavior so that is what I have done here. If you do want to include roll into the calculation you just have to replace the zero in the Z component with euler.z.

Likewise, the new rotation of the Hologram Collection is calculated by setting the X and Z coordinates of the rotation quaternion. Here is the code as it exists:

// Rotate the Hologram Collection to face the user.
Quaternion toQuat = Camera.main.transform.localRotation * HologramCollection.transform.rotation;
toQuat.x = 0;
toQuat.z = 0;
HologramCollection.transform.rotation = toQuat;

I believe the intent is to remove the camera's pitch and roll from the rotation of the Hologram collection. A better way would be to calculate the initial rotational offset in Awake() and then reapply that to the camQuat rotation in DismissFitbox(). This mirrors the calculation we did for position.

Inside Awake() we calculate the delta rotation between the camera's rotation and the collection's.

collectionStartingRotationOffsetFromCamera = Quaternion.Inverse(Camera.main.transform.rotation) * HologramCollection.transform.rotation;

And then inside DismissFitbox() we apply the delta to the camQuat rotation to get the new rotation for the hologram collection:

// Rotate the Hologram Collection to face the user.
Quaternion toQuat = camQuat * collectionStartingRotationOffsetFromCamera;
HologramCollection.transform.rotation = toQuat;

I believe this should achieve the desired placement and rotation of the hologram collection once the fitbox is dismissed. There are a variety of other approaches you could take to achieve the same result. The reason I chose this method was that it stuck closely to the original logic.

TextMeshPro could not be found

I'm getting CS2001 errors for about 45 resources such as the following:

\Origami\Packages\com.unity.textmeshpro\Scripts\Runtime\TMP_UpdateRegistery.cs' could not be found. Project: Unity.TextMeshPro

I'm new to C# and Visual Studio, so I apologize if this is an obvious solution, but when trying to follow the HoloLens academy videos and using the source files, I get these errors. Is TextMeshPro something I should download on my own, or are they supposed to be included in these source files?

Thanks!

Holograms-240 Custom Messages (Script) comments

While analysing the code used to broadcast the various messages in the CustomMessages script, I noticed that each broadcasting method (except the last one) includes the same comment:

// If we are connected to a session, broadcast our head info

Is this correct for the methods other than SendHeadTransform?

Holograms-212-Voice Chapter 2 SoundMeter

While following the Holograms 212 voice tutorial, I ran into an issue after deploying Chapter 2. I am using Unity 5.4.0f3. When testing the app, I can open the communicator but when I airtap to record my voice, the application freezes and points to the line: SoundMeter.gameObject.SetActive(enabled); within the SetUI function as the problem. The only way I was able to get the project to work functionally was to comment that line out. Note that I followed the instructions on Holographic Academy precisely and the only changes that were made to the project up to this point, were the deletion of the two lines of code in Chapter 2.

Rename HoloToolkit folders and namespace for Academy content

We want to make it easier for developers to use the latest HoloToolkit from GitHub if they are starting from an Academy course.

To avoid merge conflicts and not incurring the tax of always keep teachable content in sync with GitHub, we can do the following things:

  1. Rename HoloToolkit folder under Assets to something like HoloToolkit-Academy-CourseNumber
  2. Rename the namespace HoloToolkit.Unity to something like Academy.HoloToolkit.Unity

Render ModelExplorer assets at 60 fps

  1. Consider a more performant shader instead of current back face culling shader.
  2. Evaluate impact of multiple lights in the scene.
  3. Consider decimating the model.

Holograms 240 Placement

If you follow the instructions things stop working on holograms 240 once you hit Chapter 3 Shared Coordinates.

The behavior I'm seeing is that the hologram can no longer be placed in the scene and when using two HoloLenses they do no actually have a shared view of the EnergyHub

'Haptics' does not exist

I want to build the project; However, I get the error 'Haptics' does not exist.

I think there is sth wrong with common scripts in holotoolkit folder and the overall version.

What can I do?

Holograms 230 - Spatial Mapping - surfaceObserver not observing in Chapters 1 & 2

If I follow Chapter 1: Scanning and Chapter 2: Visualization the project doesn't show anything in my HoloLens. The problem seems that StartObserver doesn't get called in the SpatialMappingManager. So no data is acquired and nothing will be displayed.

In Chapter 3: Processing there will be visual output once the PlaySpaceManager has been updated, because it will enter scanning mode if not enough surfaces have been found.

Errors in BuildCommands.cs with Unity 2018.1.0f2 on Open

Cloning the HolographicAcademy-Holograms-220-SpatialSound branch and attempting to follow instructions on MR Spatial 220 will result in a number of errors:

Assertion failed: Removing Assets/HoloToolkit-SpatialSound-220/Input/Models/Cursor/cursor_hand_ready.fbm/templates because the asset does not exist
Assertion failed: Removing Assets/HoloToolkit-SpatialSound-220/Input/Models/Cursor/cursor_ready.fbm/templates because the asset does not exist
Shader error in 'HoloToolkit/StandardFast': invalid subscript 'uv2' at /Program Files/Unity/Editor/Data/CGIncludes/UnityStandardMeta.cginc(21) (on d3d11)

The main one which prevents a successful build is:

Assets/HoloToolkit-SpatialSound-220/Utilities/Editor/BuildCommands.cs(59,42): error CS0029: Cannot implicitly convert type UnityEditor.Build.Reporting.BuildReport' to string'

A workaround is to follow the guidelines on Unity's documentation for BuildPlayer:

        /// <summary>
        /// Do a build configured for the HoloLens, returns the error from BuildPipeline.BuildPlayer
        /// </summary>
        public static string BuildForHololens()
        {

            // Cache the current settings
            BuildSettings oldBuildSettings = BuildSettings.Current;

            // Define and apply the desired settings
            BuildSettings newBuildSettings = oldBuildSettings;
            newBuildSettings.BuildTarget = BuildTarget.WSAPlayer;
            newBuildSettings.WSASDK = WSASDK.UWP;
            newBuildSettings.WSAUWPBuildType = WSAUWPBuildType.D3D;
            newBuildSettings.Apply();

            // Capture the active scenes, and build
            var scenes = EditorBuildSettings.scenes.Where(s => s.enabled).Select(s => s.path);
            BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();
            buildPlayerOptions.scenes = scenes.ToArray();
            buildPlayerOptions.locationPathName = BuildLocation;
            buildPlayerOptions.target = newBuildSettings.BuildTarget;
            buildPlayerOptions.options = BuildOptions.None;
            UnityEditor.Build.Reporting.BuildReport error = BuildPipeline.BuildPlayer(buildPlayerOptions);

            // Restore old build settings
            oldBuildSettings.Apply();

            return error.ToString();
        }

Holograms 240: Remove catch-up chapters

Rename the catch-up chapter '7-Finale' to 'Completed' and then remove all other catch-up chapters from this course. Catch-up chapters were useful for Build, but no longer necessary. They are too costly to maintain and makes the download size for the class significantly larger.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.