WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-06-2008, 08:46 AM
michaelrepucci michaelrepucci is offline
Member
 
Join Date: Jul 2008
Posts: 53
Woops. Sorry those lines were left over from an immersive setup I had made. They weren't actually called in my current vizcave code.

Things looked "skewed" in the sense that I would expect the default position for the view to be at x=y=z=0 in world coordinates, with the "camera" looking down the positive z axis. That way if I drew an on-the-fly object centered at [0,0,1], it would appear directly in front of me. If I setup as above and start without stereo, then the scene looks like I expect. (Though given what you said, I don't understand what it really means to specify both position and orientation for the cave tracker, but then to render not in stereo. Is the frustum adjusted as if the viewer were a cyclops, or is the cave setup ignored?) But in stereo the view is directed away from that object.

Oh, I just figured out that how I define my single cave wall changes this view, but in a way that totally isn't clear to me. So if I use

Code:
upperLeft = [-1, 1, 1]
upperRight = [1, 1, 1]
lowerLeft = [-1, -1, 1]
lowerRight = [1, -1, 1]
wall = vizcave.Wall('wall',upperLeft,upperRight,lowerLeft,lowerRight)
then I get what I expect. Whereas if I use coordinates that describe the actual physical offsets of my screen from the zero point of my tracker device, then the view I get seems to correspond to (correct me if I'm wrong) sitting at the zero point of my device and looking at the center (or maybe upper-left) of the screen. When and how do I make a transformation to place this zero point somewhere else? Or should I just use my screen height and width without offsets?

Here's what I've come up with so far, though I'm not sure it's correct. Let me know what you think.

Code:
upperLeft = [-screenXOffset-screenWidth, screenYOffset+screenHeight, screenZOffset]
upperRight = [-screenXOffset, screenYOffset+screenHeight, screenZOffset]
lowerLeft = [-screenXOffset-screenWidth, screenYOffset, screenZOffset]
lowerRight = [-screenXOffset, screenYOffset, screenZOffset]

...

view = vizcave.CaveView(tracker)
view.setPosition([screenWidth/2+screenXOffset,0,-screenZOffset])
If I understand correctly, this moves my zero point directly below the center of the screen. It seems to work okay (though I'm not sure if it's perfect - just tested it quickly), but is it the right way to do this? Or is it possible to change the zero point of the sensor (VRPN) at some point earlier in the setup? Or do I specify my wall differently?

Thanks again for your help!
Reply With Quote
  #2  
Old 08-07-2008, 10:38 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The corner positions of the walls need to be in the same coordinate frame as the tracker you pass to the cave.setTracker() command. You do not need to apply any offsets to the data. If you pass an orientation tracker then vizcave will use the position and orientation of the trackers to extract the position of the left/right eyes for the stereo frustums. If you are not in stereo mode, then you will not see the effect of the modified left/right eye frustums.
Reply With Quote
Reply


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


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


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