lucie lemonnier wrote:
Hi,

I want to create a virtual reality application with OSG in an immersive 
environment (workbench cf. attached file) with head-tracking and stereoscopy, 
...
 I want to implement the head-tracking with the stereoscopy. I get the values 
of position and orientation of the head-tracker with VRPN.
How do I proceed to update the view? What should I update for the camera (view matrix, projection matrix, etc.) according to the data of the head-tracker? What should I change otherwise knowing that I must take into account the stereoscopy?

That's a fairly complex setup. You'll at least have two views/cameras going on (one for the horizontal surface, and another for the vertical). You'll primarily need to update the projection matrix based on the head tracking data, and the projections are going to be oblique (i.e.: not orthogonal). You'll probably want to look for a paper or two on how to do this properly, as these can be a little tricky to get just right.

I'm not sure if OSG's built-in stereo support will be adequate in this case, either. I haven't played with it much, though, so I could be wrong about that. If I'm right, you may need to figure a way to have two cameras per surface (one per eye), and update their projections independently.

In any case you can update the projection from a Camera update callback, or you can just inject your code into the frame loop, like this:

while (!viewer.done())
{
  headPosition = getTrackerData();
  updateProjections(headPosition);

  viewer.frame();
}


Hope this helps...

--"J"



_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to