StereoKit / StereoKit-PaintTutorial

Source for a Mixed Reality inking tutorial using StereoKit and C#!
https://stereokit.net
MIT License
32 stars 16 forks source link
ar hololens mr painting stereokit vr

This is a demo application, and introductory tutorial for StereoKit aimed at introducing people to the basics of how to draw and interact with Mixed Reality content! It just so happens that "inking" is a relatively straightforward thing to code, and is pretty fun at the same time.

You'll find out how to create a core application loop, radial hand menus, easy window menus with automatic layout, object-based menus with more explicit layouts, and file pickers. You'll also see how easy it is to draw models, lines, and interact directly with your fingers!

While I could have gone wild on adding features, this project is intended as a readable, easy to understand learning resource! It's an example of how to do things, and a good starting point for those that might be interested in creating a similar feature for themselves. It's not meant to be an exhaustive or fully featured product.

Pre-requisites

This project uses:

This project uses StereoKit to render and drive this as a Mixed Reality application, which allows us to run on HoloLens 2 and VR headsets! That's all that's in here besides the tutorial code :)

Project Layout

Since this is a pretty simple tutorial, there's not a lot of files here! But there are some things to make note of. This solution uses a 3 project setup: one for .NET Core, one for Android, and one for UWP. Different projects deploy to different targets, I'll often use .NET for rapid development, then switch to Android or UWP for on-device testing.

You can switch between projects by right clicking on the project in the Solution Explorer, and selecting Set as Startup Project.

The project consists of only 3 code files, and a few art assets! The code aims to be very readable, and is also rich with comments to explain less intuitive items.

Questions or problems?

If you've got questions about how this works, or how to get it running, let me know over in the Issues tab! Alternatively, you can find me online over on Twitter - @koujaku, feel free to send me a note there too!