WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-02-2015, 06:19 AM
Rennschu Rennschu is offline
Member
 
Join Date: Sep 2015
Posts: 14
vizcave coordinates

Hello,

I am using a 3DMonitor with shutter-glasses and a chinrest to stable the user's head. I use vizcave since I want to apply an asymmetric view frustrum. I would like to set the origin of the coordinate system to the upper left corner of my display (because this is the coordinate system my eye-tracker uses). However, my code does not seem to set the origin to the display corner.

import viz
import vizshape
import vizcave
import viztracker

width = 0.60
height = 0.335
distance = 0.70

PowerWall = vizcave.Wall(upperLeft=(0,0,0), upperRight=(width,0,0), lowerLeft=(0,-height,0), lowerRight=(width, -height, 0))

viz.go(viz.QUAD_BUFFER|viz.FULLSCREEN)

cave = vizcave.Cave()
cave.addWall(PowerWall)

head_tracker = viztracker.Keyboard6DOF()
head_tracker.setPosition (width/2, -height/2, -distance)
cave.setTracker(head_tracker)


What am I doing wrong? Could I set the origin to the display corner? If yes, how?

Also, I noticed, that although I used meters to specify the positions, my scaled objects seem to have the wrong size (far smaller). What do I need to consider concerning scale?


Greetings,
Rebekka
Reply With Quote
  #2  
Old 11-02-2015, 12:31 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
How are you determining the origin is not set properly? Try setting the origin to be directly below the user's head on the ground. Does that work for you?
Reply With Quote
  #3  
Old 11-02-2015, 10:33 PM
Rennschu Rennschu is offline
Member
 
Join Date: Sep 2015
Posts: 14
I am adding world axes with

world_axes = vizshape.addAxes()
X = viz.addText3D('X',pos=[0.1,0,0],color=viz.RED,scale=[0.3,0.3,0.3],parent=world_axes)
Y = viz.addText3D('Y',pos=[0,0.1,0],color=viz.GREEN,scale=[0.3,0.3,0.3],align=viz.ALIGN_CENTER_BASE,parent=world_axes)
Z = viz.addText3D('Z',pos=[0,0,0.1],color=viz.BLUE,scale=[0.3,0.3,0.3],align=viz.ALIGN_CENTER_BASE,parent=world_axes)


The world axes are not displayed in the upper left corner of the display, but somewhere behind and below the user.
How would I be able to set the upper left corner of the display to the origin of the world axes and define all positions in relation to that point?
Reply With Quote
  #4  
Old 11-10-2015, 11:15 PM
Rennschu Rennschu is offline
Member
 
Join Date: Sep 2015
Posts: 14
Bumping the thread as I've had no reply in over a week.

Do you need any additional information to answer my question?
Reply With Quote
  #5  
Old 11-11-2015, 04:58 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,453
Does it work as expected if you set the origin to be just below the user and calculate the wall coordinates from that location?
Reply With Quote
  #6  
Old 11-12-2015, 04:24 AM
Rennschu Rennschu is offline
Member
 
Join Date: Sep 2015
Posts: 14
Hi Jeff and everyone,

I found my mistake. I realized, I have to additionally set up a link between the head tracker and the main viewpoint as described in this thread:

http://forum.worldviz.com/showthread...hlight=vizcave

Adding this line solved my problem:
vizcave.CaveView(head_tracker)

Thanks,
Rebekka
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
Texture Coordinates in a Cube Map mshukun Vizard 2 05-10-2013 12:31 PM
Example code for VizCave stefs Vizard 6 01-08-2013 11:43 AM
How do coordinates in IS900 thransform into coordinates in vizard's world jacky Vizard 1 08-11-2011 10:44 AM
Head tracking, Flock of Birds and vizcave; how do I connect them? Arandia Vizard 2 08-26-2009 04:59 PM
viz.vertex coordinates lilio Vizard 6 05-16-2009 04:36 PM


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


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