[Paraview] Stereo Rendering guts (non-cave) in ParaView...

Jeff Mauldin jamauld at sandia.gov
Thu Aug 4 19:25:58 EDT 2011


I am looking at some of the stereo rendering currently in ParaView 
(initially just by invoking the --stereo option at the command line).

I have quite a bit of experience with stereo rendering both as a user 
and as a developer, and I can immediately see some problems with the 
stereo rendering I'm getting using the --stereo option.  For example, 
objects at a far distance are not sufficiently far apart (objects at 
infinity would be projected on to the screen as far apart as the eyes, 
or almost so) and the left-eye/right-eye projections appear to be 
scaling linearly with the size of the rendering window (e.g. I make the 
rendering window twice as big and the left eye/right eye images become 
twice as far apart).

I'm wanting to do some significant digging here but the handling of the 
projection (both for a single eye and for stereo) is sufficiently 
complex that I don't have a good starting point.  I see that glFrustum 
is only used once in a test; gluPerspective is only used once in a demo; 
glOrtho is used several places but doesn't appear to be the general 
projection handling method.  I see glMatrixMode(GL_PROJECTION) used in 
the SetPixelData calls in vtkOpenGLRenderWindow.cxx, but it's not 
immediately clear what's going on there.  vtkCameraPass::Render() in 
vtkCameraPass.cxx is definitely doing projection stuff but I'm not 
immediately understanding it.

My question is this:  is there a good source for understanding the 
architecture of the camera handling and projection handling in 
ParaView?  If not, would it be possible to get a high level rundown that 
would let me understand the details of what is going on?  My experience 
has generally led me to believe that to get the best stereo you need to 
have a separate projection (GL_PROJECTION matrix) for each eye as well 
as a separate eye position (GL_MODELVIEW matrix) for each eye, and the 
projection for each eye needs to be off-axis.  And the projection needs 
to be parameterized by both an interpupilary distance and the physical 
size of the projection screen (i.e. rendering window).  Of course, it's 
possible to do all the matrix calculations (model view and projection) 
on the cpu side and stuff the resulting matrix into the OpenGL state 
however you like--I'm wondering if ParaView is doing this but I can't 
yet tell.  I think if I get a high-level understanding of the cameras 
and projection code as it is, I'll better understand how the projections 
are being handled.

Thanks for any help!




More information about the ParaView mailing list