WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   monocular rendering in HMD (https://forum.worldviz.com/showthread.php?t=5743)

dcnieho 06-09-2016 09:22 AM

monocular rendering in HMD
 
Hi Guys,

Is there an easy way to only render to one of the eyes in an HMD, presenting black/nothing to the other? HMDs in question are the Rift DK2 and the HTC Vive (in case solutions are specific to the HMD). If that's not easily possible, I'll just look at getting an eye-patch, no worries.

Thanks!

Jeff 06-10-2016 12:44 AM

You could render a quad over just one eye:

Code:

fadeQuad = viz.addTexQuad(pos=[0,0,0.1],scale=[5000,5000,1])
fadeQuad.setReferenceFrame(viz.RF_VIEW)
fadeQuad.renderToEye(viz.LEFT_EYE)
fadeQuad.color(viz.BLACK)
fadeQuad.drawOrder(100)


dcnieho 06-13-2016 08:01 AM

Thanks! In my case the scene is real simple, renderToEye() to hide the objects i only want to see in one eye is even simpler. Nice!

Jeff 06-21-2016 12:29 AM

Rather than using a quad to hide the scene like I posted earlier, an easier solution is to set one eye to an empty scene:

Code:

import viz
import vizact
viz.go(viz.STEREO_HORZ)

viz.addChild('piazza.osgb')

#Show or hide scene 1 for the right eye
vizact.onkeydown('1',viz.MainWindow.setScene,1,eye=viz.RIGHT_EYE)
vizact.onkeydown('2',viz.MainWindow.setScene,2,eye=viz.RIGHT_EYE)



All times are GMT -7. The time now is 10:02 AM.

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