Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ParaView ParaView
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,962
    • Issues 1,962
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 98
    • Merge requests 98
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ParaViewParaView
  • ParaViewParaView
  • Issues
  • #20880
Closed
Open
Issue created Aug 10, 2021 by Argonaut-J@Argonaut-J

Background issues in exported image with headless pvpython

When building Paraview (headless) with the non-default options listed below, the following issues occur in some background properties when running a pvpython script that exports an image:

  1. Background() method is ignored, i.e. the setting the color of the background does not work.
  2. TransparentBackground=1 parameter in SaveScreenshot() is ignored, i.e. background is not exported transparently.

Building Paraview 5.9.1 is done on a Linux Mint Xfce 20.2 machine with installed packages libosmesa6-dev libgl1-mesa-dev and libxt-dev, which succeeds with 116 warnings and no errors, with the following cmake options set:

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

Steps to reproduce:

  1. Build paraview with the options above
  2. Download the two attached files
  3. Run the following code with pvpython (replacing the 2nd and last line if necessary):
from paraview.simple import *
xdmf = XDMFReader(FileNames=[online_solution_y.xdmf'])
renderView1 = GetActiveViewOrCreate('RenderView')
xdmfDisplay = Show(xdmf, renderView1)
renderView1.ResetCamera()
renderView1.Background = [0.8333333333333, 0.6666666666666666, 0.0]
renderView1.Update()
SaveScreenshot('image.png', renderView1, ImageResolution=[594, 519], TransparentBackground=0)

Now:

  1. Check if the background is orange.
  2. Set TransparentBackground=1 in the code above and rerun, check that the background is transparent.

Can you reproduce either non-orange background or non-transparent background or both, in the last two steps?

online_solution_y.h5

online_solution_y.xdmf

Edited Aug 10, 2021 by Argonaut-J
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking