[vtkusers] Depth buffer

Ken Martin ken.martin at kitware.com
Wed May 17 08:56:45 EDT 2017


There are a few issues that can cause z fighting or what looks like z
fighting.  If your data is away from the origin then you may hit floating
point issues. For example if your data ranges from 5001 to 5003  the ratio
of the distance to the size is large enough to cause float point resolution
issues (aka 5002/2 = 2501)  If using the OpenGL2 backend you can use this
topic in VTK to automatically address that problem

https://gitlab.kitware.com/vtk/vtk/merge_requests/2797

If that is not the case then it could be that you have identically located
surfaces. In that case you need to use the local offset methods in Mapper
to set one of the mappers to be behind/in front of the other.

You can also try tightening up the default zbuffer expansion using

renderer->SetClippingRangeExpansion(.1)

which is tighter than the default of 0.5 and will waste less resolution
typically.

Thanks
Ken


On Wed, May 17, 2017 at 6:15 AM, Rustem Khabetdinov <
rustem.khabetdinov at gmail.com> wrote:

> Hello,
> I am having troubles with z-fighting. Is there anything that can help
> reduce this? I found out that it is possible to increase depth buffer
> precision or change near plane. As far as I know we are not allowed to
> change near plane values. Is there any information on what precision is set
> by default or where I can change that?
>
> Best Regards,
> Rustem
>
> _______________________________________________
> 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
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170517/6c66593b/attachment.html>


More information about the vtkusers mailing list