[vtkusers] very slow rendering of stream geometry

Mykhaylo Kostandov mk at cs.brown.edu
Fri Mar 16 23:49:56 EDT 2007


Greetings all,

I am experiencing some problems displaying flow fields with streamlines
filtered with tubes or glyphs or pretty much any other filter. The
dimensions of velocity field datasets I'm dealing with are 40x40x40, and
all I'm trying to do right now is to seed the streamlines with a
vtkPointSource and apply the vtkTubeFilter. As for streamlines, it seems
that the only way to get them to show up is to drastically reduce the
number of seeding points and increase the integration step length;
otherwise, the system just can't handle it. Once I apply the
vtkTubeFilter, it's virtually impossible to get it to work unless there
are only a few seeds left, and the integration step is very high (see
below).

The processing itself doesn't take too long, but entering the render
takes literally forever (and either segfaults or hangs).

In ParaView, however, everything works fine with much greater
propagation times and number of seeds, as well as with reasonable
integration step lengths.

I tried reducing the poly complexity with vtkStripper, etc. but it
didn't help.

Any help would be greatly appreciated. Thank you all very much!

-Mike

Here's a snippet:

    vtkDataSetReader *dataset = vtkDataSetReader::New();

    dataset->SetFileName("vortex5-0010.vtk");

    vtkPointSource *seeds = vtkPointSource::New();
    seeds->SetRadius(5);
    seeds->SetCenter(19.5,19.5,19.5);
    seeds->SetNumberOfPoints(10);

    vtkRungeKutta4 *sph_rk4 = vtkRungeKutta4::New();
    vtkStreamLine *sph_stream = vtkStreamLine::New();
   
    sph_stream->SetInput(dataset->GetOutput());
    sph_stream->SetSource(seeds->GetOutput());
    
    sph_stream->SetMaximumPropagationTime(123000);
    sph_stream->SetIntegrationStepLength(1); // .5
    sph_stream->SetStepLength(2); // .1
    
    sph_stream->SetNumberOfThreads(1);
    sph_stream->SetIntegrationDirectionToIntegrateBothDirections();
    sph_stream->SetIntegrator(sph_rk4);
    sph_stream->SpeedScalarsOn();
    sph_stream->Update();
  
     vtkTubeFilter *tubes;
    
     tubes = vtkTubeFilter::New();
     tubes->SetInput(sph_stream->GetOutput());
     tubes->SetRadius(0.2);
     tubes->SetNumberOfSides(6);

     vtkPolyDataMapper *sph_map = vtkPolyDataMapper::New();
 
     sph_map->SetInput(tubes->GetOutput());

    vtkActor *sph_actor = vtkActor::New();
    sph_actor->SetMapper(sph_map);






More information about the vtkusers mailing list