[vtkusers] Question to vtkDepthPeelingPass

Rocco Gasteiger post at rocco-gasteiger.de
Fri May 21 08:47:19 EDT 2010


Dear vtk-Community,

 

For a multi-pass rendering I use my own rendering pass “MyMultiPass” derived
from vtkRenderingPass. Within the rendering I render several opaque and
translucent geometries which have an individual vtkInformation-Key. These
keys are used to set a vtkRenderState “MyRenderingState” in “MyMultiPass”.
After each setting I perform a rendering   (calling
“MyMultiPass->DelegatePass->Render(MyRenderingState)”) to render a specific
geometry indicated by the key I set before into a texture. For each geometry
I apply a separate shader. 

 

The delegate pass consists of a  vtkCameraPass with following sub-sequences
(in that order) 

vtkCameraPass

-          vtkSequencePass

o   vtkLightsPass

o   vtkOpaquePass

o   vtkDepthPeelingPass with vtkTranslucentPass as translution pass (depth
peeling is supported!)

o   vtkOverlayPass

 

Now, my problem is a wrong rendering of the opaque geometry which results in
a black texture image. If I replace the vtkDepthPeelingPass with a common
vtkTranslucentPass then all renderings are correct. 

 

With my debugger I stepped through the corresponding vtk-classes and
callings. I noticed following behavior.

1.       In vtkSequencePass::Render(const vtkRenderState *s) each sub-pass
performs its rendering (if an appropriate vtkProp is available)

2.       If the vtkDepthPeelingPass is processed than a test is performed to
check for translucent geometry. Because I have such objects added to my
renderer this test results in true

3.       Afterwards, this pass performs several render peels (each peel with
a vtkTranslucentPass) for each geometry which has the desired key è the
opaque geometry is also rendered with several vtkTranslucentPass-Passes

 

So, could it be that the vtkDepthPeelingPass has any negative side effects
on rendering opaque objects?  

 

Many thanks in advance and best regards, 

Rocco Gasteiger

 

--------------------------------------------------

Dipl.-Ing. Rocco Gasteiger

 

Otto-von-Guericke University

Faculty of Computer Science

Department of Simulation and Graphics

Universitätsplatz 2, 39106 Magdeburg, Germany

 

Office:  G29-223

Phone:   +49 391 67 127 59

Fax:     +49 391 67 111 64

Website:  <http://wwwisg.cs.uni-magdeburg.de/cvcms/>
http://wwwisg.cs.uni-magdeburg.de/cvcms/

--------------------------------------------------

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100521/29970299/attachment.htm>


More information about the vtkusers mailing list