WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
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
 


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 12:10 AM.


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