[vtkusers] same camera on different viewpoints

jonathan grimm flymolo at gmail.com
Wed Jan 9 14:50:09 EST 2008


If you want CrystalEyes alternate frame stereo, vtk will do everything for
you.  Did you enable StereoCapableWindow?  Have you tested stereo on your
system with another app?

If you want the 2 separate images, you can create a RenderWindow with
StereoTypeToLeft and one with StereoModeTypeToRight.

On Jan 9, 2008 11:36 AM, Sicilia Judice <siciliajudice at gmail.com> wrote:

> Are you sure that the generation of the two views occurs internally??? The
> example I have found use this method (SetStereoTypeToCrystalEyes) but also
> create manually the stereo images...
>
>
> On 1/9/08, CLEMENTS, ROBERT <rclement at kent.edu> wrote:
> >
> >  If you are trying to use crystal eyes why not just
> > SetStereoTypeToCrystalEyes on the  renderwindow.  You don't get much control
> > over 3d rendering parameters (offset...), but everything is taken care of
> > internally by vtk, including the generation of the 2 views.  Also
> > ren2->SetActiveCamera(ren1->GetActiveCamera()); probably wouldn't work for
> > this application since the two viewpoints should actually be 2 different
> > views, consequently different cameras, right?
> >
> >
> > Rob
> >
> > Luca, I had tried that myself at one point:
> >
> >      ren2->SetActiveCamera(ren1->GetActiveCamera());
> >
> > but would get random crashes, has it been ok for you? I eventually had
> > to manually copy over camera parameters between the two cameras
> > instead to get the same effect.
> >
> > I think what Sicilia wants is to have the same interaction propagated
> > to all renderers (since the cameras may be setup in different
> > locations). This probably isn't a typical thing to do, normally you
> > want the camera location copied throughout all renderers instead. I
> > was looking into this but couldn't figure out myself how to Invoke()
> > the same interaction on another renderer. We can listen on Interaction
> > events on the render window's interactor, but not quite sure how to
> > propagate it to the other renderers.
> >
> > Mark
> >
> >
> > On Jan 9, 2008 8:52 AM, Sicilia Judice < siciliajudice at gmail.com> wrote:
> > > I think I am very near to finish this...
> > >
> > > Let me try to explain... I have to generate stereo images to use with
> > > Crystal Eyes... So, I have create two viewports, displayed vertically,
> > one
> > > over other... The upper viewport is the stereo image for one eye, and
> > the
> > > second one for the other eye. I have to put one of this images with a
> > > difference of 5° (the paralaxe). I was creating two cameras, each one
> > for
> > > one viewport. In the second camera I was using the method Azimuth(5).
> > But in
> > > this way, I was having to take care of the interaction, what I could
> > not
> > > done... Now I have try a different solution: I create only one camera
> > and
> > > set to both viewports. Now, any action with the mouse move the two
> > images
> > > together... But I have to translate the second image in 5°, and I do
> > not
> > > know how to do it... How can I translate an imagem in a viewport???
> > >
> > > ps.: sorry for the english, I am from Brazil!
> > >
> > > ps2.: thanks for the attention!!!
> > >
> > >
> > >
> > > On Jan 9, 2008 11:42 AM, Luca Pallozzi Lavorante <
> > lplavorante at gmail.com >
> > > wrote:
> > > >
> > > >
> > > >
> > > > Sicilia,
> > > > if you work in C++, let's say you have two viewports, with two
> > > corresponding instances of vtkRenderer, ren1 and ren2. Say that you
> > want to
> > > modify ren2´s camera according to whatever interaction you perform on
> > ren1
> > > (via a vtkRenderWindowInteractor). The command to accomplish that is :
> >
> > > >
> > > > ren2->SetActiveCamera(ren1->GetActiveCamera());
> > > >
> > > > Hope this help
> > > >
> > > >       Luca
> > > >
> > > > _______________________________________________
> > > > This is the private VTK discussion list.
> > > > Please keep messages on-topic. Check the FAQ at:
> > > http://www.vtk.org/Wiki/VTK_FAQ
> > > > Follow this link to subscribe/unsubscribe:
> > > > http://www.vtk.org/mailman/listinfo/vtkusers
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > >
> > ---------------------------------------------------------------------------
> > > Sicilia Ferreira Judice
> > > www.lncc.br/~sicilia <http://www.lncc.br/%7Esicilia>
> > > sicilia at lncc.br
> > >
> > > Laboratório Nacional de Computação Cientifica
> > > Avenida Getulio Vargas, 333 - Quitandinha.
> > > Petrópolis, RJ, Brasil - CEP: 25651-075.
> > > Sala 1A-44  | Tel. +55 (24) 2233-6173
> > > Lab. Virtual | Tel. +55 (24) 2233-6098
> > > _______________________________________________
> > > This is the private VTK discussion list.
> > > Please keep messages on-topic. Check the FAQ at:
> > > http://www.vtk.org/Wiki/VTK_FAQ
> > > Follow this link to subscribe/unsubscribe:
> > > http://www.vtk.org/mailman/listinfo/vtkusers
> > >
> > >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
>
> --
>
>
> ---------------------------------------------------------------------------
> Sicilia Ferreira Judice
> www.lncc.br/~sicilia <http://www.lncc.br/%7Esicilia>
> sicilia at lncc.br
>
> Laboratório Nacional de Computação Cientifica
> Avenida Getulio Vargas, 333 - Quitandinha.
> Petrópolis, RJ, Brasil - CEP: 25651-075.
> Sala 1A-44  | Tel. +55 (24) 2233-6173
> Lab. Virtual | Tel. +55 (24) 2233-6098
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Sometimes it's hard to tell the dancer from the dance - Corwin in CoC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080109/92ef0e2f/attachment.htm>


More information about the vtkusers mailing list