[vtkusers] Issues using QVTKOpenGLWidget

Boris Basic baljci at hotmail.com
Mon Nov 6 10:56:19 EST 2017


Hi Sankhesh,


Disabling multisampling fixes the problem regarding the vtkHardwareSelector, however I prefer to keep it enabled to get a decent image quality. I know that the hardware selector is not supposed to work with mulsisampling on, however it worked with the following trick I:


vtkNew<vtkHardwareSelector> selector;
... // Setup the selector
renderWindow->OffScreenRenderingOn();
vtkSmartPointer<vtkSelection> selection = selector->Select();
renderWindow->OffScreenRenderingOff();

I understand though that this does not work anymore with the internal FBO used by QVTKOpenGLWidget. Do you think it could in the future?

Cheers,
Boris


________________________________
De : Sankhesh Jhaveri <sankhesh.jhaveri at kitware.com>
Envoyé : mercredi 1 novembre 2017 18:12
À : Boris Basic
Cc : vtk vtk
Objet : Re: [vtkusers] Issues using QVTKOpenGLWidget


Hi Boris,

Regarding the vtkHardwareSelector issue, try disabling multisampling on the QSurfaceFormat before setting the default surface format.

QSurfaceFormat fmt = QVTKOpenGLWidget::defaultFormat();
fmt.setSamples(0);
QSurfaceFormat::setDefaultFormat(fmt);


Hope that helps.

Cheers,
Sankhesh

On Mon, Oct 30, 2017 at 12:54 PM Boris Basic <baljci at hotmail.com<mailto:baljci at hotmail.com>> wrote:

Hi,


I'm currently porting an existing finite element mesh analysis application from VTK 7.0 to VTK 8.x (actually the last master to be ready for the upcoming 8.1 version). But when switching to the new QVTKOpenGLWidget, I encountered too issues, one relatively minor, the other pretty annoying.


The first and biggest problem is selection, both using vtkHardwareSelector from surface selection, and the vtkRenderedAreaPicker for frustum selection. The vtkHardwareSelector sometimes simply fails to select the points properly, whereas it always worked with the previous QVTKWidget. Unfortunately, it's very random, and I can't manage to get a working example showing the issue on each selection. For the vtkRenderedAreaPicker, the problem is that the render window becomes black while the picker is working.


The second and minor issue, the first I encountered, concerns a transparency problem with the new widget rendering. Lines seems to blend with the background. I opened an issue here for that one: https://gitlab.kitware.com/vtk/vtk/issues/17154. It's not as important as the selection bug, but it was the first issue I saw. It is only visible when multisampling is enabled.


Boris


_______________________________________________
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
--
Sankhesh Jhaveri
Sr. Research & Development Engineer | Kitware<http://www.kitware.com/> | (518) 881-4417
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171106/091a95d9/attachment.html>


More information about the vtkusers mailing list