[vtkusers] Buggy behaviour of stereo with two renderers in one window

stefano mininel mininel.ml at gnbts.univ.trieste.it
Fri Jan 11 05:31:57 EST 2002


Hi everyone.
In an application showing in two renderers the extraction of brain
(renderer1) and skin (renderer2) from a medical segmentation (with
linked camera & light) I see stereo visualization is not (at all!)
correctly working!
With Interlaced mode: the two different viewports show respectively L&R
view of renderer1.
With CrystalEyes mode: when I set stereo on the frames "flicker"
correctly when seen without stereo hardware (due of course to the
alternate view of L&R image), but the interactor rotates/moves only the
left (or maybe right) view in each of the two viewports, leaving the
other view static, with a funny but not terribly useful effect!
The tcl code is:
"
vtkRenderer ren1
vtkRenderer ren2
vtkRenderWindow renWin
    renWin AddRenderer ren1
    renWin AddRenderer ren2
    renWin SetStereoCapableWindow 1
    renWin SetStereoTypeToCrystalEyes
......
......   #graphics pipeline
......
ren1 AddActor isoActorBrain
ren2 AddActor isoActorSkin
...... #a few other settings
ren1 SetViewport 0.0 0.0 0.5 1.0
ren2 SetViewport 0.5 0.0 1.0 1.0
iren Initialize
iren SetUserMethod {wm deiconify .vtkInteract}
#the "linking" of the two views (shouldn't be important for this bug I
think, but ... who knows?!)
ren2 SetActiveCamera [ren1 GetActiveCamera]
vtkLight lgt
eval lgt SetPosition [[ren1 GetActiveCamera] GetPosition]
ren1 AddLight lgt
ren2 AddLight lgt
wm withdraw .
"

I was forgetting to add it's vtk3.2.
Is there something wrong in my code or is it a bug in vtk's management
of the stereo visualization with two renderers?
Thanks in advance for any tip or help!

    Stefano Mininel





More information about the vtkusers mailing list