Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Panda3D OpenVR incompatibility with Render Pipeline #14

Closed
zurgeg opened this issue Jan 15, 2021 · 2 comments
Closed

[Bug] Panda3D OpenVR incompatibility with Render Pipeline #14

zurgeg opened this issue Jan 15, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@zurgeg
Copy link
Contributor

zurgeg commented Jan 15, 2021

While using render pipeline, Panda3D OpenVR runs into an issue where the scene where the sun and stuff can only be seen through the desktop window, and the objects can only be seen through the HMD.

I suspect that this may be caused by the Showbase initialized by Render Pipeline.

Then, upon changing the initialization from the standard way to the following:

        from rpcore import RenderPipeline, PointLight
        self.render_pipeline = RenderPipeline()
        self.render_pipeline.pre_showbase_init()
        ShowBase.__init__(self)
        self.vr = P3DOpenVR()
        self.vr.init()
        self.render_pipeline.create(self)

I get

Traceback (most recent call last):
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 319, in right_cb
   self.submit_texture(openvr.Eye_Left, self.left_texture)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 309, in submit_texture
   self.compositor.submit(eye, ovr_texture)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openvr\__init__.py", line 4360, in submit
   openvr.error_code.CompositorError.check_error_value(error)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openvr\error_code\__init__.py", line 23, in check_error_value
   raise error_class(error_value, message)
openvr.error_code.CompositorError_DoNotHaveFocus
Traceback (most recent call last):
 File "C:/Users/zurgE/OneDrive/Documents/Panda3D Render Pipeline Test/main.py", line 93, in <module>
   Application().run()
 File "C:/Users/zurgE/OneDrive/Documents/Panda3D Render Pipeline Test/main.py", line 24, in __init__
   self.render_pipeline.create(self)
 File "./renderpipeline\rpcore\render_pipeline.py", line 168, in create
   self.loading_screen.create()
 File "./renderpipeline\rpcore\gui\loading_screen.py", line 65, in create
   Globals.base.graphicsEngine.render_frame()
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 319, in right_cb
   self.submit_texture(openvr.Eye_Left, self.left_texture)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 309, in submit_texture
   self.compositor.submit(eye, ovr_texture)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openvr\__init__.py", line 4360, in submit
   openvr.error_code.CompositorError.check_error_value(error)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openvr\error_code\__init__.py", line 23, in check_error_value
   raise error_class(error_value, message)
openvr.error_code.CompositorError_DoNotHaveFocus

This makes me suspicious that the loading screen is causing some problems.

I'll try with it removed later and I'll see if it fixes it.

EDIT: Removing the loading screen sadly didn't fix the problem.

@el-dee
Copy link
Owner

el-dee commented Jan 15, 2021

The problem is that both RP and P3DOpenVR are ignorant of the existence of each other. And each of them redirect the scene rendering to their own rendering pipeline when they are initialized. Note that the same problem occurs with Panda3D's own post processing.

Adding support for Panda3D FilterManager is on my todo list, on the other hand adding support for RP is much more complicated at first sight.

@el-dee el-dee added the enhancement New feature or request label Jan 15, 2021
@zurgeg
Copy link
Contributor Author

zurgeg commented Jan 16, 2021

Ah alrighty...

So, in theory, we could let RP do it's thing to the scene then pass it through P3DOpenVR? I'm not very inclined to know how to do such a thing 😅

@el-dee el-dee closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants