[HN Gopher] Stereokit - open-source mixed reality library by Mic...
___________________________________________________________________
Stereokit - open-source mixed reality library by Microsoft
Author : yolo123
Score : 85 points
Date : 2022-07-20 16:33 UTC (6 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| lostmsu wrote:
| I see font rendering is not adapted to 3D in the screenshot, so
| it is not yet ready for serious UI work. I presume curves are not
| rendered in an adapted way either, so everything will look
| pixelated around the edges.
| koujaku wrote:
| StereoKit doesn't currently do SDF font rendering yet, no, but
| there is some shader work done to help make existing text a bit
| clearer than the naive case. It does support Unicode font
| rendering though, font glyphs are added to the font atlas on-
| demand to ensure that's a smooth and automatic experience!
|
| 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.
| wutwutwutwut wrote:
| Is it not possible to do serious UI work without fonts adapted
| to 3D?
| koujaku wrote:
| I would say that the majority of people don't notice
| StereoKit uses regular raster for font rendering! However,
| that number is definitely not zero, and there's definitely
| people that can spot it right away, as evidenced. Designers
| in particular would probably spot it right away.
|
| 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.
| lostmsu wrote:
| I actually worry more about looking at longer and smaller
| text in 3D. It is noticeably harder to read, which prevents
| many use cases. For instance, you would not read HN in VR
| using an RSS reader built with StereoKit.
| koujaku wrote:
| Ah yeah I think there's a collection of issues related to
| small text within XR! The biggest one is really pixel
| density on XR headsets, which is always an issue for
| small text, or far-away text. XR also can't benefit from
| sub-pixel approaches to font rendering either. Since you
| can always move further from text, there's also the IRL
| issue that the text is just too far to make out!
|
| 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 :)
| lostmsu wrote:
| I am not an expert in the area, just somebody who read up
| on it after realizing desktop in VR does not work out for
| me (and usually low res is not a problem, so it is about
| font aliasing).
|
| Something like https://github.com/servo/pathfinder
| (newer) and as you mentioned SDF (older) are the latest
| approaches.
| koujaku wrote:
| Thanks for the link! The path based approach has been of
| interest to me, but I wasn't aware of an implementation
| other than Slug, which I have been avoiding. Guess I can
| finally do some real research on that topic now! :D
|
| SDF is probably still the most realistic path for now,
| but I guess that may depend a bit on what comes up :)
| flohofwoe wrote:
| Kudos for the Zig and V examples (or rather example skeletons),
| how very un-Microsoft-like to venture into such bleeding edge
| territory ;)
|
| (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...)
| koujaku wrote:
| Thanks! Your work has actually been quite an inspiration for me
| personally, I've definitely picked up a few of your tricks here
| and there :)
|
| 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.
| kensai wrote:
| I wonder if it can be embedded in the future in Unity.
| koujaku wrote:
| StereoKit is an alternative to Unity that skips all the bloat,
| doesn't really work in concert with it. You could take some
| inspiration from StereoKit, and maybe port some code snippets,
| but you're better off using something like the MRTK if you're
| working in Unity!
| Vermeulen wrote:
| Stereokit is fantastic. Ive been looking for a .net game engine
| to try - and love the runtime asset importing.
|
| 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.
| koujaku wrote:
| StereoKit very much prioritizes XR, I don't think I'd recommend
| doing traditional flat or hybrid XR/flat experiences with it!
| You might be able to do some flat 3d content, but the built-in
| UI won't be very helpful in this environment.
| verdverm wrote:
| How does this relate to or overlap with Microsoft MRTK?
| https://github.com/microsoft/MixedRealityToolkit-Unity
|
| (@koujaku)
| koujaku wrote:
| StereoKit and MRTK are currently part of the same team, so
| these people are my co-workers! :) We swap techniques, code,
| share design docs, etc. StereoKit joined the MR Middleware team
| towards the start of this year, and over time you'll likely see
| StereoKit move much closer to the Microsoft MRDL (Mixed Reality
| Design Language) and pick up similar features.
| jonhohle wrote:
| Somewhat meta, but why would Microsoft I use the Kit suffix which
| has been widely used by Apple adopted from NeXT?
| koujaku wrote:
| That'd be my fault, me and my co-workers were working with a
| lot of tools that had the "Kit" suffix when we started on it :O
| Apple's definitely not the only one who does it!
| wutwutwutwut wrote:
| Because the term is not allocated specifically to Apple.
| tokinonagare wrote:
| For the same reason they registered the domain
| typescriptlang.org instead of typescript.org: riding on the
| hype train created by others.
|
| Besides, the project looks really interesting, I'll have a look
| into it.
| evan_ wrote:
| I think they probably used typescriptlang.org because
| typescript.org was registered in 2006 for a CMS called
| Typescript.
| wutwutwutwut wrote:
| What is the hype train you associate with typescriptlang.org?
| "Lang"?
| trzy wrote:
| The time has never been better for a new "game engine" or 3D app
| framework. Unity is trying to be everything for everyone and
| hasn't done a great job of taking care of its core audience:
| indie game developers.
|
| 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.
| koujaku wrote:
| StereoKit started around 3 years ago, when the first pieces of
| OpenXR started coming out! OpenXR's native experience really
| showed just how good XR development _could_ be, and so we built
| StereoKit around that :)
|
| 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.
| matrixcubed wrote:
| I'd recommend you take a look at Godot. With in-built VR and C#
| support, a new major version peeking over the horizon, and
| many, many Unity devs coming over due to recent fallout in
| those circles, the time truly has never been better.
| creativenolo wrote:
| StereoKit seems like straight up cut to the fun. In my little
| free time all the other VR & MR platforms have so much cruft.
| Unity, endless configuration. Unreal, clone an fork of it and
| build it. Please I want to play & occasionally teach.
|
| Any plans for AR support?
| koujaku wrote:
| StereoKit was initially created with HoloLens 2 in mind, so it
| does plenty of AR! Also works on a North Star on Linux, as well
| as Varjo and Quest's passthrough AR. The only catch there is it
| doesn't do phone based AR like AR Core/Kit. Maybe someday, but
| for now StereoKit is focused on OpenXR compatible devices.
| creativenolo wrote:
| Thanks for the reply (and great work on Stereokit)
|
| 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?
| koujaku wrote:
| Haha, thanks! The terminology gradient gets pretty wild
| sometimes :)
|
| 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!
| creativenolo wrote:
| Amazing. Just noticed I missed WASM in the github README
| (as I sit down to clone it).
|
| This all sounds super exciting.
___________________________________________________________________
(page generated 2022-07-20 23:00 UTC)