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.
Options

Unity UI Canvas Placement?

I've got yet another newbie question, mostly because I'm new to Unity development in general. I have a great Hololens app and I would like to add some Unity UI objects, mostly Text. They are placed on the canvas but I do not see them in my world (yes I changed my fonts from black to another color!).

Am I supposed to move my Unity Canvas to another point in my world view?

Best Answers

Answers

  • Options
    Jarrod1937Jarrod1937 ✭✭✭

    If you want to interact with the GUI, you must select world space, and maybe use something like the tagalong in the HoloToolKit for Unity. Screen and camera space keep it locked in place, so you'll never be able to interact with it via gaze. In regards to the font staying black, I was able to get around this by changing the shader of the material associated with the text. I was able to get white text this way.

  • Options

    Thanks, I guess it wasn't really a newbie question after all. That info helped a lot and I'm working fine now.

  • Options

    So I have created a HUD for use in the Hololens with the above suggestions of using Screen Space - Camera, etc. When I move my head however, there seems to be a trail behind the images. Is there anyway to remove this? Like with a different rendering mode or something?

  • Options

    @GentleSaint what do the trails look like? Are you seeing color separation?

    ===
    This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.

    (Daddy, what does 'now formatting drive C:' mean?)

  • Options
    edited June 2016

    Yes, that was the word I was looking for! Since the images are moving (due to them being a HUD), is there someway I can remove this or is only the corrections listed in the Color Separation page the way to go?

  • Options

    This is a property of how the device renders. There is no way to turn the behavior off. The corrections are the way to go.

    The main corrections are making sure you are hitting 60fps, and setting the stabilization plane.

    Hitting 60 fps is hard if you haven't set your quality setting to 'fastest', make sure you do that.

    The 'stabilization plane' concept sounds super scary, but it's not really. You're basically just setting the position that you are expecting the user is focusing on. The best way to do this is still being worked out, but I like to set a script like this on holograms I want to keep looking stable-though this script will behave poorly if multiple objects in view have the script attached. HoloToolkit's GazeManager also has a checkbox to enable the focal plane, but it relies on your Holograms having colliders attached. The below code does not rely on a collider.

    void Update()
        {
            if (IsTargetVisible())
            {
                HolographicSettings.SetFocusPointForFrame(gameObject.transform.position, -Camera.main.transform.forward);
            }
        }
    
        private bool IsTargetVisible()
        {
            // This will return true if the target's mesh is within the Main Camera's view frustums.
            Vector3 targetViewportPosition = Camera.main.WorldToViewportPoint(gameObject.transform.position);
            return (targetViewportPosition.x > 0.0 && targetViewportPosition.x < 1 &&
                targetViewportPosition.y > 0.0 && targetViewportPosition.y < 1 &&
                targetViewportPosition.z > 0);
        }
    

    ===
    This post provided as-is with no warranties and confers no rights. Using information provided is done at own risk.

    (Daddy, what does 'now formatting drive C:' mean?)

  • Options

    Ben on my team wrote a case study about setting the stabilization plane - he gives various examples from our shipped apps that illustrate different ways you might want to use it, depending on what your app does. You can see it here: https://developer.microsoft.com/en-us/windows/holographic/Case_study_-_Using_the_stabilization_plane_to_reduce_holographic_turbulence

  • Options

    what if I want to make a panel with a text over it appear or disappera after a click event?
    can i just put the setActive false in an Initialize script then in a button manager script, i'll have setActive(true)?

Sign In or Register to comment.