Vector graphics output, especially for 3D geometry, is in pretty sorry shape since the switch to OpenGL2. This is because of the exporter’s reliance on the GL2PS library, which uses deprecated functionality (specifically, OpenGL feedback buffers) that aren’t available in newer versions of OpenGL.
In particular, this means that all 3D geometry will be rasterized, unfortunately, as this is the only way to easily get the rendered primitives into the output at all. There is an option of using OpenGL TransformFeedback[1] to capture this geometry and inject it into GL2PS manually using the gl2psAddPolyPrimitive function[2], but this will require significant effort and funding to implement this into the OpenGL2 mappers.
One idea I’ve had is to move away from GL2PS and add a new renderer that manually translates a 3D scene into Context2D primitives so we could pipe these into one of the Context2D-specific vector exporters, vtkPDFExporter[3] and vtkSVGExporter[4]. These provide a higher quality output than GL2PS, as they can take advantage of format-specific features that get lost in the GL2PS abstraction. This would also take significant effort, but it would remove the reliance on external libraries.
As for the more specific questions about this export:
- Definitely a bug. Please open a gitlab issue for this.
- Also a bug, please make a separate issue. Not sure what would be causing that…
- That would need to be fixed in the AxisGrid classes. Feel free to file a request for this.
- GL2PS does export to tex, but I’m not sure how valuable this would be given the standing issues with that library. This would need to be a new exporter.
- Same as above.
- Unfortunately this is rendered through the 3D engine, and we aren’t able to fix this without updating the entire family of OpenGL2 mappers as described above. Vectorizing 3D geometry is an “all or nothing” endeavor, otherwise there will be issues with incorrect depth sorting.
- This sounds useful. Perhaps it could be included in a future vector graphics refactor or as a standalone enhancement for ParaView.
I agree that it’d be great to see this functionality improved in ParaView, but it’s going to be a significant undertaking and AFAIK our existing funding sources haven’t requested that we spend time on it.
[1] https://www.khronos.org/opengl/wiki/Transform_Feedback
[2] https://gitlab.onelab.info/gl2ps/gl2ps/blob/master/gl2ps.h#L237-242
[3] https://www.vtk.org/doc/nightly/html/classvtkPDFExporter.html
[4] https://www.vtk.org/doc/nightly/html/classvtkSVGExporter.html