WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1  
Old 01-22-2015, 03:08 PM
performlabrit performlabrit is offline
Member
 
Join Date: Oct 2013
Posts: 77
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()
Reply With Quote
  #2  
Old 01-23-2015, 07:00 AM
performlabrit performlabrit is offline
Member
 
Join Date: Oct 2013
Posts: 77
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
Reply With Quote
Reply

Tags
dk2, experimenter display, mirror display, oculus, oculus runtime


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
Duplicate HMD display on primary monitor, with eyetracking info performlabrit Vizard 3 09-19-2014 10:44 AM


All times are GMT -7. The time now is 01:13 AM.


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