• Home
  • About
  • Contact
  • Privacy
  • Terms
  • DCMA
  • Write For Us / Submit
Tech News, Magazine & Review WordPress Theme 2017
  • Tech
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Gear
    • All
    • Camera
    • Laptop
    • Smartphone
    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    Exploring the Innovative Features of Pear Phones

    Exploring the Innovative Features of Pear Phones

    Latest Smart Home Gadgets for a Connected Life

    Latest Smart Home Gadgets for a Connected Life

    Eco-Friendly Products for Students

    Eco-Friendly Products for Students

    Essential Photography Equipment and Gadgets

    Mastering Your Shots: Essential Photography Equipment and Gadgets

    Level Up Your Game: Must-Have Gaming Gear!

    Level Up Your Game: Must-Have Gaming Gear!

    Trending Tags

    • Best iPhone 7 deals
    • Apple Watch 2
    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Gaming
    Master the World of Online Gaming with the Best Gaming VPN

    Master the World of Online Gaming with 3 Best Gaming VPN

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    5 Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    9 Best Alternative Games Like Kahoot

    9 Best Alternative Games Like Kahoot

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

  • Crypto
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Business
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

No Result
View All Result
Geeky Insider
  • Tech
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Gear
    • All
    • Camera
    • Laptop
    • Smartphone
    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    The New Galaxy Watch Ultra and Galaxy Ring Are Announced by Samsung

    Exploring the Innovative Features of Pear Phones

    Exploring the Innovative Features of Pear Phones

    Latest Smart Home Gadgets for a Connected Life

    Latest Smart Home Gadgets for a Connected Life

    Eco-Friendly Products for Students

    Eco-Friendly Products for Students

    Essential Photography Equipment and Gadgets

    Mastering Your Shots: Essential Photography Equipment and Gadgets

    Level Up Your Game: Must-Have Gaming Gear!

    Level Up Your Game: Must-Have Gaming Gear!

    Trending Tags

    • Best iPhone 7 deals
    • Apple Watch 2
    • Nintendo Switch
    • CES 2017
    • Playstation 4 Pro
    • iOS 10
    • iPhone 7
    • Sillicon Valley
  • Gaming
    Master the World of Online Gaming with the Best Gaming VPN

    Master the World of Online Gaming with 3 Best Gaming VPN

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    7 Powerful Strategies to Overcome Video Game Addiction and Reclaim Your Life

    Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    5 Powerful Ways Xbox Cloud Gaming is Revolutionizing the Gaming World

    9 Best Alternative Games Like Kahoot

    9 Best Alternative Games Like Kahoot

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    The Top 8 Free Bubble Shooter Games for Endless Entertainment

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

    Cloud Gaming Revolution: How Streaming is Changing the Future of Gaming

  • Crypto
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

  • Business
    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    How Drones and 360-Degree Cameras Are Changing Bridal Photoshoots

    120+ Best Creative Names for Team at Work

    120+ Best Creative Names for Team at Work

    Can You Repair Printed Circuit Board ?

    Mastering PCB Board Repair Comprehensive Guide

    Breaking Barriers Federal Inmate Texting Service

    Breaking Barriers Federal Inmate Texting Service

    transfer whatsapp from android to iphone

    How to Transfer WhatsApp from Android to iPhone!

    Understanding the Role of Humidity Chambers in Climate Testing

    Understanding the Role of Humidity Chambers in Climate Testing

    Everything You Get to Know About Movember Beard Memes

    Everything You Get to Know About Movember Beard Memes

    Best Book Recommendation Apps

    11 Best Book Recommendation Apps

    How to quickly divide or Split PDF files

    How to Quickly Divide or Split PDF Files

Submit
Geeky Insider
No Result
View All Result

Build .NET apps for the metaverse with StereoKit

by Staff Writer
August 4, 2022
in Technology
Reading Time: 5 mins read
Build .NET apps for the metaverse with StereoKit
Share on FacebookShare on Twitter

Much of the Windows mixed-reality platform depends on Unity. However, that’s not always the best option for many reasons, especially its licensing model that’s still very focused on the games market. There are alternatives. You could use WebXR in an embedded browser or work with the cross-platform tools in the Power Platform that’s built around Babylon.js’s React Native implementation. But if you’re working with .NET code and want to extend it into augmented reality and virtual reality, you still need a set of .NET mixed-reality libraries.

Table of Contents

Toggle
  • OpenXR: an open mixed-reality standard
    • READ ALSO
    • Exploring the Evolution of Xiaomi Wireless AR Buff Glasses
    • Space Tourism: Journeying Beyond Earth’s Boundaries
  • Working with StereoKit
  • Build your first C# mixed-reality app

OpenXR: an open mixed-reality standard

Luckily, there’s an open standards–based approach to working with mixed reality and a set of .NET tools for working with it. The Khronos Group is the industry body responsible for graphics standards such as OpenGL and OpenCL that help code get the most out of GPU hardware. As part of its remit, it manages the OpenXR standard, which is designed to allow you to write code once and have it run on any headset or augmented-reality device. With runtimes from Microsoft, Oculus, and Collabara, among others, OpenXR code should run on most platforms that can host.NET code.

READ ALSO

Master the World of Online Gaming with the Best Gaming VPN

Master the World of Online Gaming with 3 Best Gaming VPN

October 21, 2023
Understanding Blockchain Technology

7 Astonishing Ways Blockchain Technology

September 26, 2023

OpenXR’s cross-platform and cross-device nature makes it possible to have one code base that can deliver mixed reality to supported platforms if you’re using a language or framework that works across all those platforms. As the modern .NET platform now supports most of the places you’re likely to want to host OpenXR applications, you should find the Microsoft-sponsored StereoKit tool an ideal way to build those apps, especially with cross-platform UI tools like MAUI hosting non-OpenXR content. You can find the project on GitHub.

As it’s being developed by the same team as Windows’ Mixed Reality Toolkit, there are plans to evolve towards being able to use Microsoft’s Mixed Reality Design Language. That should allow the two tools to support a similar feature set so you can bring what would have been Unity-based applications to the wider C# development framework.

Working with StereoKit

StereoKit is purely designed to take your 3D assets and display them in an interactive mixed-reality environment with a focus on performance and a concise (the documentation refers to it as “terse”) API to simplify writing code. It’s designed for C# developers, though there is additional support for C and C++ if you need to get closer to your hardware. Although it was originally designed for HoloLens 2 applications and for augmented reality, the tool is suitable for building virtual-reality code and using augmented reality on mobile devices.

Currently platform support is focused on 64-bit applications, with StereoKit shipping as a NuGet package. Windows desktop developers currently only get access to the x64 code, though you should be able to use the ARM64 HoloLens Universal Windows Platform (UWP) on other ARM hardware such as the Surface Pro X. The Linux package has support for both x64 and ARM64; Android apps will only run on ARM64 devices (though testing should work through the Android Bridge technology used by the Windows Subsystem for Android on Intel hardware). Unfortunately, we can’t be completely cross-platform at present as there’s no iOS implementation because there’s no official iOS OpenXR build. Apple is focusing on its own ARKit tool, and as a workaround, the StereoKit team is currently working on a cross-platform WebAssembly implementation that should run anywhere there is a WebAssembly-compatible JavaScript runtime.

Developing with StereoKit shouldn’t be too hard for anyone who’s built .NET UI code. It’s probably best to work with Visual Studio, though there’s no reason you can’t use any other .NET development environment that supports NuGet. Visual Studio users will need to ensure that they’ve enabled desktop .NET development for Windows OpenXR apps, UWP for apps targeting HoloLens, and mobile .NET development for Oculus and other Android-based hardware. You’ll need an OpenXR runtime to test code against, with the option of using a desktop simulator if you don’t have a headset. One advantage of working with Visual Studio is that the StereoKit development team has provided a set of Visual Studio templates that can speed up getting started by loading prerequisites and filling out some boilerplate code.

Most developers are likely to want the .NET Core template, as this works with modern .NET implementations on Windows and Linux and gets you ready for the cross-platform template under development. Cross-platform .NET development is now focused on tools like MAUI and WinUI, so it’s likely that the UWP implementation will become less important over time, especially if the team ships a WebAssembly version.

Build your first C# mixed-reality app

Building code in StereoKit is helped by well-defined 3D primitives that simplify creating objects in a mixed-reality space. Drawing a cube (the mixed-reality version of “Hello, world”) can be done in a handful of lines of code with another sample, a free-space drawing app, in just over 200 lines of C#. The library handles most of the interactions with OpenXR for you, allowing you to work with your environment directly rather than having to implement low-level drawing functions or have code that needs to manage different cameras and screens.

You will need to consider some key differences between traditional desktop applications and working in StereoKit when writing code. Perhaps the most important is managing state. StereoKit needs to implement UI elements in every frame, storing as little state as possible between states. There are aspects to this approach that simplify things considerably. All UI elements are hierarchical, so toggling one element off automatically toggles its child elements.

This approach lets you attach UI elements to other objects in your model. StereoKit supports many standard 3D object formats, so all you need to do is load up a model from a file before defining interactions and adding a layout area on the model, which acts as the host for UI elements and makes the object the top of the UI hierarchy. It’s important not to reuse element IDs within a UI object as they form the basis of StereoKit’s minimal interaction state model and are used to track which elements are currently active and can be used in user interactions.

StereoKit takes a “hand-first” approach to mixed-reality interactions, using hand sensors such as HoloLens’s tracking cameras where available or simulating them for mouse or gamepad controllers. Hands are displayed in the interaction space and can be used to place other UI elements with respect to hand positions, for example, making a control menu always close to the user’s hands, no matter where they are in application space.

If you need inspiration for how to implement specific features, a useful library of demo scenes is in the StereoKit GitHub repository. These include sample code for working with controllers and managing hand input, among other necessary elements of a mixed-reality interaction. The code is well documented, giving you plenty of tips on how to use key elements of the StereoKit APIs.

Removing Microsoft’s dependency on Unity for mixed reality is a good thing. Having its own open source tool ensures that mixed reality is a first-class citizen in the .NET ecosystem, supported on as much of that ecosystem as possible. Targeting OpenXR is also key to StereoKit’s success as it ensures a common level of support across mixed-reality devices like HoloLens, virtual reality like Oculus, and augmented reality on Android. You’ll be able to use the same project to target different devices and integrate with familiar tools and technologies such as MAUI. Mixed reality doesn’t need to be a separate aspect of your code. StereoKit makes it simple to bring it into existing .NET projects without having to make significant changes. After all, it’s now only another UI layer!

Copyright © 2022 IDG Communications, Inc.

Source by www.infoworld.com

Related Posts

Navigating The Issues of AI and Social Media
Marketing

Navigating The Issues of AI and Social Media

November 21, 2023
The Challenges of 5G Security: What to Watch For
Technology

The Challenges of 5G Security: What to Watch For

October 31, 2023
Master the World of Online Gaming with the Best Gaming VPN
Gaming

Master the World of Online Gaming with 3 Best Gaming VPN

October 21, 2023
Understanding Blockchain Technology
Crypto

7 Astonishing Ways Blockchain Technology

September 26, 2023

Recommended.

Apple and Meta once discussed "revenue sharing" methods, report claims

Apple and Meta once discussed “revenue sharing” methods, report claims

August 13, 2022
US CPI FED crypto

Bitcoin drops 3% as U.S. inflation rises 0.4% in September

October 13, 2022

Trending.

No Content Available
  • Home
  • About
  • Contact
  • Privacy
  • Terms
  • DCMA
  • Write For Us / Submit
Contact us for submission queries. editor[at]geekyinsider.com.
No Result
View All Result
  • Home
  • Review
  • Apple
  • Gaming
  • Gadget and Gear
    • Camera
    • Smartphone
  • Microsoft
  • Security