EnlitHamster / VtkUnityWorkbench

VTK Unity plugin enabling visualization creation in VR
9 stars 0 forks source link

VtkUnityWorkbench - An All-In-One VR visualization workbench

This is the main repository for the code from the my Master Thesis. Other than me, a number of BSc students have made their theses based on this and I will try to keep the list updated with the different updates, new features and toolkit components that are added.

This Unity plugin is composed of a underlying architecture that connects VTK and Unity using a shared OpenGL context (see Wheeler et al.'s plugin on which this is based here) and a toolbox of UI components that are called for interactive manipulation through introspection on the VTK classes. In particular, these components are to be compounded in order to create a modular UI where the data for the VTK pipelines can be inserted.

If you want to contribute, there a number of parts where you could do so. If you are more interested in the UI part of the plugin, you can develop or refine the UI components in the Toolbox. If you want to enhance or expand the architecture you are free to do so. You can fork this repository but we ask you to open a pull request when you are at a stable stage in your development so we can maintain this tool updated and running rather than fragmenting it in numerous repositories.

Installation

Requirements

Setup

Building VTK

The compilation of the VTK library could take up to two hours depending on the performances of your computer. If it takes longer than that, we suggest you switch to a more powerful workstation for ease of development, as otherwise it could become very difficult and stressful.

Building VtkUnityWorkbench

At the end of this procedure, you should have some main crucial files:

Setting up for Unity

First of all, we need now to install VTK Python somewhere accessible to Python. We strongly recommend doing this installing it in the global Python install directory %PYTHONDIR%/Lib/site-packages, by copying in there %WORKSPACE%/Vtk/Install/lib/python3.7/site-packages/vtk, and then the contents of %WORKSPACE%/Vtk/Install/bin inside %PYTHONDIR%/Lib/site-packages/vtk (or to any place within the PATH environmental variable, the important thing is that Python must be able to access the DLL files). To test whether this works, run a command line terminal, open the Python interpreter python and run import vtk. If it returns no error, VTK Python should be correctly installed.

At the moment, VtkUnityWorkbench does not support virtual environments, but it is a feature which we plan to introduce soon.

From here on we will refer to %WORKSPACE%/VtkUnityWorkbench/Source/VtkToUnityExample/ as %UNITYDIR%. Copy the contents of %PLUGINDIR%/Install into %UNITYDIR%/Assets/VtkToUnity/vtktounitybinary/Plugins/x86_64/. Add %UNITYDIR% to your Unity Hub projects and download the correct Unity version. This should be enough to have your setup ready to go.

Notes

Roadmap

A number of outstanding issues are still open regarding the Workbench. We aim at producing a solution that is stream-lined and ready-for-use. As such, our most important objectives are: