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

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to