Microsoft edge logo round10/28/2023 ![]() I first copied the three materials from the MRTK into my Assets. Also, I am a bit lazy, as you might know, so I tend to solve things like that with code. Apart from this being a lot of work, this might cause other problems if the material in the MRTK is updated, and your material starts to lag behind - then you will have to repeat the adapt and replace routine for all UI elements again. Now of course you might go about and change the three materials in every UI element in your app. Just, for instance, click the HighLightPlate in the hierarchy, then click the material in the Mesh plate’s MeshRender, this will make it show up in the assets pane - right-click it, then select “Show in Explorer” and you have it selected in a File Explorer Window. The files live in various place in the MRTK, and are easy to find. In a button, they are used in these places: There are actually three materials involved: The best way to go about this, is making a copy of the material outside of the MRTK, adapt it, and replace it in the UI elements concerned. And even if you were committing this to source control - if you later were to upgrade to a newer version of MRTK, you will loose your changes. If your co-worker pulls your solution from source control all the buttons and slates will be square again. The material in question is unpacked in Everything in Library is stuff that is generated from source and packages - and this you typically don’t commit to source control (you don’t, do you? Please tell me you don’t). tgz packages file in Packages\MixedReality nothing about this material is actually in your source files. You are basically adapting a material that is part of and inside the MRTK. The problem with this: it does not ‘stick’. If you move the slider “Unit radius” all the way to the right, it will move to 0.5 and you will immediately get this effect: This is the material “HolographicBackPlate”, that is used for the slate and for the button background. So what we need, is already prepared in the MRTK. To my great surprise and joy I found this in the Mixed Reality Toolkit Standard Shader that is used is almost all (if not all) MRTK materials, under Fluent options. As the screen shots probably tell you, this is entirely doable. It’s best just to find out how we can fix this without too much work and too much things breaking - staying as close to the original as possible. For the same reason I don’t want to fork the MRTK because that will probably come back to haunt me when in some future the time comes to upgrade. I am a great proponent of using COTS where ever possible - I would not like to build my own UI stack as the MRTK already offers so much, especially not for some minor visual effects. Including, of course, cool rounded 3D visual effects like these when hit boxes are activated. What you want (or most likely, what your designer wants ) ) is something like this: However, you you look very carefully, you will see neither the buttons nor the slate is actually completely square. A typical MRTK user interface looks like this: Unfortunately, HoloLens and the Mixed Reality Toolkit are seemingly lagging a bit behind as far as this fashion is concerned. ![]() Rounded corners are suddenly hip again and all the rage, even in Microsoft land, as is clearly visible in Windows 11.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |