WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-16-2013, 07:05 AM
mshukun mshukun is offline
Member
 
Join Date: Jan 2013
Posts: 32
Html and vizlink on Oculus HMD

We have been developing research applications for the Oculus and zSight HMDs. We would kindly like to ask two questions regarding the Oculus HMD.

The first question is that html using vizhtml does not show on full screen mode. How might we accomplish this?

The second question regards the code below:
viz.link( viz.Mouse , viz.addTexQuad(viz.SCREEN,texture=viz.add('crossha ir.png')) )

Using the Oculus HMD, we see two 'crosshair' images (one for the left eye and the other for the right eye). How could we get a single correct 'crosshair' image using the Oculus HMD?

We very much appreciate your assistance in this regard. Thank you in advance.
Reply With Quote
  #2  
Old 10-17-2013, 03:19 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
You can set the position and size of the html form:
Code:
vizhtml.displayCode(html,pos=[0,0],size=[800,600])
Try placing the texture quad in world coordinates:
Code:
import viz
import vizmat
import vizact
viz.go()

viz.add('dojo.osgb')

quad = viz.addTexQuad(texture=viz.add('crosshair.png'),scale=[0.03,0.03,0])
quad.disable(viz.DEPTH_TEST)
quad.drawOrder(10)
quad.billboard()

def updateCrosshair():
	line = viz.MainWindow.screenToWorld(viz.mouse.getPosition())
	worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.2)
	quad.setPosition(worldPos)
	
vizact.onupdate(0,updateCrosshair)
Reply With Quote
  #3  
Old 10-18-2013, 10:19 AM
mshukun mshukun is offline
Member
 
Join Date: Jan 2013
Posts: 32
Dear Jeff,

Thank you so much for your response. We have tested the provided code for the Oculus HMD. Thank you so much for your help, the html problem is solved; however, we still see two 'crosshair' images when We tested your provided code (adding the code below):

import oculus
hmd = oculus.Rift()
viz.link(hmd.getSensor(), viz.MainView)

The same issue was also displayed when we tested vizinfo. We did not have this issue with zSight. We are guessing that the problem may be because the images for left eye and right eye are mirrored positions and consequently the left and right images are required to be slightly different (for a stereoscopic view), but we are not sure. We appreciate your assistance again in this regard.

Thank you in advance.
Reply With Quote
  #4  
Old 10-30-2013, 09:56 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
GUIs and texture quads need to be placed in world space in order to get fused correctly with the Oculus.

Try adjusting the value of the crosshair distance in the line below:
Code:
worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.2)
to:
Code:
worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.5)
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


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


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