Forum Navigation
You need to log in to create posts and topics.

Can I overlay a video with the python script

I have a huge VASP file with coordinates for 210 atoms for ~10,000 MD steps. Having looked at

I am trying to something similar with this python script attached.  To be more clear, I am trying to overlay a graph that shows changing scatter data as the movie progresses.

The problem with this is that as I progress further in the video, the atoms move as expected but the scatter plot does not change.
Any help would be highly appreciated.




Uploaded files:


If your data plot depends on the results of the OVITO data pipeline at the current animation time, it's important that you pass the current frame number on to the Pipeline.compute() method:

def render(args):
    # Request the output data collection from the current pipeline:
    data = args.scene.selected_pipeline.compute(args.frame)

Otherwise you will always get back the pipeline results from animation frame 0, because the compute() method does not automatically pick up the animation frame number at which your render() function gets called by the system. Compute() simply uses the current position of the animation time slider, which remains at frame 0 in newer versions of OVITO while your are rendering an animation.

Unfortunately, the code example you mentioned is not doing this the right way. I am going to update the documentation now.

Oh great.
That solved the issue.