Skip to content
Advertisement

Save screen capture in pyvista including interaction / rotation

I’m looking for a way to effectively capture the frame buffer during interaction in pyvista so that I can produce a video afterwards of the model moving around on the screen.

The problem I’ve encountered is that when I click the screen to interact with the viewer/plotter, no frames are written while the mouse button is pressed and the model is moving to its next position. This results in ‘jerky’ movements in the video.

Is there a way around this behavior to effectively do something like a screen capture of the plotter window, even when being manipulated? Maybe through direct access to the frame buffer or something similar?

JavaScript

enter image description here

Advertisement

Answer

I have added an example in pure VTK, where a cube is rotated and a smooth video is captured with the rotation. Afterwards, the interactor is started and the user can interact with the scene afterwards.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement