[vtkusers] Side-by-side stereo animations with vtk?

stefano mininel mininel.ml at gnbts.univ.trieste.it
Fri Dec 7 05:49:43 EST 2001


I'm using vtk 3.1.2 on Win2000, both with tcl/tk 8.3 and with VC++.
Creating an mpeg animation with tcl, following the instructions given at
"http://www.cs.utah.edu/~cs5630/intro/anim.html" and using "output.tcl"
of the tutorial as framework was not difficult.
Now I'd like to create a side-by-side stereo mpeg. It would be possible
to simply save two series of PPM images for the right and left view and
manually compress them horizontally and put them side-by-side in an
image editor creating the movie with the output of such a work.
But I hoped in something less menial.
I planned to use the SaveImageAsPPM on a render window with 2 renderers
(rendererL & rendererR) on 2 viewports.
Two problems:

1) each of the 2 views must be "compressed" horizontally (by a 2 factor)
for the side-by-side stereo method to work. Is there a way to obtain
this in vtk?

2) I rememberer the existence of the "SetStereoTypeToLeft" and
"...ToRight" methods and hoped to use them. But then I realized they are
vtkRenderWindow's methods while I should have, for example "rendererR
SetStereoTypeToRight".
Is there a similar "clean" way to do this anyway or I should brutally
"link" the positions of the two renderers' cameras, shifted by a small
and fixed azimuth?

Any tip or help appreciated. Thanks in advance.

    Stefano Mininel





More information about the vtkusers mailing list