[vtkusers] Re:stereo rendering with volumepro1000, not working properly?
Lisa Avila
lisa.avila at kitware.com
Wed Mar 10 10:04:25 EST 2004
Hi Dan,
>>If your ray cast mapper is not correctly working in stereo, then the
>>VolumePro mapper won't either - you are still using a version of VTK with
>>the "bug" in it. I know we fixed it on a branch - I'll have to check
>>tomorrow whether it is fixed on the main tree or not. The problem was
>>(maybe is) that the left/right flag was switched right after setting up
>>the camera for that eye - which means that by the time these volume
>>mappers asked for the current matrix the wrong one was returned.
>
>My VTK is a recent CVS build, and it looks like the bug was not fixed in
>that. It was built after Xmas.
>How can I check my present code for the bug fix?
That probably means the fix never made it from the branch to the main tree.
>So do you mean that the 2 images from the volpro1000 board are the same,
>and not really left and right eye images, but are just placed in different
>places....? Do you mean this happens with the
>intermixintersectinggeometryon flag causes this?
The IntermixIntesectingGeometryFlag changes the placement of the returned
images (in depth). There will always be two identical images - the matrix
that is sent to VLI is build from the camera position, focal point, and
parallel scale (none of which are changed between eyes for a stereo
projection I believe). When IntermixIntersectingGeometryFlag is off, then
the resulting image is placed at the center of the volume (in depth) so
that it should intermix well with other geometry in the scene that is in
front or behind it. When the flag is on, then the zbuffer is considered
when generating the image (this is passed to the board) and the resulting
image is drawn just in front of the bounding box of the volume.
>Surely the volumepro1000 board should be able to make 2 images , one from
>each eye, and send them to VTK in both perceptive and parallel modes, then
>it should just work right?
In VTK stereo is performed with an off-axis (sheared) projection matrix
applied to the current camera matrix. Although this does not entirely make
sense in parallel (you are trying to add depth cues to something where
depth is ignored in the projection matrix....) you are probably getting
some cues from the fact that each eye sees something slightly different. I
do not believe there is any way to set up a corresponding matrix (to what
VTK does) with VLI - in the version that existed when the mapper was
written VLI only supported orthogonal viewing matrices.
Also - you should not be using a perspective matrix with a VolumePro mapper
- it should be spewing out a bunch of warnings, although I believe it will
go ahead and render the image anyway pretending it has a parallel viewing
matrix. This will not be correct - you are rendering one object in the
scene with a different viewing matrix than all the others.
>Yes, I guess parallel stereo doesn't make physical or theoretical sense,
>BUT, at least using my setup and my eyes, the parallel image using
>isosurfaces "looks" good, and there is a good impression of depth...... so
>I suppose it might "work" for ray casting methods also. The thing is, at
>present only the parallel mode is able to zoom in and out using
>volumepro1000. The perspective mode using volumepro1000 does work, but not
>zooming, only spinning around.
>So it would be nice to use pseudo-nonsense-but-still-looks-ok stereo in
>parallel mode with the volumepro1000 mapper....
>I hope the VTK bug fix corrects this....?
Nope - fixing the "bug" will only fix the issue for ray casting (which can
create off-axis projections), not for the VolumePro mapper.
>If I can show people stereo3D real time zooming and spinning of their
>confocal microscope data, volume rendered using the volumepro1000 board,
>they and my boss will be very happy!
I think you'll have to either do some development for this, or look outside
of VTK for a solution (using VLI directly). You will also need to obtain
the perspective "option" from TeraRecon (I'm not sure what their
policy/pricing is on this). With this option you may be able to ask the
board to generate an off-axis projection for stereo.
Have you tried VolView 2.0? Stereo is a "hidden" feature of VolView (you
have to know to start it with the -3 option from a command line!) but does
work for both ray casting and 3D texture mapping. (VolView 2.0 does not
support the VolumePro). If you have a "supported" video card (like the
NVidia GeForce 3, 4, or FX, or the ATI Radeon 9700+) then you will get
interactive rendering rates with decent "interactive image quality" in
stereo (with perspective too).
Lisa
More information about the vtkusers
mailing list