WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   Html and vizlink on Oculus HMD (

mshukun 10-16-2013 07:05 AM

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.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.

Jeff 10-17-2013 03:19 PM

You can set the position and size of the html form:

Try placing the texture quad in world coordinates:

import viz
import vizmat
import vizact


quad = viz.addTexQuad(texture=viz.add('crosshair.png'),scale=[0.03,0.03,0])

def updateCrosshair():
        line = viz.MainWindow.screenToWorld(viz.mouse.getPosition())
        worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.2)

mshukun 10-18-2013 10:19 AM

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.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.

Jeff 10-30-2013 09:56 AM

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:

worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.2)

worldPos = vizmat.MoveAlongVector(line.begin,line.dir,0.5)

All times are GMT -7. The time now is 01:29 PM.

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