Share
Embed
StereoKit: The Open Source SDK for VR/MR
Adora Nwodo
February 25, 2021
Transcript
33 slides
-
Hi, I’m Adora! Software Engineer, Microsoft Mixed Reality Tech Content
Creator, AdoraHack Advisory Board, VRARA Nigeria Co-Founder, unStack Twitter @adoranwodo -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
THINGS YOU NEED. • Visual Studio 2019 • An OpenXR
runtime • StereoKit Visual Studio Template (or NuGet Package). • Enable developer mode for UWP/HoloLens builds @adoranwodo -
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 -
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 -
REST OF THE UI CODE. // Begin Window UI.WindowBegin("Window", ref
windowPose, new Vec2(20, 0) * U.cm, showHeader?UIWin.Normal:UIWin.Body); @adoranwodo -
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 -
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 -
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 -
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 -
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