[vtkusers] Thousands of Spheres slow down FPS evidently
David Doria
daviddoria at gmail.com
Sat Oct 15 07:38:13 EDT 2011
On Sat, Oct 15, 2011 at 4:55 AM, zlf <jxdw_zlf at yahoo.com.cn> wrote:
> sphere = vtkSphereSource::new ();
> sphere->SetRadius(3);
> sphere->SetRadius(0.5);
> sphere->SetThetaResolution(6);
> sphere->SetPhiResolution(6);
>
> _sphereMapper = vtkPolyDataMapper::new();
> _sphereMapper->SetInput(sphere->GetOutput());
>
> sphereActor = vtkActor::new();
> sphereActor->SetMapper(_sphereMapper);
> aRender->AddActor(sphereActor);
>
> I add two thousand sphere into renderer. Which slows down FPS evidently.
> Actually, instead of sphere, I just need some on screen markers.
>
> Any way to show thousands of markers without slows down FPS evidently.
>
> Thanks
>
> superZZ
The problem is having many actors. You could combine the manually
created spheres with vtkAppendPolyDataFilter and then use a single
actor. Or you could use vtkGlyph3D. Or you could use
vtkVertexGlyphFilter if you just want little squares instead of
spheres.
David
More information about the vtkusers
mailing list