Is there any way to do volume rendering + nice anti-aliased polygonal geometry (especially thin lines) that works reliably on Intel/NVIDIA cross platform?
FXAA is bad at handling thin lines, but this looks especially wrong. Are you configuring the render window without an alpha channel? The “steps” of the anti-aliased line edge should be dropping off in opacity to give a smooth appearance, but they seem to be maintaining uniform opacity. What is the output of renWin->Print(std::cout); (or print(renWin) on python)?
If MSAA and FXAA aren’t working, there’s also vtkSSAAPass that does super-sampled anti-aliasing. It’s an expensive option, but might work better for you.
Ok, taking a closer look with a screen magnifier, the opacity gradient is present, so it looks like things are working as expected.
We’ll have to just chalk this one up to “FXAA sucks at anti-aliasing lines.” Because of the way the algorithm works, the approximation errors are accentuated when a feature is just a few pixels wide.
Since it looks like these lines are being rendered as an overlay, you may try moving the actor that’s drawing the line to another renderer and configure that one with MSAA.
Ah alright. Yea I guess it’s just a limitation in the FXAA approach.
Hm, multisampling is a render window property though, isn’t it? So even if I moved these actors to a separate renderer, I’d need to activate multisampling on the render window (which breaks the volume rendering). Or is there a way to control multisampling per renderer? (on the bus with my phone, will check when I’m home)
Alright, will try a new renderer + vtkSSAAPass and see if the performance is OK. I only showed a single line here, but we’re going to do vector field visualization using vtkGlyph3DMapper and may have on the order of 10000 lines.
Will also take some syncing of camera positions since the lines are in the same 3D universe as the volume rendering.
Also, ideally these lines would be shown inside the volume, and not as an overlay on top, so this would be a compromise and it may turn out to look too strange.
(If you look closely at my very first screenshot, you’ll see that the line really is inside the volume, it is darkened in some spots by intermediate voxels)