# PixSpace

A model viewer for projective Virtual Reality (VR). 

PixSpace is a successor to the VisionSpace software, based on OpenSceneGraph, 
maintained at the HITLabNZ and the VisionSpaceNG, based on Unity 
at the Graphics and Interaction Lab. 

PixSpace deals / plans to deal with:

- getting tracking data (position and orientation) from a VRPN server (OptiTrack or other)
- render composited stereo views allowing for non-linear distortions and overlapping screens
- loading 3D scene files (whatever bevy supports, ideally with asset reload on change) 
- providing a simple way to extend the system with interactions and custom VR devices
- allow for RPC access to control scenes and settings 

# TODO

* [x] custom projection matrices
* [~] build a system that updates a cameras frustum (w/ offaxis)
* [~] VRPN (https://github.com/seichter/vrpn-rs) - sync_client.rs seems to do what we need - issue it is Rust 2018
* [ ] multiple cameras
* [ ] render to texture

# Contributions / Notes

Though, I am mostly writing this software on my own, I often ask for help and fortunately FOSS 
people will be happy to help

@bevy@mastodon.social suggested the following three examples

https://github.com/bevyengine/bevy/blob/main/examples/3d/two_passes.rs
https://github.com/bevyengine/bevy/blob/main/examples/3d/split_screen.rs
https://github.com/bevyengine/bevy/blob/main/examples/3d/render_to_texture.rs

And ria8651 on bevy #rendering Discord channel explained pointed me towards reversed Z frustum 

further 

https://thxforthefish.com/posts/reverse_z/ 
https://vincent-p.github.io/posts/vulkan_perspective_matrix/