<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1437559983378_7159">Hi all,<br><br>I have a problem with depth peeling rendering using vtk 6.2</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr">To generate this problem, i took code based on example of <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/MultipleViewports" id="yui_3_16_0_1_1437559983378_7365">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/MultipleViewports</a><br><br><br>When I enabled depth peeling feature,<br>only lower left corner render could be visible. </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr"><br></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr">Is it a bug or limitation of depth peeling?</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr"><br></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr">best regards,</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr"><br></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr">Anuwat</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr"><br></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr"><br></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr">---- CODE----</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtkSphereSource.h></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtkProperty.h></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtkPolyData.h></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtkSmartPointer.h></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtkPolyDataMapper.h></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtkActor.h></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtkRenderWindow.h></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtkRenderer.h></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtkRenderWindowInteractor.h></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">#include <vtksys/ios/sstream></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">int main(int, char *[])</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">{</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkRenderWindow> renderWindow = </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkRenderWindow>::New();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor = </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkRenderWindowInteractor>::New();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1437559983378_7595"> </span>renderWindow->SetAlphaBitPlanes(1);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1437559983378_7598"> </span>renderWindow->SetMultiSamples(0);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> renderWindowInteractor->SetRenderWindow(renderWindow);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> // Define viewport ranges</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> double xmins[4] = {0,.5,0,.5};</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> double xmaxs[4] = {0.5,1,0.5,1};</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> double ymins[4] = {0,0,.5,.5};</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> double ymaxs[4]= {0.5,0.5,1,1};</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> for(unsigned i = 0; i < 4; i++)</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> {</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkRenderer> renderer = </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkRenderer>::New();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> renderWindow->AddRenderer(renderer);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> renderer->SetViewport(xmins[i],ymins[i],xmaxs[i],ymaxs[i]);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> // Create a sphere</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkSphereSource> sphereSource = </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkSphereSource>::New();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> sphereSource->SetCenter(0.0, 0.0, 0.0);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> sphereSource->SetRadius(5);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> sphereSource->Update();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> // Create a mapper and actor</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkPolyDataMapper> mapper = </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkPolyDataMapper>::New();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> mapper->SetInputConnection(sphereSource->GetOutputPort());</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> actor->SetMapper(mapper);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1437559983378_7629"> </span>actor->GetProperty()->SetOpacity(0.5);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> renderer->AddActor(actor);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> renderer->ResetCamera();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1437559983378_7634"> </span></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1437559983378_7637"> </span>renderer->SetUseDepthPeeling(1);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1437559983378_7640"> </span>renderer->SetMaximumNumberOfPeels(100);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1437559983378_7643"> </span>renderer->SetOcclusionRatio(0.0);</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1437559983378_7647"> </span>renderWindow->Render();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_1_1437559983378_7650"> </span></div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> renderWindow->SetWindowName("Multiple ViewPorts");</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> }</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> renderWindowInteractor->Start();</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> </div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class=""> return EXIT_SUCCESS;</div><div id="yui_3_16_0_1_1437559983378_7159" dir="ltr" class="">}</div></div></body></html>