WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-04-2016, 08: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
  #2  
Old 01-05-2016, 11:19 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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?
Reply With Quote
  #3  
Old 01-16-2016, 08:02 AM
bbb bbb is offline
Member
 
Join Date: Nov 2015
Posts: 46
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.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Oculus runtime disrupts clustering to mirror DK2 display performlabrit Vizard 1 01-23-2015 08:00 AM
Displaying screen text in 3D (Oculus Rift) pjayaram Vizard 2 05-27-2014 09:06 PM
input from a text file dig Vizard 5 10-20-2013 02:20 AM
Informationboxes with text snoopy78 Vizard 3 07-16-2009 11:23 AM
Vizard tech tip: Text to Speech Jeff Vizard 1 01-15-2009 10:39 PM


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


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