VR Dashboard Development

Introduction

Idea

Technical Aspects

  • 3D Engine for building and rendering the virtual environment.
  • VR headset integration for:
    • rendering an image specifically for stereoscopic vision
    • motion tracking
    • tracking navigation in the virtual environment
  • Realtime textures generation for regular drawings updates on the whiteboard.
  • Web server for persisting the state of the virtual environment, that is to include:
    • concurrent access to the state storage
    • quick networking for real-time state synchronization with clients
  • Terrain
  • Skybox
  • A set of static objects for diversifying the environment
Pic 1. Main scene

VR Integration

Pic 2. Prefabs for Oculus VR

Real-time Texture Generation

  • Raycasting to define the point of a hand and a whiteboard contact
  • Custom texture shader to update the drawing on the whiteboard regularly

Raycasting

// Defined as a class field to avoid allocations on every frame.
RaycastHit[] _raycastResults = new RaycastHit[NHits];
// Called when the user presses trigger on a controller.
int resultsCount = Physics.RaycastNonAlloc(
raycastSourcePosition,
raycastSourceForwardVector,
_raycastResults,
raycastLength,
raycastLayerMask);
for (int i = 0; i < resultsCount; i++)
{
RaycastHit hit = _raycastResults[i];
// Here we check if the raycast hit the board.
}
}

Custom Texture Shader

Pic 3. Shaders configuration
Pic 4. Shader itself in the editing window
  • If the pixel is black, the value is taken from the board texture
  • If the pixel is white, the marker color is chosen

Web Server

  • ASP app with API to set an initial connection
  • UDP streams for the quickest state transmission
  • Orleans Core to store statuses with a concurrent access

ASP API

UDP Streams

Orleans

Conclusion

About us

Akvelon company official logo

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store