#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
You can set the position and size of the html form:
Code:
vizhtml.displayCode(html,pos=[0,0],size=[800,600]) 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) |
#3
|
|||
|
|||
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. |
#4
|
|||
|
|||
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) Code:
worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.5) |
Thread Tools | |
Display Modes | Rate This Thread |
|
|