[vtkusers] Z-fighting problem on intel hd graphics

Elvis Stansvik elvis.stansvik at orexplore.com
Fri Aug 26 13:47:04 EDT 2016


2016-08-26 19:25 GMT+02:00 Róbert Špir <spir.robert at gmail.com>:

> Thanks, I switched back to QVTKWidget and everything works as expected
> with your fix
>
> Robert
>

Great, glad it worked out.

Elvis


>
>
> *From:* Elvis Stansvik [mailto:elvis.stansvik at orexplore.com]
> *Sent:* Friday, August 26, 2016 9:08 AM
> *To:* Róbert Špir <spir.robert at gmail.com>
>
> *Cc:* VTK Users <vtkusers at vtk.org>; Ken Martin <ken.martin at kitware.com>
> *Subject:* Re: [vtkusers] Z-fighting problem on intel hd graphics
>
>
>
> 2016-08-25 18:43 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
>
> 2016-08-25 18:36 GMT+02:00 Róbert Špir <spir.robert at gmail.com>:
>
> it works ok after switching to qvtkwidget2, even the multisampling under
> linux, which wasn’t working with qvtkwidget
>
>
>
> Ah, that's good to know. I believe when I was having the problem, I was
> working through Python, so was using QVTKRenderWindowInteractor (or maybe
> my own similar class), which is yet another thing (QVTKWidget / QVTKWidget2
> are not wrapped).
>
> Glad it worked out anyway. Nowadays I'm using C++ and QVTKWidget2 too.
>
>
>
> I was actually wrong. I had a look at my code, and I'm using QVTKWidget
> (not QVTKWidget2), and what I did to get around problems with Z-ordering
> and also to get multisampling working reliably was this (from the
> constructor of my QVTKWidget subclass):
>
>     QSurfaceFormat surfaceFormat = windowHandle()->format();
>     surfaceFormat.setSamples(8);
>     surfaceFormat.setStencilBufferSize(8);
>     windowHandle()->setFormat(surfaceFormat);
>
> Hope that helps someone else using QVTKWidget.
>
> Elvis
>
>
>
>
> Elvis
>
>
>
>
>
> *From:* Elvis Stansvik [mailto:elvis.stansvik at orexplore.com]
> *Sent:* Thursday, August 25, 2016 6:24 PM
> *To:* RobertS <spir.robert at gmail.com>
> *Cc:* VTK Users <vtkusers at vtk.org>; Ken Martin <ken.martin at kitware.com>
>
>
> *Subject:* Re: [vtkusers] Z-fighting problem on intel hd graphics
>
>
>
> Den 25 aug. 2016 5:35 em skrev "Róbert Špir" <spir.robert at gmail.com>:
> >
> > ok, everything works fine without qvtkwidget, so the problem is
> somewhere there
>
> I don't remember exactly, but I think I had the same problem. Should be
> somewhere on this list I think.
>
> I think it's possible to work around by manually setting the stencil
> buffer size on the QGLFormat used by the widget.
>
> On the bus at the moment so have limited ability to search.
>
> Elvis
>
> >
> >
> >
> > From: Róbert Špir [mailto:spir.robert at gmail.com]
> > Sent: Thursday, August 25, 2016 2:56 PM
> > To: 'Ken Martin' <ken.martin at kitware.com>
> > Cc: 'vtk' <vtkusers at vtk.org>
> > Subject: RE: [vtkusers] Z-fighting problem on intel hd graphics
> >
> >
> >
> > I made a few more tests:
> >
> > the same problem happens with llvmpipe and with nvidia with nouveau
> driver
> >
> > doesn’t happen on nvidia binary driver or in OS X with intel or nvidia
> or in windows with intel or nvidia
> >
> > So maybe it’s a bug in mesa? Currently I’m using qt5 with qvtkwidget,
> I will try to create minimalistic example without qt to see if the problem
> is reproducible
> >
> >
> >
> > From: Ken Martin [mailto:ken.martin at kitware.com]
> > Sent: Tuesday, August 23, 2016 6:45 PM
> > To: RobertS <spir.robert at gmail.com>
> > Cc: vtk <vtkusers at vtk.org>
> > Subject: Re: [vtkusers] Z-fighting problem on intel hd graphics
> >
> >
> >
> > This sounds like a driver issue. I suppose you could try setting the
> following environment variable
> >
> >
> >
> > GALLIUM_DRIVER=llvmpipe
> >
> >
> >
> > to switch to software rendering and see if the problem goes away.  If
> nvidia and mesa llvmpipe both work on your linux system then I would really
> suspect the intel linux driver.
> >
> >
> >
> >
> >
> >
> >
> > On Wed, Aug 17, 2016 at 6:17 AM, RobertS <spir.robert at gmail.com> wrote:
> >>
> >> Hi all,
> >> I'm doing simple visualization of data on rectangular grid by creating
> >> vtkpolydata from single vtktrianglestrip and when running the
> application in
> >> linux on intel hd graphics there is serious problem with z-fighting
> where
> >> the parts that should be far away are overlapping parts that are near
> the
> >> camera. This doesn't happen when running on windows (intel or nvidia)
> or on
> >> linux with nvidia
> >> here you can see the problem, the camera angle is still the same
> >> http://tesla.math.sk/intel1.jpg <http://tesla.math.sk/intel1.jpg>
> >> http://tesla.math.sk/nvidia1.jpg <http://tesla.math.sk/nvidia1.jpg>
> >> another angle
> >> http://tesla.math.sk/intel2.jpg <http://tesla.math.sk/intel2.jpg>
> >> http://tesla.math.sk/nvidia2.jpg <http://tesla.math.sk/nvidia2.jpg>
> >> this happens on vtk 7.0 and also on vtk 7.1 from git
> >> tested hardware is intel hd graphics on haswell, and ivy bridge (mesa
> 11.2
> >> and 12.0 with opengl 3.3) and on broadwell with mesa 12.0 with opengl
> 4.4
> >> Is this a known issue or am I doing something wrong?
> >>
> >>
> >>
> >> --
> >> View this message in context: http://vtk.1045678.n5.nabble.
> com/Z-fighting-problem-on-intel-hd-graphics-tp5739803.html
> >> Sent from the VTK - Users mailing list archive at Nabble.com.
> >> _______________________________________________
> >> 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
> >
> >
> >
> >
> >
> > --
> >
> > Ken Martin PhD
> >
> > Chairman & CFO
> > Kitware Inc.
> > 28 Corporate Drive
> > Clifton Park NY 12065
> > 518 371 3971
> >
> >
> >
> > This communication, including all attachments, contains confidential and
> legally privileged information, and it is intended only for the use of the
> addressee.  Access to this email by anyone else is unauthorized. If you are
> not the intended recipient, any disclosure, copying, distribution or any
> action taken in reliance on it is prohibited and may be unlawful. If you
> received this communication in error please notify us immediately and
> destroy the original message.  Thank you.
> >
> >
> > _______________________________________________
> > 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
> >
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160826/875ddedd/attachment.html>


More information about the vtkusers mailing list