![]() |
#1
|
|||
|
|||
Duplicating screens
Hi guys,
I work with the HMD Oculus Rift and a second Display (Monitor). What I want is that the HMD shows the virtual reality and the second Monitor as well. But when using the Oculus Rift system, Vizard splits the Screen in the middle in two pictures (for the left and right eye, see uploaded picture). Now the problem, if I simply just duplicate the monitors via Windows the second Monitor also shows the split screen modus (like the Oculus Rift). So is there a chance that the HMD shows the virtual reality in the split screen mode and the extended monitor as a usual non split screen mode? Thanks a lot for helping, Patrick ----- Code: import viz import vizact import oculus import vizshape import vizcam hmd = oculus.Rift() sensor = hmd.getSensor() viz.link(hmd.getSensor(), viz.MainView) viz.go() scene = viz.addChild('dojo.osgb') viz.move([0,-1,-5]) ---- |
#2
|
|||
|
|||
One way to do this would be to let Vizard's application window span the entire width of the oculus and your external monitor. Then you can have 2 sub-windows but have one cover the width of the oculus and the next cover the width of the external monitor. If your monitor is not the same resolution as the oculus, you'll need to figure out exactly how to size and position your sub windows. You Also need to take into consideration where the external monitor is relative to the oculus e.g. left or right. The following example works on an Oculus running at 1080 with another monitor to the right of it at the same resolution.
Code:
import viz import oculus viz.go() #set your full screen rectangle to be exactly double the width of 1920x1080 viz.window.setFullscreenRectangle([0,0,1920*2,1080]) viz.window.setFullscreen(1) #create a subwindow for the mono view monoWindow = viz.addWindow() #set the width of the subwindow to be half monoWindow.setSize(.5,1) #position the subwindow to start half way monoWindow.setPosition(.5,1) #render the main window in stereo for the oculus oculus.Rift( window=viz.MainWindow ) #set window size to half width viz.MainWindow.setSize(.5,1) viz.add('piazza.osgb') Masaki |
#3
|
|||
|
|||
The code I use does the same trick but handles different resolutions automatically:
Code:
class Extend: def __init__(self): monitors = viz.window.getMonitorList() for m in monitors: if m.primary == True: ctrlsize = list(m.size) else: hmdsize = list(m.size) self.ctrlview = viz.addView() self.ctrlwndw = viz.addWindow() self.ctrlwndw.setSize(ctrlsize, mode=viz.WINDOW_PIXELS) self.ctrlwndw.setPosition(0,ctrlsize[1], mode=viz.WINDOW_PIXELS) self.ctrlwndw.setView(self.ctrlview) viz.MainWindow.setSize(hmdsize, mode=viz.WINDOW_PIXELS) viz.MainWindow.setPosition(ctrlsize,mode=viz.WINDOW_PIXELS) It does assume that the secondary monitor is on the right side of the primary. |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to switch between menu screens | RodRSpv | Vizard | 1 | 03-02-2009 02:18 PM |