Can I overlay a video with the python script

Quote from Rajendra Thapa on January 21, 2020, 5:08 pmHi,
I have a huge VASP file with coordinates for 210 atoms for ~10,000 MD steps. Having looked athttps://www.ovito.org/docs/current/python/introduction/examples/overlays/data_plot.php
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.
Thanks,
Rajen.
Hi,
I have a huge VASP file with coordinates for 210 atoms for ~10,000 MD steps. Having looked at
https://www.ovito.org/docs/current/python/introduction/examples/overlays/data_plot.php
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.
Thanks,
Rajen.
Uploaded files:
Quote from Alexander Stukowski on January 21, 2020, 6:21 pmHi,
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.
Hi,
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.

Quote from Rajendra Thapa on January 21, 2020, 8:43 pmOh great.
That solved the issue.
Thanks,
Rajen.
Oh great.
That solved the issue.
Thanks,
Rajen.
新的OVITO微信频道!
New for our users in China: OVITO on WeChat
Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.
