[Paraview] Can I speed up animations if my mesh structure is constant?

Robert Blake rblake at jhu.edu
Thu Oct 9 18:43:29 EDT 2008


Is there a way to speed up Paraview when visualizing animate-able  
point data over a constant unstructured grid?  I've written a simple  
unstructured grid algorithm with the animate-able integer value XXX:

int vtkFakeDataAlgo::RequestData(
   vtkInformation *,
   vtkInformationVector **inputVector,
   vtkInformationVector *outputVector)
{
   vtkUnstructuredGrid *in  = GetGrid(inputVector[0]);
   vtkUnstructuredGrid *out = GetGrid(outputVector);

   out->ShallowCopy(in);

   vtkIdType N = out->GetNumberOfPoints();

   vtkFloatArray *data = vtkFloatArray::New();
   data->SetNumberOfComponents(1);
   data->SetNumberOfTuples(N);
   data->SetName( "FakeData" );

   float* ptr = data->GetPointer(0);
   for(vtkIdType ii=0; ii<N; ii++) {
     ptr[(ii+500*XXX)%N] = ii;
   }

   out->GetPointData()->AddArray(data);
   out->GetPointData()->SetActiveAttribute("FakeData",  
vtkDataSetAttributes::SCALARS );
   data->Delete();

   return 1;
}

To test this code, I set up the following pipeline:
  - Read in an unstructured grid
  - Attach this filter

I'm running this code on a ~4 million node mesh I have.   
PVGeometryFilter shows me a progress bar in the bottom every time I  
update XXX.  Due to the size of the mesh, this PVGeometryFilter step  
takes 5-6 seconds, which in turn makes the animation unbearably  
slow.  Is there a better way to write this filter?  I assume that  
PVGeometryFilter is re-calculating the surface of my unstructured  
mesh every time I update XXX.  Is this true?  If so, how can I avoid  
this recalculation?

----

I created this fake algorithm as a test.  I have time varying data on  
a 4 million node mesh and a 33 GBs of time-varying point data.  The  
node locations and connectivity are constant throughout the  
simulation.  I've had two problems visualizing this in Paraview:
  - Based on my understanding of http://paraview.org/Wiki/Talk:VTK/ 
Time_Support, my data set is too large to read in all at once as a  
TemporalDataSet.  Therefore I have to revert to this hacky approach  
in order to add data arrays to a constant mesh.  Did I understand the  
above page correctly?
- Every time I change the data array, Paraview has to think for 5-6  
seconds.  However, I can get real-time visualization if I code things  
by hand using raw vtk.  I hate to roll my own visualization software  
though when Paraview has already coded all the Qt widgets.

Thanks for any guidance you can give me,
Rob


More information about the ParaView mailing list