<table cellspacing="0" cellpadding="0" border="0"><tr><td valign="top"><div>Has anyone got depth peeling to work inside a QVTKWidget at an Ubuntu ? <br /><br />renderer->GetLastRenderingUsedDepthPeeling();<br /><br />keeps returning 0 (false) after renderer->Render() even though I&#x27;ve set up<br />the renderer for depth peeling:<br /><br />        renderer->GetRenderWindow()->SetAlphaBitPlanes(1);<br />        renderer->GetRenderWindow()->SetMultiSamples(0);<br />        renderer->SetUseDepthPeeling(1);<br />        renderer->SetMaximumNumberOfPeels(100);<br />        renderer->SetOcclusionRatio(0.1);<br />        Qvtkwidget1->GetRenderWindow()->AddRenderer(renderer); // before the parameters set or here?<br /><br />My OS is GNU/Linux Ubuntu 10.04. What may be the reason? <br />Thanks.<br />Regards, Mehmet.</div></td></tr></table>            <div id="_origMsg_">
                <div>
                    <br />
                    <div>
                        <div style="font-size:0.9em">
                            <hr size="1">
                            <b>
                                <span style="font-weight:bold">From:</span>
                            </b>
                            Kyle Lutz &lt;kyle.lutz@kitware.com&gt;;                            <br>
                            <b>
                                <span style="font-weight:bold">To:</span>
                            </b>
                            Chao Liang &lt;chaolian@mtu.edu&gt;;                                                     <br>
                            <b>
                                <span style="font-weight:bold">Cc:</span>
                            </b>
                            vtkusers@vtk.org &lt;vtkusers@vtk.org&gt;;                                                                             <br>
                            <b>
                                <span style="font-weight:bold">Subject:</span>
                            </b>
                            Re: [vtkusers] VTK 6 vtkCompositeDataDisplayAttributes                            <br>
                            <b>
                                <span style="font-weight:bold">Sent:</span>
                            </b>
                            Thu, Aug 15, 2013 9:36:41 PM                            <br>
                        </div>
                            <br>
                            <table cellspacing="0" cellpadding="0" border="0">
                                <tbody>
                                    <tr>
                                        <td valign="top">On Thu, Aug 15, 2013 at 5:16 PM, Chao Liang &lt;<a ymailto="mailto:chaolian@mtu.edu" href="javascript:return">chaolian@mtu.edu</a>&gt; wrote:<BR>&gt; Hi,<BR>&gt;<BR>&gt; From this example,<BR>&gt; <a href="http://vtk.org/gitweb?p=VTK.git;a=blob;f=Rendering/OpenGL/Testing/Cxx/TestMultiblockDisplayProperties.cxx" target=_blank >http://vtk.org/gitweb?p=VTK.git;a=blob;f=Rendering/OpenGL/Testing/Cxx/TestMultiblockDisplayProperties.cxx</a><BR>&gt; It shows how to color each block on a multiblockdataset, but this dataset is<BR>&gt; get from a reader:<BR>&gt; vtkXMLMultiBlockDataReader<BR>&gt;<BR>&gt; Then the key line is:<BR>&gt; mapper-&gt;SetInputConnection(reader-&gt;GetOutputPort());<BR>&gt; then it works, i can see different colors on different blocks.<BR>&gt;<BR>&gt; But in my case, say, I already have a vtkMultiBlockDataSet *mb in my code,<BR>&gt; so I don't need to use any reader. Then this is
 what I did:<BR>&gt;<BR>&gt; vtkCompositeDataGeometryFilter *sgfilter =<BR>&gt; vtkCompositeDataGeometryFilter::New();<BR>&gt; sgfilter-&gt;SetInputData(mb);<BR>&gt; sgfilter-&gt;Update();<BR>&gt; mapper-&gt;SetInputConnection(sgfilter-&gt;GetOutputPort());<BR>&gt;<BR>&gt; But it doesn't work, I cannot see different colors as I expected.<BR>&gt;<BR>&gt; So, what should I do in my case in order to use<BR>&gt; vtkCompositeDataDisplayAttributes class to show different colors in<BR>&gt; different blocks.<BR>&gt;<BR><BR>Hi Chao,<BR><BR>Are you sure you're setting the block attributes correctly? For<BR>instance the line "mapper-&gt;SetBlockColor(67, 0, 0.33, 0.0);" will set<BR>the color for block #67 to green. If your data set doesn't have a<BR>block with that ID then nothing will happen.<BR><BR>If that doesn't work can you post your full code?<BR><BR>Thanks,<BR>Kyle<BR>_______________________________________________<BR>Powered by www.kitware.com<BR><BR>Visit
 other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target=_blank >http://www.kitware.com/opensource/opensource.html</a><BR><BR>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target=_blank >http://www.vtk.org/Wiki/VTK_FAQ</a><BR><BR>Follow this link to subscribe/unsubscribe:<BR><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target=_blank >http://www.vtk.org/mailman/listinfo/vtkusers</a><BR></td>
                                    </tr>
                                </tbody>
                            </table>
                    </div>
                </div>
            </div>