Generating an animation from sequence of tables!?

I have a self-written filter that takes two inputs: one geometry (vtkUnstructuredGrid) and one table (CSV file) and generates one output - again a geometry with some added attributes. The calculations are using data from the input table of course.

Now I thought I can generate a sequence of output geometries by just providing a sequence of input tables, like table1.csv, table2.csv, table3.csv, then “play” the animation and get all the cases calculated in one run.

But it looks like this idea is a bit too simple still, but I do not really understand why!

  • Is it simply impossible to habe a sequence of tables as an “animation” in the first place? Because I was already not able to “play” the table and see the numbers changing step by step

  • Should I generate a sequence of input geometries numbered 1, 2, 3… even if they are all the same?

  • Do I need some “time” attribute in the table?

  • Or do I have to simply change my filter in order to make it happen?

You didn’t state whether your filter is implemented in C++ and loaded as a plugin or as python scripts in a programmable filter. Either way, time support should be possible and is implemented pretty much in the same way.

Time is implemented by passing information up and down the VTK pipeline. The original design of this mechanism is documented here: It would also be helpful to look at the implementation of the vtkTemporal* filters in VTK as they will give hints on how to implement time in VTK. The implementation of vtkTemporalShiftScale should be particularly enlightening.

In brief overview, in the RequestInformation method/script you will take the TIME_STEPS reported from the csv input and pass them to the output. In the RequestUpdateExtent method/script, take the UPDATE_TIME_STEPS from the output and pass it to the inputs. After you do that, VTK/ParaView should automatically step through the input csv files allowing your filter to process them in an animation.

1 Like

Thanks a lot: You answer already more than what I asked!

So for me the answers are:

  • first 3 questions: no, it is not sufficient to simply provide numbered input files to generate an animation

  • 4th question: yes, the filter needs to be adapted in such a way that it supports it - and you are already giving me some hints about what I should do for that purpose

Now my filter is written in C++, and I have already written another filter that generates an animation. Ok, many things in that field are still not clear for me, but that’s at least a starting point. The only new thing would be the fact that my first “animation generator” has only “static” input files, so I will have to see how I can handle the case where the input can be either a single file (which would generate one single output) or a numbered file sequence (which would then produce an animation).

Hi Kenneth,

Thank you for your response! I am trying to apply a series of 4x4 transformations to a source, and make it an animation. I am using the programmable filter, and ran into your post. I managed to finish the first two parts:

  1. In the RequestInformation script, added the time steps in the executive.TIME_STEPS() as well as setting the TIME_Range();
  2. In the Script, I managed to get the updated time step and apply the 4x4 transformation.

However, I do not know how to do the update in RequestUpdateExtent script. How should I make the time step increment? Could you please help share a pointer to a documentation page or example page?


@yw5aj, I’m not sure I understand the question. You advance to the next time in ParaView by clicking the Play (or Next Frame) button.


Thank you Kenneth for your prompt response!

Sorry for not being clear in my original question. I meant that ideally I would like my plug-in to run through all the time frames (e.g. I have a different transformation for each time frame). Would that be possible by using RequestUpdateExtent?


If you want a filter to iterate over multiple time steps from upstream, you can set the CONTINUE_EXECUTING key in the RequestData's request information to cause the pipeline to re-execute the update and data passes for that filter. An example of doing that is here: