# Generating an animation from sequence of tables!?

**URL:** https://discourse.paraview.org/t/generating-an-animation-from-sequence-of-tables/3544
**Category:** ParaView Support
**Created:** [February 11, 2020, 11:33am UTC](https://discourse.paraview.org/t/generating-an-animation-from-sequence-of-tables/3544 "2020-02-11T11:33:39Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![cobo](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@cobo](https://discourse.paraview.org/u/cobo)
#### Post date: [February 11, 2020, 11:33am UTC](https://discourse.paraview.org/t/generating-an-animation-from-sequence-of-tables/3544/1 "2020-02-11T11:33:39Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [February 11, 2020, 5:48pm UTC](https://discourse.paraview.org/t/generating-an-animation-from-sequence-of-tables/3544/2 "2020-02-11T17:48:30Z")

</div>

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: [https://vtk.org/Wiki/VTK/Time\_Support](https://vtk.org/Wiki/VTK/Time_Support). 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.

---

<div class="post-metadata">

### Author: ![cobo](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/f17d59/32.png) [@cobo](https://discourse.paraview.org/u/cobo)
#### Post date: [February 12, 2020, 7:45am UTC](https://discourse.paraview.org/t/generating-an-animation-from-sequence-of-tables/3544/3 "2020-02-12T07:45:06Z")

</div>

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

---

<div class="post-metadata">

### Author: ![yw5aj](https://discourse.paraview.org/user_avatar/discourse.paraview.org/yw5aj/32/60_2.png) [@yw5aj](https://discourse.paraview.org/u/yw5aj)
#### Post date: [May 18, 2020, 3:21am UTC](https://discourse.paraview.org/t/generating-an-animation-from-sequence-of-tables/3544/4 "2020-05-18T03:21:24Z")

</div>

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?

Best,  
Shawn

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [May 18, 2020, 2:36pm UTC](https://discourse.paraview.org/t/generating-an-animation-from-sequence-of-tables/3544/5 "2020-05-18T14:36:29Z")

</div>

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

![2020-05-18_8-32-46](https://discourse.paraview.org/uploads/default/original/2X/6/64742624edf092f406bcfe89b0c2c191a7a4d495.png)

---

<div class="post-metadata">

### Author: ![yw5aj](https://discourse.paraview.org/user_avatar/discourse.paraview.org/yw5aj/32/60_2.png) [@yw5aj](https://discourse.paraview.org/u/yw5aj)
#### Post date: [May 18, 2020, 2:55pm UTC](https://discourse.paraview.org/t/generating-an-animation-from-sequence-of-tables/3544/6 "2020-05-18T14:55:21Z")

</div>

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?

Shawn

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [May 18, 2020, 4:24pm UTC](https://discourse.paraview.org/t/generating-an-animation-from-sequence-of-tables/3544/7 "2020-05-18T16:24:57Z")

</div>

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:

[https://vtk.org/Wiki/VTK/Streaming#Streaming\_time\_steps](https://vtk.org/Wiki/VTK/Streaming#Streaming_time_steps)
