WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Temporarily cease Oculus DK2 rendering or hide display (https://forum.worldviz.com/showthread.php?t=5741)

willpower2727 06-08-2016 08:30 AM

Temporarily cease Oculus DK2 rendering or hide display
 
I'm wondering if there is a way to momentarily stop rendering on the Oculus DK2? I'm looking to do something analogous to:

Code:

viz.setOption('viz.window.visible', 0)
I've tried this with my current setup and it hides the mirrored window on my PC's monitor but it does nothing to the rendering on the Oculus itself. Here is the code I use to setup the DK2:

Code:

import oculus

hmd = oculus.Rift()
if not hmd.getSensor():
        sys.exit('Oculus Rift not detected')
else:
        profile = hmd.getProfile()
        hmd.setIPD(profile.ipd)


# Setup navigation node and link to main view
global navigationNode
navigationNode = viz.addGroup()
global viewLink
viewLink = viz.link(navigationNode, viz.MainView)

Any ideas or methods I can use to hide/stop rendering on the DK2 without stopping the whole program?

Jeff 06-09-2016 04:53 AM

Does the following work?

Code:

viz.setOption('viz.window.visible', 0)
viz.MainWindow.visible(False)
hmd.remove()

Would rendering a quad over the scene to hide it work for you?

willpower2727 06-10-2016 08:23 AM

None of the options stop rendering or hide it or whatever on the hmd.

Code:

viz.MainWindow.visible(False)
Works at hiding the mirrored window on my PC's monitor but the scene is still being rendered on the HMD. Interestingly
Code:

hmd.remove()
Doesn't seem to do anything.

I will have difficulty in hiding the scene with a quad since the user is immersed in the scene (subject can walk around and interact with the scene). In order to hide the scene with a quad I'd have to have reliable information about the head position and orientation which in the scenarios where I want to hide things, this data is inaccurate.

Alternatively I think I'll try positioning a black sphere around the head when I want to hide the scene, so that only the position data needs to be robust.

dcnieho 06-13-2016 07:00 AM

You can use parent=viz.SCREEN to have an object in screen based coordinates instead of int eh virtual world. works with vizshape at least.

willpower2727 06-15-2016 07:40 AM

@dcnieho, that's a great idea, it works great and you were right I don't have to worry about setting the position.

Code:

global HideSphere
HideSphere = vizshape.addQuad(size=[1,1])
HideSphere.setParent(viz.SCREEN)
HideSphere.setPosition(0.5,0.5,0)
HideSphere.color(0,0,0)


dcnieho 09-07-2016 08:39 AM

Hi Jeff,

I wanted to note that the below:

Quote:

Originally Posted by willpower2727 (Post 18415)
None of the options stop rendering or hide it or whatever on the hmd.

Code:

viz.MainWindow.visible(False)
Works at hiding the mirrored window on my PC's monitor but the scene is still being rendered on the HMD.

Is also a symptom of not having access to the screen on the HMD through vizard. It could well be the same underlying problem as getting resolution of HMD, etc. all viz.MainWindow operations are for the window on the desktop, not the HMD screen.


All times are GMT -7. The time now is 07:48 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC