[vtkusers] Stereo rendering problem with OpenGL2

Leucht, Nicola Nicola.Leucht at karlstorz.com
Wed Apr 29 09:09:56 EDT 2015


Hi Aashish,

yes, would be great if you could tell me about the relevant VTK code.

Thanks,
Nicola


Von: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
Gesendet: Mittwoch, 29. April 2015 14:35
An: Leucht, Nicola
Cc: vtkusers at vtk.org
Betreff: Re: [vtkusers] Stereo rendering problem with OpenGL2

Hi Nicola,

I didn't spot anything obvious. Can you debug the VTK code? If yes, I can point you to the relevant VTK code.

- Aashish

On Wed, Apr 29, 2015 at 4:29 AM, Leucht, Nicola <Nicola.Leucht at karlstorz.com<mailto:Nicola.Leucht at karlstorz.com>> wrote:
Hi Aashish,

thanks that you already had a look at the issue!
Do you (or anyone else) have any idea what the problem might be or where I should look?

Thank you
Nicola

Von: vtkusers [mailto:vtkusers-bounces at vtk.org<mailto:vtkusers-bounces at vtk.org>] Im Auftrag von Leucht, Nicola
Gesendet: Donnerstag, 23. April 2015 13:46
An: Aashish Chaudhary

Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Betreff: Re: [vtkusers] Stereo rendering problem with OpenGL2

No, it stays there – always with two lines of the same eye.

Von: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com]
Gesendet: Donnerstag, 23. April 2015 13:44
An: Leucht, Nicola
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Betreff: Re: [vtkusers] Stereo rendering problem with OpenGL2

I think its missing rendering the other eye at the center. Does it go away if you change the viewport dimensions?

Thanks,
Aashish

On Thu, Apr 23, 2015 at 7:40 AM, Leucht, Nicola <Nicola.Leucht at karlstorz.com<mailto:Nicola.Leucht at karlstorz.com>> wrote:

Von: Aashish Chaudhary [mailto:aashish.chaudhary at kitware.com<mailto:aashish.chaudhary at kitware.com>]
Gesendet: Donnerstag, 23. April 2015 13:36
An: Leucht, Nicola
Cc: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Betreff: Re: [vtkusers] Stereo rendering problem with OpenGL2

Your code looks fine. Can you post a screen capture of what you see?

- Aashish

On Thu, Apr 23, 2015 at 7:20 AM, Leucht, Nicola <Nicola.Leucht at karlstorz.com<mailto:Nicola.Leucht at karlstorz.com>> wrote:
Hi,

I’m using VTK 6.2.0 with the OpenGL2 backend.
When rendering in stereo (interlaced mode), there are two horizontal lines in the middle of the window that belong to one eye.

Code:
vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor = vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(renderWindow);

vtkSmartPointer<vtkSphereSource> sphereSource = vtkSmartPointer<vtkSphereSource>::New();
sphereSource->SetCenter(0.0, 0.0, 0.0);
sphereSource->SetRadius(50.0);
sphereSource->SetPhiResolution(100);
sphereSource->SetThetaResolution(100);
vtkSmartPointer<vtkOpenGLPolyDataMapper> mapper = vtkSmartPointer<vtkOpenGLPolyDataMapper>::New();
mapper->SetInputConnection(sphereSource->GetOutputPort());

vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper);
mapper->Update();
renderer->AddActor(actor);
renderer->GetActiveCamera()->SetEyeAngle(30);
renderer->ResetCamera();
renderer->SetBackground(.3, .6, .3);
renderWindow->StereoCapableWindowOn();
renderWindow->SetStereoTypeToInterlaced();
renderWindow->StereoRenderOn();
renderWindowInteractor->Start();

Is there anything I need to change in my code?

Kind regards
Nicola

_______________________________________________
Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html



--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html



--
| Aashish Chaudhary
| Technical Leader
| Kitware Inc.
| http://www.kitware.com/company/team/chaudhary.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150429/89845d3c/attachment.html>


More information about the vtkusers mailing list