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

Isolate or highlight objects by changing colours/materials of everything not selected

Hi all,
Complete beginner here, so please bear with me. I'm looking to set up a basic example where I can use voice commands to identify parts of a model. For example on a model of a car you could say "Show me the seats" and all non seat objects in the model, would switch to a transparent colour.
I've worked through all of the Holographic Academy tutorials, however I can't figure out where to start with changing colour or material properties to be able to isolate requested objects.
Any help would be much appreciated.

Advanced Design Technologist - Aurecon

Tagged:

Answers

  • Options
    mark_grossnicklemark_grossnickle ✭✭✭
    edited March 2017

    Typically you need a shader that has a color property (which many of them do).

    Grab your meshRenderer and then call:
    meshRenderer.material.SetColor("_Color", PutColorHere);

    Another option would be to check out Dotween library which I highly recommend:
    https://www.assetstore.unity3d.com/en/#!/content/27676

    With that you can call:
    material.DOColor(Color.green, TransitionTime);

    TransitionTime is in seconds. So if you want the material to fade to green over the course of 2 seconds then put in 2.

    To fade items out you can set the items to a color with 0 alpha but transparency should be avoided typically as it causes overdraw. With the hololens anything that is black becomes transparent so transitioning to black is more performant. The only 'catch' there is that anything behind the black object would not be visible so you can only transition items in the background to black.

    Taqtile

Sign In or Register to comment.