#1
|
|||
|
|||
Oculus runtime disrupts clustering to mirror DK2 display
Hello! I can't seem to get my DK2 display to mirror correctly on a second monitor, and it appears to be because of the Oculus Runtime.
I am following your suggestion to use clustering to create two independent views of the scene, one window inside the Oculus Rift DK2 that uses the oculus module, and 1 on my desktop monitor that does not. Although clustering does appear to create two windows, nothing is being rendered to the window that is not displayed on the DK2 unless I disable the oculus module. Strangely enough, this is true when the client is on the local machine, or when it's on another machine on the LAN. Example code pasted below. Note that you may have to change variables expMon to the ID of the desktop monitor and hmdMon to the ID of the Oculus Rift DK2. Note that it will work if you comment out lines 40-50 (the parts which enable the Oculus module). Thanks! Code:
import viz # Load environment piazza = viz.add('piazza.osgb') viz.add('piazza_animations.osgb') # Swap out sky with animated sky dome piazza.getChild('pz_skydome').remove() day = viz.add('sky_day.osgb') day.renderToBackground() expMon = 2 hmdMon = 1 with viz.cluster.MaskedContext(viz.ALLCLIENTS): viz.window.setFullscreenMonitor(expMon) #viz.setMultiSample(8) #viz.vsync viz.window.setFullscreen(True) #viz.setOption('viz.glFinish',1) piazza = viz.add('piazza.osgb') text1 = viz.add(viz.TEXT3D,'EXP') text1.alignment(viz.ALIGN_RIGHT_BOTTOM) text1.setPosition([0.5,0.5,0]) viz.go() with viz.cluster.MaskedContext(viz.MASTER): # The oculus is master import oculus viz.window.setFullscreenMonitor(hmdMon) viz.setMultiSample(8) viz.vsync ################################################################## # Setup Oculus Rift HMD hmd = oculus.Rift() if not hmd.getSensor(): sys.exit('Oculus Rift not detected') # Go fullscreen if HMD is in desktop display mode if hmd.getSensor().getDisplayMode() == oculus.DISPLAY_DESKTOP: viz.window.setFullscreen(True) ################################################################### text1 = viz.add(viz.TEXT3D,'HMD',parent=viz.SCREEN) text1.alignment(viz.ALIGN_RIGHT_BOTTOM) text1.setPosition([0.5,0.5,0]) viz.go() |
#2
|
|||
|
|||
oh, and to be clear:
Disabling the Oculus Runtime is not a satisfactory solution. It allows one to render to the desktop mirror of the in-helmet view. However, the in-helmet view no longer benefits from the necessary computations required for accurate display inside the Oculus Rift. So, with the runtime on, the in-helmet view is good, but the desktop mirror is not. With the runtime off, the desktop mirror is good, but the in helmet view is not. - gD |
Tags |
dk2, experimenter display, mirror display, oculus, oculus runtime |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Duplicate HMD display on primary monitor, with eyetracking info | performlabrit | Vizard | 3 | 09-19-2014 11:44 AM |