WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-04-2016, 07:06 AM
bbb bbb is offline
Member
 
Join Date: Nov 2015
Posts: 46
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

viz.setMultiSample(4)
viz.go()
viz.collision(viz.ON)

hmd=oculus.Rift()

# 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:
viz.window.setFullscreen(True)

#add model
viz.addChild('watermazeBlack1a.osgb')

#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)
infotxt.fontSize(75)
infotxt.alignment(viz.ALIGN_RIGHT_TOP)

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()
hmd.addMessagePanel(taskInstruction)
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.
Reply With Quote
 


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
Oculus runtime disrupts clustering to mirror DK2 display performlabrit Vizard 1 01-23-2015 07:00 AM
Displaying screen text in 3D (Oculus Rift) pjayaram Vizard 2 05-27-2014 08:06 PM
input from a text file dig Vizard 5 10-20-2013 01:20 AM
Informationboxes with text snoopy78 Vizard 3 07-16-2009 10:23 AM
Vizard tech tip: Text to Speech Jeff Vizard 1 01-15-2009 09:39 PM


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


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