vtk 9 line rendering

I upgraded from VTK 8 to VTK 9, and the line rendering quality dropped significantly. VTK 8:

Thats the same scene in vt9. Lines look unsharp and have uneven thicknesses:

Thats a major showstopper for us at the moment. Does anybody know how to reach the same rendering quality than in earlier versions, without that strange artifacts?

Hello @metamurk

Line rendering implementation changed a bit from VTK 8.

Is the render window using multisampling window->SetMultiSamples(4)? Or did you enable FXAA on the renderer renderer->UseFXAAOn()? If not, can you try either of those?

I cannot use multi sampling cause of depth peeling. Multisampling in vtk is not save implemented - it leads to a lot of problems on different drivers. FXAA does not help, line rendering still broken.

I think this line artifacts and blurry unsharp rendering - which are everywhere in dense senes, are a major showstopper bug in vtk 9 which makes the whole framework unusable. Can I write a custom mapper for that or has anyone any suggestions?

Can you share a dataset (or part of your mesh) with which I can reproduce the problem?

You sure you’re not using multi-sampling or FSAA in your original image?

I use FSAA, but these artifacts don’t appear in VTK 8. They do appear in VTK 9 when two lines are rendered on top of each other. The issue is independent of FSAA—the artifacts also occur with anti-aliasing disabled.

I have a hunch that the depth peeling code might not be working properly with the line rendering code. In any case, any tests to find the cause of the artifact should turn off FSAA and especially FXAA, because they’ll just make the artifact harder to identify.

If the artifact is most pronounced when lines cross, then a comparison is needed between rendering such crossing lines

  1. with depth peeling off
  2. with depth peeling on
  3. with depth peeling on, but with the lines added to the render in the opposite order (e.g. upper line added first vs. lower line added first)
  4. all the above with and without MSAA

Edit: actually, if the artifact is visible without MSAA, then there’s no need for a set of test renderings that use MSAA.