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).