[vtkusers] Improving rendering speed

Charl P. Botha c.p.botha at its.tudelft.nl
Sat Jun 14 15:50:20 EDT 2003


Ajit Rajwadé wrote:
> I need some tips for improving rendering speed. I am rendering a 3D 
> surface (from 8000 points) and it takes 15 seconds for the Render 
> routine. Is this merely a hardware problem?

No, this is merely a user problem. :)

>   // Create isosurface
> vtkContourFilter *cf = vtkContourFilter::New();
>  cf->SetInput(surf->GetOutput());
>  cf->SetValue(0,0.0);
>  cout << "Isosurface construction done..." << endl;

Don't you find it strange that when you run your program, this line 
prints out very soon after you start the program?  How do you think VTK 
knows to execute your surface reconstruction and contouring right here?

Your complete VTK pipeline only starts to execute when you call the 
renWin->Render().  The 15 seconds that you're worrying about consists of 
the actual surface reconstruction AND rendering.  Try doing a 
bStripper->Update() BEFORE you begin to render.

You don't have to use the Update(), it's only to illustrate my point. 
After your first long Render(), all subsequent Renders() should be much 
faster.

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/




More information about the vtkusers mailing list