WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Duplicating screens (https://forum.worldviz.com/showthread.php?t=4960)

elpetto 02-24-2014 01:58 AM

Duplicating screens
 
1 Attachment(s)
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])

----

masaki 02-27-2014 04:50 PM

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')

The other option is to use a local cluster.

Masaki

Erikvdb 03-04-2014 01:35 AM

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)

This puts a normal, control window on your primary monitor and the viz.MainWindow on the secondary monitor, which would be your Oculus.
It does assume that the secondary monitor is on the right side of the primary.


All times are GMT -7. The time now is 10:17 PM.

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