<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I read from list that for vtkCompositeRenderManager, transparency can be handled by sorting the composition order, but I still can't find out how to sort the composition order? <br><br>I wrote following code to distribute data, render and composite. transparent part doesn't show up. <br><br>if vtkCompositeRenderManager can't handle transparency, is there a way to composite transparent rendered image from distributed nodes?<br><br>Thanks for help<br><br>Tracy<br><br>---------------------------------------------------------------------------------------------------------<br><br>#include "vtkCompositeRenderManager.h"<br>#include "vtkRenderWindow.h"<br>#include "vtkRenderWindowInteractor.h"<br>#include "vtkInteractorStyleTrackballCamera.h"<br>#include "vtkImageData.h"<br>#include "vtkSphereSource.h"<br>#include "vtkProperty.h"<br>#include
 "vtkMPIController.h"<br>#include "vtkDataSetMapper.h"<br>#include "vtkActor.h"<br>#include "vtkRenderWindow.h"<br>#include "vtkRenderer.h"<br>#include "vtkCamera.h"<br>#include "vtkDistributedDataFilter.h"<br>//distribute data into process, composite rendered image.<br>void process(vtkMultiProcessController* controller, void* vtkNotUsed(arg))<br>{<br>&nbsp; int myId = controller-&gt;GetLocalProcessId();<br><br>&nbsp; vtkCompositeRenderManager* manager = vtkCompositeRenderManager::New();<br><br>&nbsp; vtkRenderer *ren = manager-&gt;MakeRenderer();<br>&nbsp;&nbsp;&nbsp; ren-&gt;SetBackground(1.0, 1.0, 1.0);<br><br>&nbsp; vtkRenderWindow* renWin = manager-&gt;MakeRenderWindow();<br>&nbsp;&nbsp;&nbsp; renWin-&gt;AddRenderer(ren);<br>&nbsp;&nbsp;&nbsp; renWin-&gt;SetSize(400, 300);<br>&nbsp;&nbsp;&nbsp; if(myId == 0)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renWin-&gt;SetPosition(400, 500);<br><br>&nbsp; manager-&gt;SetRenderWindow(renWin);<br>&nbsp;
 manager-&gt;SetController(controller);<br><br>&nbsp; vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New();<br>&nbsp; iren-&gt;SetRenderWindow(renWin);<br><br>&nbsp; vtkInteractorStyleTrackballCamera *style = vtkInteractorStyleTrackballCamera::New();<br>&nbsp; iren-&gt;SetInteractorStyle(style);<br><br>&nbsp; vtkSphereSource *sphere = vtkSphereSource::New();<br>&nbsp; vtkDistributedDataFilter *dist = vtkDistributedDataFilter::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;dist-&gt;SetController(controller);<br>&nbsp;&nbsp;&nbsp; &nbsp;dist-&gt;SetInputConnection(sphere-&gt;GetOutputPort());<br>&nbsp; vtkDataSetMapper *sphereMapper = vtkDataSetMapper::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;sphereMapper-&gt;SetInputConnection(dist-&gt;GetOutputPort());<br>&nbsp; vtkActor *sphereActor = vtkActor::New();<br>&nbsp;&nbsp;&nbsp; sphereActor-&gt;SetMapper(sphereMapper);<br><br>&nbsp; ren-&gt;AddActor(sphereActor);<br><br>&nbsp; if(myId == 0)<br>&nbsp;
 {<br>&nbsp;&nbsp;&nbsp; sphereActor-&gt;GetProperty()-&gt;SetColor(1.0, 0.0, 1.0);<br>&nbsp;&nbsp;&nbsp; sphereActor-&gt;GetProperty()-&gt;SetOpacity(0.5);<br>&nbsp; }<br>&nbsp; else<br>&nbsp;&nbsp;&nbsp; sphereActor-&gt;GetProperty()-&gt;SetColor(0.0, 0.0, 1.0);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;if(myId==0)<br>&nbsp;{<br>&nbsp;&nbsp;&nbsp; &nbsp;renWin-&gt;Render();<br>&nbsp;&nbsp;&nbsp; &nbsp;ren-&gt;ResetCamera();<br>&nbsp;&nbsp;&nbsp; &nbsp;manager-&gt;StartInteractor();<br>&nbsp;&nbsp;&nbsp; &nbsp;manager-&gt;StopServices();<br>&nbsp;}<br>&nbsp;else<br>&nbsp;{<br>&nbsp;&nbsp;&nbsp; &nbsp;manager-&gt;StartServices();<br>&nbsp;}<br><br>&nbsp; sphere-&gt;Delete();<br>&nbsp; dist-&gt;Delete();<br>&nbsp; sphereMapper-&gt;Delete();<br>&nbsp; sphereActor-&gt;Delete();<br>&nbsp; iren-&gt;Delete();<br>&nbsp; style-&gt;Delete();<br>&nbsp; renWin-&gt;Delete();<br>&nbsp; manager-&gt;Delete();<br>}<br><br><br>int main( int argc, char* argv[] )<br>{<br>&nbsp;
 <br>&nbsp; vtkMPIController* controller = vtkMPIController::New();<br>&nbsp; controller-&gt;Initialize(&amp;argc, &amp;argv);<br><br>&nbsp; if (controller-&gt;IsA("vtkThreadedController"))<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; controller-&gt;SetNumberOfProcesses(2);<br>&nbsp;&nbsp;&nbsp; } <br>&nbsp;<br>&nbsp; int numProcs = controller-&gt;GetNumberOfProcesses();<br>&nbsp;<br>&nbsp; if (numProcs != 2)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; cerr &lt;&lt; "This example requires two processes." &lt;&lt; endl;<br>&nbsp;&nbsp;&nbsp; controller-&gt;Finalize();<br>&nbsp;&nbsp;&nbsp; controller-&gt;Delete();<br>&nbsp;&nbsp;&nbsp; return 1;<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp; controller-&gt;SetSingleMethod(process, 0);<br>&nbsp; controller-&gt;SingleMethodExecute();<br>&nbsp; <br>&nbsp; controller-&gt;Finalize();<br>&nbsp; controller-&gt;Delete();<br>&nbsp; <br>&nbsp; return 0;<br>}<br><br></td></tr></table><br>