[vtkusers] Issues using QVTKOpenGLWidget

Alvaro Sanchez alvaro.sanchez at kitware.com
Tue Nov 7 11:23:37 EST 2017


As an alternative to multisampling, you could enable FXAA in vtkRenderer.
I think this would not interfere with hardware
selection.

https://www.vtk.org/doc/nightly/html/classvtkRenderer.html#a3f46ed85e17e5e297e6c3b02be07ebba



On Mon, Nov 6, 2017 at 10:56 AM, Boris Basic <baljci at hotmail.com> wrote:

> 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> 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
>
> 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
>
> _______________________________________________
> Powered by 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
>
>


-- 
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4901
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171107/edbd33e3/attachment.html>


More information about the vtkusers mailing list