[vtkusers] Too many actors?

Gib Bogle g.bogle at auckland.ac.nz
Tue Nov 2 03:09:24 EDT 2010


I've run into a problem that probably implies that I'm doing something  
in a bad way.  I'm repeatedly rendering a scene that has things that  
move, and things that don't.  About 2000 small spheres move around.   
There is also a planar surface that is mostly unchanging, but because  
I need to be able to create dynamic eroded features on the surface, I  
represent it by a grid of square tiles.  Interestingly, the problem  
I've encountered occurs when there is no erosion, i.e. when the grid  
of tiles is not changing from one render to the next.  The program  
crashes after rendering the scene a variable number of times,  
typically about 300.

The spheres are of course actors made with sphereMapper.  If I turn  
off the rendering of the tiled surface the program runs correctly.  I  
am also using actors for the tiles, made with my own tileMapper, which  
just makes a square using vtkPolygon, vtkPolyData and  
vtkPolyDataMapper.  These actors are created and added to the  
renderwindow when the scene is rendered for the first time, then they  
are not touched again (in my simplified test case).  The trouble is  
there are quite a few of them - 100x100 = 10000.  If I halve the  
number, making the grid 50x100, the crash does not occur.  If I  
suppress the sphere rendering the program still crashes.

I guess I have two questions.  What is the limit that is being  
exceeded and causing the crash (which occurs while iren->Render() is  
being executed)?  Assuming that I have to reduce the number of actors,  
what would be a better method of handling the plane surface, given my  
need to make parts of it move to create depressions that grow?

I'm using MSVC on Windows 7.  The graphics card is ATI Radeon HD5400.

Thanks

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the vtkusers mailing list