[vtkusers] static model rendering speed

Clinton Stimpson clinton at elemtech.com
Mon Feb 24 12:38:43 EST 2003


Hi,

I'm working on displaying static models and was wondering if there are a 
set of tips for rendering those kinds of models.

I have two implementations of a simple little program to display these 
static models.  One is uses vtk and the other uses another graphics 
library similar to vtk.  The vtk one is slower at rendering during mouse 
interactions (rotations/panning/zooming).  I did some profiling of the 
vtk libraries and found the following functions to be the top two 
functions in the profile.

----------------------
Flat profile:

Each sample counts as 0.00195312 seconds.
   %   cumulative   self              self     total
  time   seconds   seconds    calls  ms/call  ms/call  name
  10.46      2.88     2.88  5155077     0.00     0.00 
vtkActor::GetBounds(void)
   7.84      5.04     2.16  6099320     0.00     0.00 
vtkDataSet::GetMTime(void)
[...]
----------------------

There are several other *::GetMTime() functions below those two for 
other classes.  I'm guessing from my limited understanding of vtk that 
those functions are related to making sure the data in the network is 
updated.

How can I speed up rendering of static models?
I followed the suggestions at 
http://public.kitware.com/cgi-bin/vtkfaq?req=all#3.7

1. Use ReleaseDataFlag ...    well I just delete everything up to the 
mapper and leave the mapper around because nothing changes.
2. Use ImmediateModeRendering ...  I'm not anywhere near the limit of my 
system's memory.
3. Use the Stripper  ...  I am using it to make tri strips.
4. Use a different filter or mapper...  I think I'm using the right 
ones.  I'm just drawing triangles(with vtkPolyDataMapper) and 
polylines(with vtkDataSetMapper).

Thanks,
Clint




More information about the vtkusers mailing list