WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Oculus mirror window in mono (https://forum.worldviz.com/showthread.php?t=5721)

Jeff 05-13-2016 01:30 AM

Oculus mirror window in mono
 
Currently, the Oculus mirror window is rendered in stereo mode, showing both left and right eye views. To change this and render in mono use the following code. It can be added to the postInit function of the vizconnect file or directly in the script that adds the Oculus if you're not using vizconnect:

Code:

import vizact
import vizfx.postprocess

monoWindow = viz.addWindow(size=(1,1), pos=(0,1), scene=viz.addScene())
monoQuad = viz.addTexQuad(parent=viz.ORTHO, scene=monoWindow)
monoQuad.setBoxTransform(viz.BOX_ENABLED)
monoQuad.setTexQuadDisplayMode(viz.TEXQUAD_FILL)
texture = vizfx.postprocess.getEffectManager().getColorTexture()

def UpdateTexture():
    monoQuad.texture(texture)
vizact.onupdate(0, UpdateTexture)

viz.window.setFullscreenMonitor(2)
viz.window.setFullscreen(True)


fordprefect 07-21-2016 03:59 AM

Hi Jeff,

I think this is a very nice feature, but unfortunately it does not work out for us. When using
Code:

viz.window.setFullscreenMonitor(2)
the mono image is split across both eyes of the rift. Changing this to
Code:

viz.window.setFullscreenMonitor(1)
puts the window on the screen, but the rift does not show anything at all.

Maybe your code only works with the final consumer version? We are still on DK2...

Best Regards, Walter

Jeff 07-21-2016 05:30 AM

This was working for the DK2 as well. Which versions of Vizard and Oculus software are you running. What's the graphics card and have you tried the latest drivers?

fordprefect 07-21-2016 06:47 AM

Hi Jeff,
thanks for the ultra-quick response!

Vizard: 5.1

Oculus:
Config Utility V1.6 (SDK 0.5.0.1)
Display Driver 1.2.4.0

Graphics Card:
NVidia GeForce GTX675MX
Driver Version: 10.18.13.6175 (Jan 22, 2016)
[according to the Config Utility debugger - the latest driver according to NVidia would be V368.81 from July 14, 2016 - but the mismatch in version numbering confuses me a bit]

Best Regards, Walter

Jeff 07-21-2016 08:19 AM

I think that in versions prior to Vizard 5.3, the mirrored window is automatically rendered in mono when using Oculus direct mode. Starting from Vizard 5.3 and Oculus 0.8, direct mode is required and the mirrored window shows in stereo. This code is a fix for 5.3 and above.

You could try updating both Vizard and Oculus versions. However, as the graphics card does not meet the Oculus recommended specs I'm not sure it will work with more recent Oculus software.

fordprefect 07-21-2016 09:51 AM

That is exactly the reason why we did not upgrade Vizard on our production line for the moment, as the new versions would not support DK2 in combination with the graphics card.

I will keep in mind that it should render a mono window in direct mode, but IIRC our setup would not work in direct mode. Maybe more details when our technician is back from his annual leave, I'm just the programmer :D

Thanks, Walter

Jeff 09-13-2016 01:49 AM

As of Vizard 5.6 this code snippet is no longer necessary, use the setMonoMirror command instead. See the Oculus page for more information.


All times are GMT -7. The time now is 03:19 AM.

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