completly empty pixels in between boundaries when having transparent + non transparent objects and screenshot saved with transparent background paraview 5.12
Hello, there is an bug in paraview when saving a screenshot with a not transparent object (opacity=1) that is on top of a transparent object (opacity=0.5) and then we save an screenshot of the scene with a transparent background. it generates images where there are pixels that are completly empty (not semi transparent but empty at all) here is an image of a screenshot modified in inkscape with some squares under the layer of the image and we can clearly see the empty pixels.
here is a simple code to reproduce this problem:
paraview.major = 5 paraview.minor = 12
from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
box2 = Box(registrationName='Box2')
renderView1 = GetActiveViewOrCreate('RenderView')
box2Display = Show(box2, renderView1, 'GeometryRepresentation')
box2Display.Representation = 'Surface'
renderView1.Update()
box2.XLength = 10.0
renderView1.Update()
box2.YLength = 10.0
renderView1.Update()
box2Display.Opacity = 0.5
sphere4 = Sphere(registrationName='Sphere4')
sphere4Display = Show(sphere4, renderView1, 'GeometryRepresentation')
sphere4Display.Representation = 'Surface'
renderView1.Update()
sphere5 = Sphere(registrationName='Sphere5')
sphere5Display = Show(sphere5, renderView1, 'GeometryRepresentation')
sphere5Display.Representation = 'Surface'
renderView1.Update()
sphere5.Center = [0.75, 0.0, 0.0]
renderView1.Update()
sphere5.Center = [0.75, 0.0, 1.0]
renderView1.Update()
sphere6 = Sphere(registrationName='Sphere6')
sphere6Display = Show(sphere6, renderView1, 'GeometryRepresentation')
sphere6Display.Representation = 'Surface'
renderView1.Update()
sphere6.Center = [-0.75, 0.0, 0.0]
renderView1.Update()
sphere6.Center = [-0.75, 0.0, -1.0]
renderView1.Update()
layout1 = GetLayout()
layout1.SetSize(1416, 527)
renderView1.CameraPosition = [0.0, 0.0, -7.354435180715958]
renderView1.CameraFocalPoint = [0.0, 0.0, 1e-20]
renderView1.CameraParallelScale = 7.22841614740048
SaveScreenshot(filename='/home/franco/Desktop/te.png', viewOrLayout=renderView1, location=16, ImageResolution=[1416, 527],
TransparentBackground=1)
Edited by franco otaola