Depth buffer

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Depth buffer

Rustem Khabetdinov
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
Reply | Threaded
Open this post in threaded view
|

Re: Depth buffer

Andreas Buykx-2

Have you tried the vtkMapper’s coincident topology resolution functionality?

 

Kind regards,

Andreas

 

From: vtkusers [mailto:[hidden email]] On Behalf Of Rustem Khabetdinov
Sent: Wednesday, May 17, 2017 12:16 PM
To: [hidden email]
Subject: [vtkusers] Depth buffer

 

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
Reply | Threaded
Open this post in threaded view
|

Re: Depth buffer

Ken Martin
In reply to this post by Rustem Khabetdinov
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


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 <[hidden email]> 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.

_______________________________________________
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