Upgrade to Pro — share decks privately, control downloads, hide ads and more …

StereoKit: The Open Source SDK for VR/MR

Adora Nwodo
February 25, 2021

StereoKit: The Open Source SDK for VR/MR

Adora Nwodo

February 25, 2021
Tweet

More Decks by Adora Nwodo

Other Decks in Technology

Transcript

  1. Hi, I’m Adora! Software Engineer, Microsoft Mixed Reality Tech Content

    Creator, AdoraHack Advisory Board, VRARA Nigeria Co-Founder, unStack Twitter @adoranwodo
  2. StereoKit is designed to solve issues that occur when using

    a game engine to create a Mixed Reality application or tool. Game engines are one of the few places you can currently go to get rendering functionality out of the box, but they lack features that would really streamline MR application development. @adoranwodo
  3. StereoKit uses an immediate mode UI system. Since very little

    state is stored, you can add, remove and update your UI elements by writing code. You get to keep track of your data yourself. YOU’RE IN CONTROL . @adoranwodo
  4. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  5. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  6. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  7. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  8. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  9. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  10. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  11. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  12. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  13. STEREOKIT FEATURES: • Platforms: HoloLens 2, Windows Mixed Reality, Oculus

    Desktop, SteamVR, eventually everywhere OpenXR is! • Builds your application in seconds, not minutes • Input: articulated hands, pointers, keyboard/mouse • Easy and powerful UI and interactions • Model formats: .gltf, .glb, .fbx(partial), .obj, .stl, procedural • Texture formats: .jpg, .png, .tga, .bmp, .psd, .gif, .hdr, .pic, equirectangular cubemap, procedural • Runtime asset loading • Physics • Performance-by-default render pipeline • Flexible shader/material system @adoranwodo
  14. THINGS YOU NEED. • Visual Studio 2019 • An OpenXR

    runtime • StereoKit Visual Studio Template (or NuGet Package). • Enable developer mode for UWP/HoloLens builds @adoranwodo
  15. TEMPLATE CODE: using StereoKit; class Program { static void Main(string[]

    args) { StereoKitApp.Initialize("StereoKitMinimum"); while (StereoKitApp.Step(() => { Default.MeshSphere.Draw(Default.Material, Matrix.Identity); })); StereoKitApp.Shutdown(); } } @adoranwodo
  16. Pose windowPose = new Pose(-.4f, 0, 0, Quat.LookDir(1,0,1)); bool showHeader

    = true; float slider = 0.5f; Sprite powerSprite = Sprite.FromFile("power.png", SpriteType.Single); @adoranwodo
  17. REST OF THE UI CODE. // Begin Window UI.WindowBegin("Window", ref

    windowPose, new Vec2(20, 0) * U.cm, showHeader?UIWin.Normal:UIWin.Body); @adoranwodo
  18. REST OF THE UI CODE. // Begin Window UI.WindowBegin("Window", ref

    windowPose, new Vec2(20, 0) * U.cm, showHeader?UIWin.Normal:UIWin.Body); // Toggle Button UI.Toggle("Show Header", ref showHeader); @adoranwodo
  19. REST OF THE UI CODE. // Begin Window UI.WindowBegin("Window", ref

    windowPose, new Vec2(20, 0) * U.cm, showHeader?UIWin.Normal:UIWin.Body); // Toggle Button UI.Toggle("Show Header", ref showHeader); // Slider UI.Label("Slide"); UI.SameLine(); UI.HSlider("slider", ref slider, 0, 1, 0.2f, 72 * U.mm); @adoranwodo
  20. REST OF THE UI CODE. // Begin Window UI.WindowBegin("Window", ref

    windowPose, new Vec2(20, 0) * U.cm, showHeader?UIWin.Normal:UIWin.Body); // Toggle Button UI.Toggle("Show Header", ref showHeader); // Slider UI.Label("Slide"); UI.SameLine(); UI.HSlider("slider", ref slider, 0, 1, 0.2f, 72 * U.mm); // Button if (UI.ButtonRound("Exit", powerSprite)) StereoKitApp.Quit(); @adoranwodo
  21. REST OF THE UI CODE. // Begin Window UI.WindowBegin("Window", ref

    windowPose, new Vec2(20, 0) * U.cm, showHeader?UIWin.Normal:UIWin.Body); // Toggle Button UI.Toggle("Show Header", ref showHeader); // Slider UI.Label("Slide"); UI.SameLine(); UI.HSlider("slider", ref slider, 0, 1, 0.2f, 72 * U.mm); // Button if (UI.ButtonRound("Exit", powerSprite)) StereoKitApp.Quit(); // End Window UI.WindowEnd(); @adoranwodo
  22. OTHER LINKS: • StereoKit Official Website https://stereokit.net/ • StereoKit Official

    Source Code https://github.com/maluoi/StereoKit/ • Sample Demos https://github.com/maluoi/StereoKit/tree/master/Examples/StereoKitTest/Demos @adoranwodo