Stereokit – Open-source mixed reality library by Microsoft
github.com
github.com
(the actually great thing is that the engine exposes a plain C API: https://github.com/StereoKit/StereoKit/blob/master/StereoKit...)
PS: double-kudos for making the API C99 designated-init-friendly, at least as far I can see from skimming over the source (e.g. "zero means default": https://github.com/StereoKit/StereoKit/blob/1bf86b281e883041...)
Language bindings have always been a part of the long-term plan, C# is just the golden path we've optimized for! A good number of people do also use the C API, and there's some community driven effort to create rust bindings as well.
The *Kit libraries from Apple are always capitalized. UIKit, SceneKit, WebKit, etc. The generic use of *kit for other libraries is pretty common though.
Besides, the project looks really interesting, I'll have a look into it.
Unity is the de facto choice for XR developers but it’s a poor application framework. Something like StereoKit that caters to non-game devs and can provide rendering, a flexible interaction model, UI, and a good multi-user app model could really steal Unity’s thunder for multi-platform development.
And then yeah, if you're building apps, and not making a game engine, there's a lot of things you decide differently about the architecture! Like StereoKit's asset pipeline works at runtime, with user-space formats like GLTF. You can load up StereoKit's built-in file picker, and bring in an image or 3D model with 3 or 4 lines of code! Or grab it from a REST API, whatever.
Any plans for AR support?
I was bucketing HL, Quest pass through, etc as MR and AR as being phone/screen based.
For example, I have been impressed by MRTK's AR support as a potential XR(?) framework (but Unity and the setup is the chore for experimentation)
Hypothetical on the "someday", are OpenXR and WebXR related? As in, could WebXR enable StereoKit to be AR "someday" before ARCore/Kit?
On the "Someday" side of things, we have been actively working on WASM/WebXR support for StereoKit! It's a bigger feature that may still take some time, but the Simulator already runs in a browser from the C side, with the C# side mostly working. WebXR comes after that, and I've done some proof-of-concept work there to make sure it's feasible, which it totally is!
This all sounds super exciting.
(@koujaku)
MRTK for Unity benefits from the support of having the entire feature set of Unity with it, but it also comes with the complexity and knowledge requirements of a complex game engine. Game developers may like this a lot, but it is a lot to take in these days, and is way overkill for many applications.
StereoKit benefits from a simpler XR focused feature set, app focused design, and better integration with the normal C# ecosystem. It's basically just a Nuget package, so it's much more familiar to developers that come from a normal C# background, and can benefit from other libraries on Nuget! There's a lot of other details here too, I've done some pretty detailed talks that get into the weeds of the subject, should be able to find a handful on YouTube :)
You end up with issues where the nuget package will not have meta files, will have multiple targets that unity does not support and will take tweaking to get things compiling again.
Are examples of its use for a traditional desktop use? Like screen space UI. And maybe mobile touch input? Or are both of those out of scope and XR is the focus. I am wanting to try a side project in it - but hoping to make it both VR+Desktop.
To make this related, I was prompted to this thought by the fact that the list of supported platforms does not include macOS
There's probably no VR plans for macOS ever. Apple's version of VR, whatever it ends up being, will definitely not be a tethered experience. It's most likely we'll see a specific OS variant like with watchOS when/if they do it.
The current implementation of SDF conversion is just a tad too slow to make on-demand glyph rendering comfortable right now, so there's a bit of additional optimization work that needs done before we can switch to that. We were just prioritizing language support over text clarity to start with.
I'd say it's primarily a question of polish and feel! Those that can't spot it right away would still prefer SDF fonts in a side-by-side, and the difference becomes much more clear if you start getting your head really close to the text. I consider it to be an essential feature for a 1.0 version, but not a blocker for right now.
The current raster technique should actually be fine for smaller text, there's some super-sampling going on in the shader that should help a bit here too! I'm not entirely certain what else could be improved on in this case besides font selection, I'd be open to suggestions or tips :)
Something like https://github.com/servo/pathfinder (newer) and as you mentioned SDF (older) are the latest approaches.
SDF is probably still the most realistic path for now, but I guess that may depend a bit on what comes up :)