WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   3D text oculus for right to left languages (

bbb 01-04-2016 07:06 AM

3D text oculus for right to left languages
Hi all,
I'm trying to write instructions for participants in my experiment and having a problem with it using oculus due to two main things:
1.In my country we write from right to left - with vizinfo it works perfectly for scripts without oculus module but when i'm trying to do the same with oculus as display screen (direct display) i can see a double panel in my pc screen but not in the oculus.

Here is the relevant part of my code:
import viz
import oculus
import sys
import vizinfo



# Setup Oculus Rift HMD
hmd = oculus.Rift()
if not hmd.getSensor():
sys.exit('Oculus Rift not detected')

# Go fullscreen if HMD is in desktop display mode
if hmd.getSensor().getDisplayMode() == oculus.DISPLAY_DESKTOP:

#add model

#enable right-to-left languages:
viz.setOption('viz.text.bidirectional', 1)

#Add vizinfo panel to display instructions
taskInstruction= """ 7 rows of instructions """

info = vizinfo.add('')
infotxt = info.add(viz.TEXT3D,taskInstruction)

I tried to align to center but that didn't help.

2) Font size is small or the text being cut in the middle -
If i'm using hmd=oculus.Rift()
the text is being cut in the middle (tried to change position with hmd.assMessagePanel(taskInstruction,pos=(x,y,z)) with no success and no success with
panel=hmd.assMessagePanel(taskInstruction,pos=(x,y ,z))
panel.fontSize(different font size numbers).

The gui canvas present all but the font size is small
# Create canvas for display UI to user
canvas = viz.addGUICanvas()

# Setup events to toggle UI
#vizact.onkeydown(' ', canvas.visible, viz.TOGGLE)

# Add info panel with instructions and controls
panel = vizinfo.InfoPanel(taskInstruction, title=' ', key=' ', icon=False, align=viz.ALIGN_CENTER, parent=canvas,fontSize=30)

My problem with the gui canvas that it represnt the instructions from left to right which is wired reading it for right to left people.

I would really appreciate some help with it.

Have a wonderfull week and sorry for the long message.

Jeff 01-05-2016 10:19 PM

If you want to use the vizinfo panel with the Oculus you'll need to add it to the GUI canvas. The issue your having with the canvas is not clear to me. Can you post example code that shows it?

bbb 01-16-2016 07:02 AM

Thanks Jeff for your reply!
I tried using the gui canvas and managed to see all the instructions but
it's not comfortable for reading for right to left languages so i used another script for the instructions and another one for the experiment itself.

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

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