← Back to team overview

yade-users team mailing list archive

Re: YADE Playback function

 

Some precisions for Kendai:

1) examples/buldozer.py with utils.encodeVideoFromFrames(snapshooter['savedSnapshots'],out='/tmp/buldozer.ogg',fps=30)
It creates video from the current view
This uses SnapshotEngine to save .png from the current view every few steps during the simulation. snapshooter['savedSnapshots'] is list of filenames, which are converted to view file by the command Anton has mentioned.

The other possibility is to save partial simulation state (positions and orientation of bodies); there are 2 engines for this: (i) SQLiteRecorder, which saves into a single .sqlite file periodically. You can use Yade's player to replay the simulation afterwars; the player is able to save snapshots as well, which can be used to create the video. (ii) VTKRecorder, which saves into a series of .xml files in VTK format, which is useful if you want to use VTK-based visualization tools such as Paraview:
2) examples/buldozerVTK.py (added in r1770) uses VTK-recorder. Creates periodically snapshots in VTK-files. Then you can use the Paraview to render the video or any other VTK software.
Cheers, Vaclav



References