Support storing an animation and interactive playback

This is another feature request / idea that I shared with @Francois_Mazen this past week.

I commonly have files, and pipelines, that can take several minutes – even hours – to play from start to finish. Even with geometry caching active the subsequent playbacks are often slow, measured in spf rather than fps. Furthermore, I often wish that I could pause the playback and go back a few frames, then forward… backward… forward-forward… backward etc. to “get a feel” for something. It’s often too slow to use the playback buttons because of the slowness of rendering each frame. Finally, even exporting a video to an AVI or MP4 doesn’t always work, because tools such as VLC or Windows Media Player tend to “skip” or “pixelate” when seeking.

It would be nice if there were an option to render & store an “animation”, perhaps as a pipeline object that could then be interacted with in a new layout window – maybe it would also be necessary to have a new layout type “movie player” that supports various play-modes, dragging a slider controlling the currently viewed frame, options for FPS or “real-time”, export to file, etc. This is partially inspired by the movie function in Matlab.

Exporting to png would avoid this ?

It might partially, but then I might have ~1000 PNG files per animation that I have to save and cycle through (and eventually delete) using my arrow keys in my system’s picture viewer – which will look more like a slideshow than an interactive animation experience.

My understanding is that you want to inspect and switch between two timesteps in a very delibarate way, is that not solved by having PNGs ? To limit the number of generated you can select a subset of timesteps to export if you know which one you want to inspect.

Not completely. Yes, I do want to be able to compare between two (or more) sequential time steps. But I also want to play the animation that I just spent an hour rendering – and then pause the video, go back a few steps… then play… then pause…

It would then be nice to play the animation at “real-time” speed (e.g., a simulation of a 0.2 second event captured in 1000 timesteps played back over 0.2 seconds, or a 10 second simulation captured in 25 timesteps played back over 10 seconds) – which might require nonlinear playback speed.

Greg’s idea is mostly a user experience improvement proposition. What we discussed is to get a dedicated view in ParaView which save the last rendering as picture in memory and allow the user to replay the N last rendering interactively without re-executing the pipeline. All in ParaView and in memory, no external tools. “rendering recording view” we may call it :slight_smile:

There is already a geometry animation cache, I think that it should cover that usecase, does it not ?

The drawback of geometry animation cache is memory consumption, especially for large number of time steps. Storing just the rendering would avoid this. Maybe it could be part of an improvement of the movie export dialog?

It makes me thing of the Freeze Track feature we have in Digital Audio Workstation. Here for example, where the output of the audio rendering is pre-recorded and replayed via an audio file in memory instead of computing all the audio filters, thus saving CPU cycles.

Later today I can record my screen where even with geometry cache it can take several seconds to render the next frame. So maybe it takes an hour to do the first play-through, building the cache, and 10 minutes to play the second time.

Here’s an example video. Note that the first play through is building the geometry cache, takes about 8-seconds per frame, using a remote (8 process) server-client setup. I takes approximately 14.5 minutes to play the 100 frames of the animation. The second play through, with the cache built, does run faster – about 3 seconds per frame or ~4.5 minutes total.

In the third part of the video I then use the Time Manager to jump around frames, note that I can’t drag the current-time indicator to “real-time” update the rendered frame – rendering only happens when I release the mouse-button.

Furthermore, if I want to export the video, even if it’s exactly what I want, I still have to wait the ~4.5 minutes for it to export, as demonstrated in the fourth part of the video. And for users who use the default value of not building the cache, you’d have to wait another 14.5 minutes.

And while, sure, I could save the video and load it into VLC and then drag the slider around, as demonstrated here, VLC has issues such as not showing final frames and always “cuts to black” at the end of a non-looping animation (unlike where ParaView’s render window always renders something).

The point I’m trying to make is that part of exploring spatio-temporal data is being able to explore the temporal data efficiently. For some datasets, that might mean a static spatial view with fine-grained, performant control of time. This is currently quite difficult to do in ParaView, requiring saving videos (over several minutes) and then leaving ParaView and using some 3rd-party media-player. It would be nice to instead have some of this functionality embedded within ParaView so that I never have to leave ParaView.