[vtkusers] face culling and edge visibility

Miroslav Drahos mdrahos at aurisrobotics.com
Mon Mar 27 11:58:53 EDT 2017


Thank you for the response and the link; I looked at hidden line removal, it's a very cool feature. Unfortunately, it does not solve my problem, because I use front face culling:

I render the mesh as fully opaque surface representation (not wireframe). Then I cull front faces away, so that I can see objects inside the mesh unobstructed; at the same time, the mesh is opaque, so it obstructs object behind it.


Software is for medical application, visualizing navigation path inside anatomy -- I want to show path unobstructed, and hide everything behind the anatomy surface model.


Attaching a couple images of what it looks like in 6.2 with OPENGL backend (i.e. what I want it to look like). ffCullDesired1 is the view user will get; in ffCullDesired2 I rotated camera to illustrate what's happening. With VTK7.1+OPENGL2 I get the edges obstructing the path.


One obvious workaround for me would be to turn edge visibility off, and render polygons in color, but I the design has been finalized and I don't have much control over it, I'm just implementing it.


Any other suggestions are most appreciated!

Thank you,

Miro


________________________________
From: Ken Martin <ken.martin at kitware.com>
Sent: Saturday, March 25, 2017 2:18:52 PM
To: Miroslav Drahos
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] face culling and edge visibility

Unfortunately wireframe backface culling is not implemented. But maybe hidden line removal would do the job or maybe even better. See

https://blog.kitware.com/hidden-line-removal-now-available-in-vtk-and-paraview/
Hidden Line Removal now available in VTK and ParaView ...<https://blog.kitware.com/hidden-line-removal-now-available-in-vtk-and-paraview/>
blog.kitware.com
This is achieved using a technique called Hidden Line Removal, which uses the OpenGL depth buffer to hide lines that are behind the closest wireframe surface.





On Fri, Mar 24, 2017 at 8:14 PM, Miroslav Drahos <mdrahos at aurisrobotics.com<mailto:mdrahos at aurisrobotics.com>> wrote:

Hi VTK folks,

I am rendering a surface with culling faces on and edge visibility on as well. When I used VTK 6.2, only the edges of faces that were visible (i.e. not culled) were shown, with VTK 7.1.0 all edges are visible, even for faces that are culled. My VTK 6.2 was compiled with rendering backend OPENGL, and 7.1.0 with OPENGL2, which is what most likely causes the difference in behavior.

It does not matter whether front or back face culling is used, the edge visibility behavior is the same.


What I am hoping to hear: Is there a way to get the "old" behavior with VTK7.1/OPENGL2?

I would like to show the edges only for the faces that are not culled away.


Thank you tons,

Miro




_______________________________________________
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




--
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/20170327/535119a1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffCullDesired1.png
Type: image/png
Size: 400811 bytes
Desc: ffCullDesired1.png
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170327/535119a1/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffCullDesired2.png
Type: image/png
Size: 519624 bytes
Desc: ffCullDesired2.png
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170327/535119a1/attachment-0003.png>


More information about the vtkusers mailing list