Hi all,
I am working on a large visualization project based on VTK and have stumbled on the following issue. What I am doing:
- Creating many polyData starting with some custom polygons;
- Assinging scalar values to points for coloring;
- Appending all polyData to each other;
- Creating mapper (with lookup table), actor and putting to screen;
- Clipping the created large polyData with a plane using vtkClipPolyData.
After step 5, I see that I loose colour transitions at sharp edges. My guess is that when I apply vtkClipPolyData filter, the data is cleaned-up, there is only one set of points on the edges and consequently coloring transitions smoothly (depending on triangulation resolution). I have a small C++ example to illustrate this (as a new user, however, I can not upload it). I am developing in Windows environment and using VTK-9.2.0.rc2.
Does anyone have any suggestion how to clip poly data without cleaning up the duplicate points?
I have found 2 possible workarounds to this issue, which are both sub-optimal:
A. refining the triangulation of polygons - this sharpens the color transition, but in large visualizations this leads to a very large number of polygons that need to be created and poor clipping performance (I regenerate the clips quite often).
B. using a separate actor for each polygon - this allows to keep sharp edges, however results again in poor rendering performance (as noticed by quite a few users before, such as in here and here).