@kwahookwahoo wrote: ↑Sat Sep 21, 2019 7:05 pmSteps to run the code:
1. Install pyopenvr, and sdl + opengl python packages
2. Run SteamVR
3. Paste the code into FreeCAD
1. The code renders two exactly same pictures - wrong buffer configuration?
2. Head tracking is not implemented yet
3. SoFrustumCamera needs further investigation. I'm trying to get necessary variables for the camera from IVRSystem::GetProjectionMatrix and IVRSystem::GetEyeToHeadTransform matrices, but maybe there is a better way?
1. Fix issues
2. Remove SDL dependency, use QOpenGLWidget (?)
3. Port to C++
4. Add basic navigation
5. Add controllers support (for navigation)
6. Move to OpenXR
Done. I updated the original post.
Code: Select all
rootScene = [SoSeparator()] * 2 ... for eye in range(2): m_sceneManager.setSceneGraph(rootScene[eye])
Rift S: Yes.
I would pose this as a question on the Open Issues subforum so it gets more exposure.kwahoo wrote: ↑Sun Sep 29, 2019 5:07 pmThere is one thing, that worries me - SoSceneManager::render is pretty slow with huge models. In the worst scenario I got ~13 fps and ~30% GPU utilisation. Using SoRenderManager (since event handling is not very important for VR) instead does not change much. Low fps and big latency (especially latency) makes this a very uncomfortable experience.
Maybe I can use SoGLRenderAction, and instead using Open Inventor camera, use pure OpenGL projection and model matrices, similar as shown here in the part Applying a Render Action Inside a GLX Window And then instead of traversing full scenegraph I could just manipulate matrices.