Can I tell paraview to save an animation, skipping every N timesteps?

My file is very large and I would like Paraview to output an image once every 10 timesteps. I haven’t been able to figure out how to do that. I’m saving the animation as individual .png images. In File > save animation, I have a “frame rate” option, but it looks like paraview will still output every timestep no matter what is in the box. Is there any way I can tell paraview to only output one image for every N time steps?

Add Extract TimeSteps filter to your pipeline, typically right after the reader before you connect any other filters to it and make the filter only extract every 10th timestep. Now the animation will only have the timesteps you want. BTW, use 5.5 or newer as the Extract TimeSteps filter had a few issues when it was first introduced.

1 Like

Is this answer still up-to-date or did anyone check, if this really works?

I have the same question for Paraview 5.6.0, but the proposed solution does not skip the frames when Saving to png-files with SaveAnimation.

Here is what I used:

lBO_phi032pvalpvd = PVDReader(FileName=FileName)
Frame_Window  = [0,timesteps-1]
timesteps = len(lBO_phi032pvalpvd.TimestepValues)

extractTimeSteps1 = ExtractTimeSteps(Input=lBO_phi032pvalpvd)
extractTimeSteps1.SelectionMode = 'Select Time Range'
extractTimeSteps1.TimeStepRange = [0, timesteps-1]
extractTimeSteps1.TimeStepInterval = FrameRate
(...)
SaveAnimation(output_file, renderView1, ImageResolution=[1024, 896],
    OverrideColorPalette='WhiteBackground',
    FrameWindow=Frame_Window,
    FontScaling='Do not scale fonts',
    # PNG options
    SuffixFormat='.%04d')

If I replace the ‘Slect Time Range’ by ‘Select Time Steps’ I get the same results, namely that all available Timesteps are saved.

Any Ideas?

From what I can tell, this is a bug. As Utkarsh correctly points out, you can always extract the timesteps you want, and then the Save Animation will just work correctly. But, that shouldn’t be necessary.

Out of the box, this fails. Here is my bug report, targeted for 5.11, out spring of 2022. https://gitlab.kitware.com/paraview/paraview/-/issues/21011.

Next, we need more controls. View/ Animation View. We can change how ParaView strides through the timesteps. Change Step to Timestep/ Stride == 2. Note that you have to “take”, thus hit the Enter key. Now, create the animation. It works correctly.

If you change Step to Timestep to Realtime, a warning comes up that this is deprecated. I.e., don’t do this.

If you change Step to Timestep to Sequence, you can window in any way you like. For instance, number of frames 22, stride 2 should give you 11 output images.

I found the error, why I couldn’t get it to work properly with my approach.
In the scripted way, we need the

extractTimeSteps1.UpdatePipelineInformation()

after setting the timesteps to update the Information on the timesteps. Then the SveAnimation will work as intended.

Your hint with the “take” “Enter key” pushed me into the right diretion, Thank You!

Speaking of ParaView 5.12.0-RC3, frame stride adresses this issue. See the explanation below: