[Paraview] Accessing Z buffer when rendering remotely

Piotr Domagalski piotr.domagalski at man.poznan.pl
Wed Jul 4 12:18:06 EDT 2012


Hi!

I've been doing some experiments with accessing the RGBA data and Z 
buffer from the rendering window in ParaView. What I noticed is that the 
Z buffer is not available, when the rendering is done on the server. Is 
there any way to retrieve it?

Here is a script I've been using. When the RemoteRenderThreshold is set 
to 0 I only see 2D elements (e.g. color map legend) in the outz.tiff 
file. When set to some bigger value to make it render locally, all the 
objects are seen in outz.tiff.

------------------------------------------
import sys

from paraview.simple import *
from paraview.vtk import *
from vtkIOPython import *
from vtkRenderingPython import *

Connect("beech")

servermanager.LoadState(sys.argv[1])
SetActiveView(GetRenderView())

view = GetRenderView()
window = view.GetRenderWindow()

view.RemoteRenderThreshold = 0

renderer = view.GetRenderer()

w2i = vtkWindowToImageFilter()
w2i.SetInputBufferTypeToRGBA()
w2i.SetInput(window)

zw2i = vtkWindowToImageFilter()
zw2i.SetInputBufferTypeToZBuffer()
zw2i.SetInput(window)

writer = vtkTIFFWriter()
writer.SetInputConnection(w2i.GetOutputPort())
writer.SetFileName("/tmp/out.tiff")

zwriter = vtkTIFFWriter()
zwriter.SetInputConnection(zw2i.GetOutputPort())
zwriter.SetFileName("/tmp/outz.tiff")

writer.Write()
zwriter.Write()

-- 
Piotr Domagalski
Poznan Supercomputing and Networking Center



More information about the ParaView mailing list