No transparent background on paraview headless without VTKM?

Hi all,

Would appreciate some help here on exporting an image with transparent background when running pvpython on a headless paraview installation (without X window or VTKM).

Setting: I have a python script that reads a file and exports an image with transparent background (by setting the argument TransparentBackground=1 in function SaveScreenshot() ).
Now this works as it should when using pvpython from the paraview binaries installed by apt on on a Linux Mint server with X-window. But I need to run the script headless on a server without X-window, so I need a version of paraview with OSMesa and without X support.

I first tried downloading the binaries for headless server support from here that include OSMesa and MPI functionality and running pvpython from there, but was facing the same issue described here, where the problem is solved by building paraview yourself with also the VTKM option turned off: PARAVIEW_USE_VTKM=OFF.

So I have built a version of paraview 5.9.1 following this and this with the following non-default options:

PARAVIEW_USE_MPI=OFF
PARAVIEW_USE_PYTHON=ON
PARAVIEW_USE_QT=OFF
PARAVIEW_USE_QTHELP=OFF
PARAVIEW_USE_VTKM=OFF
VTK_USE_X=OFF
VTK_OPENGL_HAS_OSMESA=ON

(I am a beginner and do not need MPI).

The script now runs on my headless server without throwing any errors, but it does not do the following thing that worked before with the apt version of paraview: exporting the image with transparent background.

Could be related to turning VTKM off? Any idea’s on what could be going on?

Thank you very much!

This version is packaged by debian maintainers, so this is a debian issue unless it can be reproduced when building ParaView

Could be related to turning VTKM off?

No reason this would be linked. Disabling VTKm is just a work around to be able to build without issue.

Okay, so Its likely I can safely disable VTKM in the build.

This version is packaged by debian maintainers, so this is a debian issue unless it can be reproduced when building ParaView

But the apt version works (although requiring an X-window). It’s the self built version that seems to ignore the TransparentBackground=1 parameter.

I’m going to do the building again to see if I can at least reproduce the issue myself. Thanks.

Ha, I misunderstood ! Then an issue should be opened.

Ha, I misunderstood ! Then an issue should be opened.

Yes, I had indeed formulated it ambiguously, but I don’t know how I could now edit the original post to rectify this.

I have rebuilt paraview with the options described above on two different linux mint machines. I got 116 warnings, but no errors, during the building process.

After rebuilding the error of no transparent background for exported images continues to persist. Moreover, I tried to change the background color with the Background() method, which is also completely ignored by pvpython (while it works with the apt version of paraview). So something is going wrong with the backgrounds.

Shall I then create an issue on the paraview gitlab page, is that what you mean? Any important things that I should mention in the issue?

1 Like

Indeed: https://gitlab.kitware.com/paraview/paraview/-/issues

Please include precise steps to reproduce.

I have described the issue: https://gitlab.kitware.com/paraview/paraview/-/issues/20880