WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 02-24-2014, 01:58 AM
elpetto elpetto is offline
Join Date: Oct 2012
Posts: 5
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,

import viz
import vizact
import oculus
import vizshape
import vizcam

hmd = oculus.Rift()
sensor = hmd.getSensor(), viz.MainView)

scene = viz.addChild('dojo.osgb')

Attached Thumbnails
Click image for larger version

Name:	Oculus.jpg
Views:	745
Size:	739.2 KB
ID:	627  
Reply With Quote
Old 02-27-2014, 04:50 PM
masaki masaki is offline
Join Date: Jan 2008
Posts: 63
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.
import viz
import oculus


#set your full screen rectangle to be exactly double the width of 1920x1080

#create a subwindow for the mono view
monoWindow = viz.addWindow()
#set the width of the subwindow to be half
#position the subwindow to start half way 
#render the main window in stereo for the oculus
oculus.Rift( window=viz.MainWindow )
#set window size to half width

The other option is to use a local cluster.

Reply With Quote
Old 03-04-2014, 01:35 AM
Erikvdb Erikvdb is offline
Join Date: May 2013
Posts: 63
The code I use does the same trick but handles different resolutions automatically:

class Extend:
	def __init__(self):
		monitors = viz.window.getMonitorList()
		for m in monitors:
			if m.primary == True:
				ctrlsize = list(m.size)
				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)
		viz.MainWindow.setSize(hmdsize, 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.
Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to switch between menu screens RodRSpv Vizard 1 03-02-2009 02:18 PM

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

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