WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-13-2016, 01:30 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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)
Reply With Quote
  #2  
Old 07-21-2016, 03:59 AM
fordprefect fordprefect is offline
Member
 
Join Date: Oct 2012
Location: Vienna, Austria, Europe
Posts: 39
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
__________________
21 is only half the truth.
Reply With Quote
  #3  
Old 07-21-2016, 05:30 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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?
Reply With Quote
  #4  
Old 07-21-2016, 06:47 AM
fordprefect fordprefect is offline
Member
 
Join Date: Oct 2012
Location: Vienna, Austria, Europe
Posts: 39
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
__________________
21 is only half the truth.
Reply With Quote
  #5  
Old 07-21-2016, 08:19 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
  #6  
Old 07-21-2016, 09:51 AM
fordprefect fordprefect is offline
Member
 
Join Date: Oct 2012
Location: Vienna, Austria, Europe
Posts: 39
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

Thanks, Walter
__________________
21 is only half the truth.
Reply With Quote
  #7  
Old 09-13-2016, 01:49 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
As of Vizard 5.6 this code snippet is no longer necessary, use the setMonoMirror command instead. See the Oculus page for more information.
Reply With Quote
Reply

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
Xbox controller and Oculus DK2 prilpi Vizard 17 03-28-2016 05:00 AM
3D text oculus for right to left languages bbb Vizard 2 01-16-2016 07:02 AM
Multiple post-process effects with oculus rift lklab Vizard 2 03-13-2015 01:48 PM
Oculus runtime disrupts clustering to mirror DK2 display performlabrit Vizard 1 01-23-2015 07:00 AM
Oculus DK1 and DK2 in Vizard 5 Jeff Vizard 3 10-02-2014 11:00 AM


All times are GMT -7. The time now is 04:50 AM.


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