[vtkusers] new stereo type "anaglyph" added to vtkRenderWindow
Michael Halle
mhalle at bwh.harvard.edu
Mon Aug 9 11:37:22 EDT 2004
I've just added a new type of stereo rendering to vtk: anaglyph mode.
Anaglyph is the formal name for using color to encode 3D left/right
views. vtk has always had "red-blue" mode, which is a subset of
anaglyphs, but the new anaglyph mode improves upon the existing
(and still available) red-blue mode by including some object color
and allowing the colors of the left/right views to be selected.
By default, images rendered in anaglyph mode look much better than
red-blue mode in both 2D and 3D.
With anaglyph mode, you can retain at least some of the color of
your original scene. There's a parameter called
"AnaglyphColorSaturation" that controls how much of the original
color is maintained in the output image: 0.0 contains none, 1.0
contains all. For most images, you can get by with including
some color, but include too much and the image becomes difficult
to view in 3D. The default is 0.65.
Anaglyph mode also allows you to choose which color channels
you want to use for stereo. By default, it uses red-cyan,
which has become more popular than red-blue for on-line
viewing because the images aren't strongly tinted. (The
Mars rover pictures, for instance, are red-cyan). Red-cyan
glasses are available widely (http://www.berezin.com/3d sells them
in both paper and higher quality frames, and americanpaperoptics.com
can do custom glasses in bulk).
The stereo primary colors can be changed using the AnaglyphColorMask.
This pair of values controls which input channels are output
into which final image channels. Using this mechanism, you
could use try red-blue or red-green (or even yellow-blue) instead
of red-cyan. Not a highly-sought feature to be sure, but perhaps
useful for some applications.
I've checked in the changes to both VTK and VTK4 nightly releases.
At some point, it might make sense to make the vtk default stereo
mode be Anaglyph mode, since red-blue images just don't look all
that good.
Please send me any feedback you might have about this new change.
Michael Halle
mhalle @ bwh.harvard.edu
More information about the vtkusers
mailing list