Hi Martin,<br><br>This topic is quite interesting and helpful to others. If some more users can put into their ideas, then certainly, we can come to atleast a feasible solution, if not a perfect one..<br><br>I feel this can be implemented using single polydata, single mapper and single actor.<br>
<br>Now this depends on what you want to render. If it is only points, edges, and faces(elements) then, I think, displaying this using single actor must not be a problem. <br><br>For altering position of a Point, one can adopt a technique which recently David implemented here:<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex</a><br><br>In order to change the colour of each element, one can adopt the color table and scalar array scheme as shown here:<br>
<a href="http://www.paraview.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCells">http://www.paraview.org/Wiki/VTK/Examples/Cxx/PolyData/ColorCells</a><br><br>I doubt whether transparency can be achieved using this. <br><br>Also a new point can be inserted into the existing pointset and also can be deleted. <br>
<br>Hope this helps.<br><br>Warm Regards<br>Rakesh Patil<br><br><div class="gmail_quote">On Thu, Sep 30, 2010 at 11:50 AM, Affolter Martin <span dir="ltr"><<a href="mailto:martin.affolter@ntb.ch">martin.affolter@ntb.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Yes, the vtk Dlls are built in release configuration with debug information for the profiler (.pdb). We're using VisualStudio 2010.<br>
<font color="#888888"><br>
Martin<br>
</font><div><div></div><div class="h5"><br>
Do you build these in Release configuration?<br>
<br>
On Wed, Sep 29, 2010 at 3:24 AM, Affolter Martin <<a href="mailto:martin.affolter@ntb.ch">martin.affolter@ntb.ch</a>> wrote:<br>
> Sean<br>
><br>
> Thanks for your reply.<br>
><br>
> First some information on our Hard- and Software:<br>
> VTK: v 5.6<br>
> OS: Windows XP SP3<br>
> CPU: Intel Core2 Quad 2.83 GHz<br>
> RAM: 3.25 GB<br>
> GPU: ATI radeon HD 3400 series (latest drivers)<br>
><br>
> We're developing in Visual Studio 2010 which comes with a profiler. I profiled the application in "sample-mode" which means, the profiler looks at the stack in certain intervals and sums up the occurrence of the functions on the stack. Inclusive samples means the function is on the stack, exclusive samples means the function is being processed by the cpu.<br>
><br>
> Following recorded data is during rotation only, using static mappers. The first part is the "hot path" shown in the summary. Subpaths (A) and (B) are listed in detail below:<br>
><br>
><br>
> ----------------------------------Profiling results-------------------------------><br>
><br>
> Function Name Inclusive Samples Exclusive Samples Module Name<br>
><br>
> ARinnotech.exe 9'232 0<br>
> __CorExeMain_Exported@0 9'230 0 mscoree.dll<br>
> Unknown Frame(s) 9'194 0 UNKNOWN<br>
> (A) ClassCAD.ManVTKView.HandleWindowMessage(native int,int32,native int,native int) 2'979 0 DotNetInterface.dll<br>
> (B) vtkRenderWindow::DoStereoRender(void) 2'321 0 vtkRendering.dll<br>
> (C) [atioglxx.dll] 1'004 165 atioglxx.dll<br>
><br>
> (A) ClassCAD.ManVTKView.HandleWindowMessage(native int,int32,native int,native int) 2'979 0 DotNetInterface.dll<br>
> StubHelpers::SetLastError(void) 2'979 0 clr.dll<br>
> ClassCAD::VTKView::HandleWindowMessage(struct HWND__ *,unsigned int,unsigned int,long) 2'979 0 VTKGrEditor.dll<br>
> ClassCAD::ClassCadInteractor::HandleWindowMessage(struct HWND__ *,unsigned int,unsigned int,long) 2'979 0 VTKGrEditor.dll<br>
> vtkWin32RenderWindowInteractor::OnMouseMove(struct HWND__ *,unsigned int,int,int) 2'979 0 vtkRendering.dll<br>
> vtkObject::InvokeEvent(unsigned long,void *) 2'978 0 vtkCommon.dll<br>
> vtkSubjectHelper::InvokeEvent(unsigned long,void *,class vtkObject *) 2'978 0 vtkCommon.dll<br>
> vtkCallbackCommand::Execute(class vtkObject *,unsigned long,void *) 2'977 0 vtkCommon.dll<br>
> ClassCAD::InteractorStyleTrackballSelection::OnMouseMove(void) 2'977 0 VTKGrEditor.dll<br>
> ClassCAD::InteractorStyleTrackballSelection::Rotate(void) 2'721 0 VTKGrEditor.dll<br>
> vtkRenderer::ResetCameraClippingRange(void) 2'036 0 vtkRendering.dll<br>
> vtkRenderWindowInteractor::Render(void) 684 0 vtkRendering.dll<br>
> vtkRenderWindow::Render(void) 683 0 vtkRendering.dll<br>
> vtkObject::InvokeEvent(unsigned long,void *) 673 0 vtkCommon.dll<br>
> vtkSubjectHelper::InvokeEvent(unsigned long,void *,class vtkObject *) 673 504 vtkCommon.dll<br>
><br>
> (B) vtkRenderWindow::DoStereoRender(void) 2'321 0 vtkRendering.dll<br>
> vtkRendererCollection::Render(void) 2'321 0 vtkRendering.dll<br>
> vtkRenderer::Render(void) 2'321 88 vtkRendering.dll<br>
> vtkRenderer::AllocateTime(void) 2'223 38 vtkRendering.dll<br>
> vtkFrustumCoverageCuller::Cull(class vtkRenderer *,class vtkProp * *,int &,int &) 2'163 151 vtkRendering.dll<br>
> vtkActor::GetBounds(void) 2'000 129 vtkRendering.dll<br>
> vtkPainterPolyDataMapper::GetBounds(void) 1'776 69 vtkRendering.dll<br>
> vtkPainter::UpdateBounds(double * const) 570 488 vtkRendering.dll<br>
> vtkPolyDataMapper::GetInput(void) 548 3 vtkRendering.dll<br>
> vtkExecutive::GetNumberOfInputConnections(int) 289 106 vtkFiltering.dll<br>
> vtkExecutive::InputPortIndexInRange(int,char const *) 144 69 vtkFiltering.dll<br>
> vtkAlgorithm::GetNumberOfInputPorts(void) 75 75 vtkFiltering.dll<br>
><br>
> <---------------------------------Profiling results-------------------------------<br>
><br>
> Your stack trace and subpath B seem to start off identically but then different functions are consuming more cpu time... Maybe that's because of the static mappers. Do you see anything suspicious?<br>
><br>
> What vtk Version do you use and how is the performance rotating your 10'000 actors scene?<br>
><br>
> Regards<br>
> Martin Affolter<br>
><br>
> -----Ursprüngliche Nachricht-----<br>
> Von: Sean McBride [mailto:<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>]<br>
> Gesendet: Dienstag, 28. September 2010 19:03<br>
> An: Affolter Martin; 'Bill Lorensen'<br>
> Cc: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
> Betreff: Re: [vtkusers] How to visualize thousands of actors with good performance<br>
><br>
> On Tue, 28 Sep 2010 15:04:54 +0200, Affolter Martin said:<br>
><br>
>>Thanks for your suggestion. I had tried static mappers before,<br>
>>unfortunately without the Update()-call. Now I understand why the faces<br>
>>didn't show the first time (only edges and vertices). Anyway I tried it<br>
>>again just now. There is a slight performance increase noticable, but<br>
>>still no match to the performance in VTK 4.4., where the scene (8000<br>
>>actors) can be rotated smoothly.<br>
><br>
> Have you tried profiling your app? Where are the bottlenecks?<br>
><br>
> (What OS are you on? If Mac OS X, you can use Instruments.app to<br>
> measure where your bottlenecks are. I'm sure other OSes have similar tools.)<br>
><br>
> In our case, when we have about 10000 actors, and rotate the scene, the<br>
> heaviest stack trace is:<br>
><br>
> main<br>
> ...<br>
> -[vtkCocoaGLView drawRect:]<br>
> vtkRenderWindow::Render()<br>
> vtkRenderWindow::DoAARender()<br>
> vtkRenderWindow::DoFDRender()<br>
> vtkRenderWindow::DoStereoRender()<br>
> vtkRendererCollection::Render()<br>
> vtkRenderer::Render()<br>
> vtkOpenGLRenderer::DeviceRender()<br>
> vtkRenderer::UpdateGeometry()<br>
> vtkActor::RenderOpaqueGeometry(vtkViewport*)<br>
> vtkOpenGLActor::Render(vtkRenderer*, vtkMapper*)<br>
> vtkPolyDataMapper::Render(vtkRenderer*, vtkActor*)<br>
> vtkPainterPolyDataMapper::RenderPiece(vtkRenderer*, vtkActor*)<br>
> vtkDefaultPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)<br>
> vtkPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)<br>
> vtkPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)<br>
> vtkPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)<br>
> vtkOpenGLScalarsToColorsPainter::RenderInternal(vtkRenderer*, vtkActor*,<br>
> unsigned long, bool)<br>
> vtkPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)<br>
> vtkPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)<br>
> vtkOpenGLClipPlanesPainter::RenderInternal(vtkRenderer*, vtkActor*,<br>
> unsigned long, bool)<br>
> vtkPainter::RenderInternal(vtkRenderer*, vtkActor*, unsigned long, bool)<br>
> vtkPainter::Render(vtkRenderer*, vtkActor*, unsigned long, bool)<br>
> vtkOpenGLDisplayListPainter::RenderInternal(vtkRenderer*, vtkActor*,<br>
> unsigned long, bool)<br>
> gleCallList<br>
><br>
> --<br>
> ____________________________________________________________<br>
> Sean McBride, B. Eng <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
> Rogue Research <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
> Mac Software Developer Montréal, Québec, Canada<br>
><br>
><br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><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>
</div></div></blockquote></div><br>