Skip to content

MUVisualizationLab/CavePresentations

Repository files navigation

CavePresentations

Open Powerpoint Presentations in Unity, and view them in VR.

The VR setup uses MiddleVR, for use in large scale visualization environments such as the Marquette University Visualization Lab's Cave. This repository contains two parts: PPTConvert is a Python script that uses Powerpoint's API to convert a slideshow into a series of PNG images. The Unity project portion imports those images and applies them to prefab 3D objects which can be viewed like a powerpoint presentation in a 3D VR space. The converter supports automatic 3D layer separation, separating text, images, and backgrounds onto separate planes for a depth effect in VR. The converter can also detect if a file conversion is not needed, increasing performance greatly on subsequent launches.

PPTConvert requirements:

CavePresentation requirements:

  • Unity 6000.0.68 or later
  • MiddleVR 3.1.4

##Project Structure

  • The PPTConvert folder contains the Python script that performs the PowerPoint API connection and some image processing.
  • That script is compiled (by Nuitka) and the executable is placed in Assets/StreamingAssets/PPTConvert/PPTConvert.exe
  • The Unity script Assets/Slideshow/slideLoader.cs launches PPTConvert.exe as a subprocess.
    • PPTConvert.exe uses PowerPoint to render images in the background, with status reports appearing as a text object in the Unity scene.
    • Its output is a folder of PNG files in a temp folder, and JSON file containing metadata (such as slide notes)
    • When PPTConvert.exe is done, slideLoader loads in the JSON file and parses it.
    • slideLoader then loads every PNG file and creates prefabs for every slide.
    • sliderLoader then activates slideMaster and disables itself.
  • slideMaster handles the interaction and playback of the slideshow.

Documentation coming later.