# No transparent background on paraview headless without VTKM?

**URL:** https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782
**Category:** ParaView Support
**Tags:** python
**Created:** [August 6, 2021, 4:25pm UTC](https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782 "2021-08-06T16:25:52Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Argonaut](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ecae2f/32.png) [@Argonaut](https://discourse.paraview.org/u/Argonaut)
#### Post date: [August 6, 2021, 4:25pm UTC](https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782/1 "2021-08-06T16:25:53Z")

</div>

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](https://www.paraview.org/download/) that include OSMesa and MPI functionality and running `pvpython` from there, but was facing the same issue described [here](https://discourse.paraview.org/t/paraview-5-9-stopped-working/6746/3), 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](https://www.paraview.org/Wiki/ParaView:Build_And_Install) and [this](https://kitware.github.io/paraview-docs/latest/cxx/Offscreen.html) with the following non-default options:

```auto
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!

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 9, 2021, 8:52am UTC](https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782/2 "2021-08-09T08:52:14Z")

</div>

> [@Argonaut](#):
>
> that worked before with the `apt` version of paraview: exporting the image _with transparent background._

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.

---

<div class="post-metadata">

### Author: ![Argonaut](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ecae2f/32.png) [@Argonaut](https://discourse.paraview.org/u/Argonaut)
#### Post date: [August 9, 2021, 9:32am UTC](https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782/3 "2021-08-09T09:32:48Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 9, 2021, 9:36am UTC](https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782/4 "2021-08-09T09:36:29Z")

</div>

> [@Argonaut](#):
>
> It’s the self built version that seems to ignore the `TransparentBackground=1` parameter.

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

---

<div class="post-metadata">

### Author: ![Argonaut](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ecae2f/32.png) [@Argonaut](https://discourse.paraview.org/u/Argonaut)
#### Post date: [August 9, 2021, 6:06pm UTC](https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782/5 "2021-08-09T18:06:28Z")

</div>

> 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](https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782) 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?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [August 10, 2021, 8:12am UTC](https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782/6 "2021-08-10T08:12:40Z")

</div>

Indeed: [https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues)

Please include precise steps to reproduce.

---

<div class="post-metadata">

### Author: ![Argonaut](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/ecae2f/32.png) [@Argonaut](https://discourse.paraview.org/u/Argonaut)
#### Post date: [August 10, 2021, 5:28pm UTC](https://discourse.paraview.org/t/no-transparent-background-on-paraview-headless-without-vtkm/7782/7 "2021-08-10T17:28:37Z")

</div>

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